aboutsummaryrefslogtreecommitdiff
path: root/engine/lib
diff options
context:
space:
mode:
authormarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-02-19 14:52:25 +0000
committermarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-02-19 14:52:25 +0000
commitba6997ce00805307fe18cd04ce2eb4c47c39f036 (patch)
treef1258b72ca6b79f4a0fe0c5004d4d0956cc3e8df /engine/lib
parent9901e028b08dde22c8eb77c20d14de0eb95bdf90 (diff)
downloadelgg-ba6997ce00805307fe18cd04ce2eb4c47c39f036.tar.gz
elgg-ba6997ce00805307fe18cd04ce2eb4c47c39f036.tar.bz2
Fixed strange infinite loop on language loading.
git-svn-id: https://code.elgg.org/elgg/trunk@2813 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib')
-rw-r--r--engine/lib/languages.php11
1 files changed, 8 insertions, 3 deletions
diff --git a/engine/lib/languages.php b/engine/lib/languages.php
index 664285996..7aacf5ac5 100644
--- a/engine/lib/languages.php
+++ b/engine/lib/languages.php
@@ -125,7 +125,7 @@
// Make a note of this path just incase we need to register this language later
if(!isset($CONFIG->language_paths)) $CONFIG->language_paths = array();
- $CONFIG->language_paths[] = $path;
+ $CONFIG->language_paths[$path] = true;
// Get the current language based on site defaults and user preference
$current_language = get_current_language();
@@ -162,8 +162,13 @@
{
global $CONFIG;
- foreach ($CONFIG->language_paths as $path)
- register_translations($path, true);
+ static $LANG_RELOAD_ALL_RUN;
+ if ($LANG_RELOAD_ALL_RUN) return null;
+
+ foreach ($CONFIG->language_paths as $path => $dummy)
+ register_translations($path, true);
+
+ $LANG_RELOAD_ALL_RUN = true;
}
/**