From 7acde2f8c64169504383baab27f7c265fda67478 Mon Sep 17 00:00:00 2001 From: bradymiller Date: Sat, 24 Apr 2010 20:13:04 +0000 Subject: [PATCH] improved configuration for lang_custom table --- interface/language/lang.info.html | 14 ++++++-------- interface/language/language.php | 11 ++++++++--- 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/interface/language/lang.info.html b/interface/language/lang.info.html index ad7e438c3..25dc8f331 100644 --- a/interface/language/lang.info.html +++ b/interface/language/lang.info.html @@ -112,15 +112,13 @@ refer to openemr/library/translation.inc.php for more details. V. Configure the Customization Log (for OpenEMR version 3.2) -This will require a minor modification to a page and a new mysql table -(lang_custom). +This will require a new mysql table(lang_custom): -STEP 1: Edit interface/language/language.php at top of -the script, set the $enable_custom_language_logging variable to true. - -STEP 2: Within OpenEMR, go to Administration->Database screen. Then -click 'openemr' on top left of phpmyadmin screen. Then click 'SQL' tab -on the screen. Then copy/paste below text, and click 'Go' button: +STEPS TO INSTALL NEW TABLE: Within OpenEMR, go to Administration->Database +screen. Scroll through the tables on left to ensure the lang_custom +table does not already exist. If the lang_custom table does not exist, +then click 'openemr' on top left of phpmyadmin screen. Then click +'SQL' tab on the screen. Then copy/paste below text, and click 'Go' button: CREATE TABLE lang_custom ( lang_description varchar(100) NOT NULL default '', lang_code char(2) NOT NULL default '', diff --git a/interface/language/language.php b/interface/language/language.php index d0ece5c9a..5c093d985 100644 --- a/interface/language/language.php +++ b/interface/language/language.php @@ -7,9 +7,14 @@ include_once("../../library/acl.inc"); require_once("language.inc.php"); require_once("$srcdir/formdata.inc.php"); -// Setting to enable custom logging of language translations -// (Note that the below mysql table is required for this function) -$enable_custom_language_logging=false; +// Check to see if the lang_custom table exists +$test_table = SqlStatement("show tables like 'lang_custom'"); +if (SqlFetchArray($test_table)) { + $enable_custom_language_logging=true; +} +else { + $enable_custom_language_logging=false; +} /* Note that the table mysql lang_custom is required for this function, which can be accomplished with following script in mysql: CREATE TABLE lang_custom ( -- 2.11.4.GIT