From 932a71928868cd3f935ea6917f8c97bd46e2573f Mon Sep 17 00:00:00 2001 From: jakubvrana Date: Sat, 24 May 2008 08:27:37 +0000 Subject: [PATCH] Fill $lang_ids first git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@415 7c3ca157-0c34-0410-bff1-cbf682f78f5c --- _compile.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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) . "'") . ", ";