]> git.mjollnir.org Git - moodle.git/commitdiff
Be a bit more flexible with the extra paths (can be a string or an array)
authormoodler <moodler>
Mon, 2 Oct 2006 15:15:23 +0000 (15:15 +0000)
committermoodler <moodler>
Mon, 2 Oct 2006 15:15:23 +0000 (15:15 +0000)
lib/moodlelib.php

index 944916a5493945d21da876e489a915e53e92b62b..73536f6a061796e53461a8e59d556be38ea5a7bd 100644 (file)
@@ -4266,7 +4266,13 @@ function get_string($identifier, $module='', $a=NULL, $extralocations=NULL) {
     $locations = array();
 
     if (!empty($extralocations)) {   // Calling code has a good idea where to look
-        $locations += $extralocations;
+        if (is_array($extralocations)) {
+            $locations += $extralocations;
+        } else if (is_string($extralocations)) {
+            $locations[] = $extralocations;
+        } else {
+            debugging('Bad lang path provided');
+        }
     }
 
     if (isset($CFG->running_installer)) {