diff --git a/htdocs/Language/default.xml b/htdocs/Language/default.xml index 99b97fa27..798a605ee 100644 --- a/htdocs/Language/default.xml +++ b/htdocs/Language/default.xml @@ -871,11 +871,11 @@ SPECIMEN_CUSTOM_FIELDS - Specimen Custom Fields + Specimen Custom Fields PATIENT_CUSTOM_FIELDS - Patient Custom Fields + Patient Custom Fields diff --git a/htdocs/Language/en.xml b/htdocs/Language/en.xml index 99b97fa27..798a605ee 100644 --- a/htdocs/Language/en.xml +++ b/htdocs/Language/en.xml @@ -871,11 +871,11 @@ SPECIMEN_CUSTOM_FIELDS - Specimen Custom Fields + Specimen Custom Fields PATIENT_CUSTOM_FIELDS - Patient Custom Fields + Patient Custom Fields diff --git a/htdocs/includes/composer.php b/htdocs/includes/composer.php index 4c1d072bb..47ba340fe 100644 --- a/htdocs/includes/composer.php +++ b/htdocs/includes/composer.php @@ -25,4 +25,27 @@ mkdir(__DIR__."/../../files", 0755); } +require_once(__DIR__."/platform_lib.php"); + +# Ensure that we create the language files in local/ +# if they don't exist yet. + +$lab_config_id = null; +if (isset($_SESSION["lab_config_id"])) { + $lab_config_id = $_SESSION["lab_config_id"]; +} + +$lang_template_path = realpath(__DIR__."/../Language/"); +$local_path = realpath(__DIR__."/../../local"); + +if (!file_exists("$local_path/langdata_revamp/")) { + $log->warn("$local_path/langdata_revamp does not exist, copying template"); + PlatformLib::copyDirectory($lang_template_path, "$local_path/langdata_revamp/"); +} + +if ($lab_config_id != null && !file_exists("$local_path/langdata_$lab_config_id/")) { + $log->warn("$local_path/langdata_$lab_config_id does not exist, copying template"); + PlatformLib::copyDirectory($lang_template_path, "$local_path/langdata_$lab_config_id/"); +} + ?> diff --git a/htdocs/users/login.php b/htdocs/users/login.php index b9a7c03e9..ad8bf0f59 100755 --- a/htdocs/users/login.php +++ b/htdocs/users/login.php @@ -1,5 +1,5 @@