aboutsummaryrefslogtreecommitdiffstats
path: root/langs.inc.php
diff options
context:
space:
mode:
authorRomain d'Alverny <rda@mageia.org>2012-05-24 20:18:59 +0000
committerRomain d'Alverny <rda@mageia.org>2012-05-24 20:18:59 +0000
commit8109df7f74a522f3b121f7ddda4aa3eb77c16f94 (patch)
tree05fdc29e9c140f202aeb779d6d6ca69a50e859f2 /langs.inc.php
parent4a6eeff950e5cf186d7e6a203b8289b54a220057 (diff)
downloadwww-8109df7f74a522f3b121f7ddda4aa3eb77c16f94.tar
www-8109df7f74a522f3b121f7ddda4aa3eb77c16f94.tar.gz
www-8109df7f74a522f3b121f7ddda4aa3eb77c16f94.tar.bz2
www-8109df7f74a522f3b121f7ddda4aa3eb77c16f94.tar.xz
www-8109df7f74a522f3b121f7ddda4aa3eb77c16f94.zip
make sure the global is defined
Diffstat (limited to 'langs.inc.php')
-rw-r--r--langs.inc.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/langs.inc.php b/langs.inc.php
index ebf80c381..2f1561742 100644
--- a/langs.inc.php
+++ b/langs.inc.php
@@ -218,15 +218,18 @@ function _lang_load($locale, $domain)
return true;
$lang_file = sprintf('%s/langs/%s/%s.%s.lang', G_APP_ROOT, $locale, $domain, $locale);
+
if (file_exists($lang_file)) {
global $_t;
+ if (!isset($_t) || !is_array($_t))
+ $_t = array();
$_t = array_merge($_t, _lang_return($lang_file));
return true;
}
-
+
return false;
}