diff options
author | Simon Rettberg | 2014-08-13 05:19:48 +0200 |
---|---|---|
committer | Simon Rettberg | 2014-08-13 05:19:48 +0200 |
commit | daa01cd95af746a65b9f8e258d6638a57ec4a4de (patch) | |
tree | df17ca46a1a23fc68778c1ccffa406b9458c74f6 /inc | |
parent | [translation] Hide templates with no lang_* tags (diff) | |
download | slx-admin-daa01cd95af746a65b9f8e258d6638a57ec4a4de.tar.gz slx-admin-daa01cd95af746a65b9f8e258d6638a57ec4a4de.tar.xz slx-admin-daa01cd95af746a65b9f8e258d6638a57ec4a4de.zip |
Don't bail out if a json file doesn't exist for a given lang+template
Diffstat (limited to 'inc')
-rw-r--r-- | inc/dictionary.inc.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/inc/dictionary.inc.php b/inc/dictionary.inc.php index b8a888d5..3a157555 100644 --- a/inc/dictionary.inc.php +++ b/inc/dictionary.inc.php @@ -54,10 +54,10 @@ class Dictionary if ($lang === false) $lang = LANG; $file = "lang/" . $lang . "/" . $template . ".json"; - $content = @file_get_contents($file); - if ($content === false) - Util::traceError("Could not find language file $template for language $lang"); $language = array('lang' => $lang); + $content = @file_get_contents($file); + if ($content === false) // File does not exist for language + return $language; $json = json_decode($content, true); if (!is_array($json)) return $language; |