mirror of
https://gitlab.easter-eggs.com/ee/ldapsaisie.git
synced 2024-12-18 14:33:49 +01:00
generate_lang_file.php : make script callable from anywhere
This commit is contained in:
parent
3239559128
commit
15298feec8
1 changed files with 8 additions and 7 deletions
|
@ -23,8 +23,12 @@
|
||||||
|
|
||||||
error_reporting(E_ERROR);
|
error_reporting(E_ERROR);
|
||||||
|
|
||||||
require_once('../core.php');
|
// Change directory
|
||||||
require_once('../conf/config.inc.php');
|
$curdir=getcwd();
|
||||||
|
chdir(dirname(__FILE__).'/../');
|
||||||
|
|
||||||
|
require_once('core.php');
|
||||||
|
require_once('conf/config.inc.php');
|
||||||
|
|
||||||
$withoutselectlist=False;
|
$withoutselectlist=False;
|
||||||
$copyoriginalvalue=False;
|
$copyoriginalvalue=False;
|
||||||
|
@ -32,8 +36,8 @@ $additionalfileformat=False;
|
||||||
$translations=array();
|
$translations=array();
|
||||||
if ($argc > 1) {
|
if ($argc > 1) {
|
||||||
for ($i=1;$i<$argc;$i++) {
|
for ($i=1;$i<$argc;$i++) {
|
||||||
if (is_file($argv[$i])) {
|
if (is_file($curdir.'/'.$argv[$i])) {
|
||||||
@include($argv[$i]);
|
@include($curdir.'/'.$argv[$i]);
|
||||||
foreach($GLOBALS['LSlang'] as $msg => $trans) {
|
foreach($GLOBALS['LSlang'] as $msg => $trans) {
|
||||||
$translations[$msg]=$trans;
|
$translations[$msg]=$trans;
|
||||||
}
|
}
|
||||||
|
@ -66,9 +70,6 @@ function add($msg) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Change directory
|
|
||||||
chdir('../');
|
|
||||||
|
|
||||||
// Initialize session
|
// Initialize session
|
||||||
LSsession :: initialize();
|
LSsession :: initialize();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue