From 5ec0f7d21073127e5faaffa42c74c6f6399d4dcf Mon Sep 17 00:00:00 2001 From: Benjamin Renard Date: Mon, 10 Aug 2015 10:15:33 +0200 Subject: [PATCH] generate_lang_file.php : initialize LSsession before parsing for messages --- public_html/lang/generate_lang_file.php | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/public_html/lang/generate_lang_file.php b/public_html/lang/generate_lang_file.php index 62cad9fe..a00a5136 100755 --- a/public_html/lang/generate_lang_file.php +++ b/public_html/lang/generate_lang_file.php @@ -66,6 +66,12 @@ function add($msg) { } } +// Change directory +chdir('../'); + +// Initialize session +LSsession :: initialize(); + // LDAP Servers foreach($GLOBALS['LSconfig']['ldap_servers'] as $conf) { add($conf['name']); @@ -85,7 +91,7 @@ foreach($GLOBALS['LSconfig']['ldap_servers'] as $conf) { // LSobject -if (loadDir('../'.LS_OBJECTS_DIR) && loadDir('../'.LS_LOCAL_DIR.LS_OBJECTS_DIR)) { +if (loadDir(LS_OBJECTS_DIR) && loadDir(LS_LOCAL_DIR.LS_OBJECTS_DIR)) { foreach($GLOBALS['LSobjects'] as $name => $conf) { add($conf['label']); @@ -218,8 +224,8 @@ function find_and_parse_template_file($dir) { } } -find_and_parse_template_file('../'.LS_TEMPLATES_DIR); -find_and_parse_template_file('../'.LS_LOCAL_DIR.LS_TEMPLATES_DIR); +find_and_parse_template_file(LS_TEMPLATES_DIR); +find_and_parse_template_file(LS_LOCAL_DIR.LS_TEMPLATES_DIR); ksort($data);