From: jakubvrana Date: Sat, 24 May 2008 08:27:37 +0000 (+0000) Subject: Fill $lang_ids first X-Git-Tag: v3.0.0~1101 X-Git-Url: https://git.joonet.de/?a=commitdiff_plain;h=932a71928868cd3f935ea6917f8c97bd46e2573f;p=adminer.git Fill $lang_ids first git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@415 7c3ca157-0c34-0410-bff1-cbf682f78f5c --- diff --git a/_compile.php b/_compile.php index bf885a9a..5ad7fe7f 100644 --- a/_compile.php +++ b/_compile.php @@ -28,17 +28,18 @@ function put_file($match) { $return = ""; foreach (glob("lang/*.inc.php") as $filename) { include $filename; - foreach ($translations as $key => $val) { if (!isset($lang_ids[$key])) { $lang_ids[$key] = count($lang_ids); } } + } + foreach (glob("lang/*.inc.php") as $filename) { + include $filename; $translation_ids = array_flip($lang_ids); foreach ($translations as $key => $val) { $translation_ids[$lang_ids[$key]] = $val; } - $return .= 'case "' . basename($filename, '.inc.php') . '": $translations = array('; foreach ($translation_ids as $val) { $return .= (is_array($val) ? "array('" . implode("', '", array_map('add_apo_slashes', $val)) . "')" : "'" . add_apo_slashes($val) . "'") . ", ";