From 0f2a51a69dc049fece6b85ec41b4514e087099b4 Mon Sep 17 00:00:00 2001 From: Benjamin Renard Date: Fri, 21 Aug 2015 13:12:35 +0200 Subject: [PATCH] generate_lang_file.php : fix lang files inclusion --- public_html/lang/generate_lang_file.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/public_html/lang/generate_lang_file.php b/public_html/lang/generate_lang_file.php index 52c615ef..1b2d30c2 100755 --- a/public_html/lang/generate_lang_file.php +++ b/public_html/lang/generate_lang_file.php @@ -37,9 +37,11 @@ $lang=False; $encoding=False; $translations=array(); if ($argc > 1) { + // Change dir again to manage file input + chdir($curdir); for ($i=1;$i<$argc;$i++) { - if (is_file($curdir.'/'.$argv[$i])) { - @include($curdir.'/'.$argv[$i]); + if (is_file($argv[$i])) { + @include($argv[$i]); foreach($GLOBALS['LSlang'] as $msg => $trans) { $translations[$msg]=$trans; } @@ -73,6 +75,7 @@ if ($argc > 1) { exit(0); } } + chdir(dirname(__FILE__).'/../'); } $data=array();