]> git.mjollnir.org Git - moodle.git/commitdiff
strstr(string haystack,string needle). We were doing the opossite. Bug 5037.
authorstronk7 <stronk7>
Sat, 15 Apr 2006 17:30:23 +0000 (17:30 +0000)
committerstronk7 <stronk7>
Sat, 15 Apr 2006 17:30:23 +0000 (17:30 +0000)
(http://moodle.org/bugs/bug.php?op=show&bugid=5037)

lib/moodlelib.php

index 4ab4b5e1ef29953135c807564a1e5b0c9b94af4b..9b7a86d418cdabfd34bce3a4b912d4efedb13381 100644 (file)
@@ -4932,7 +4932,7 @@ function get_list_of_languages() {
         $langlist = explode(',', $CFG->langlist);
         foreach ($langlist as $lang) {
             $lang = trim($lang);   //Just trim spaces to be a bit more permissive
-            if (strstr('_local',$lang)!==false) {
+            if (strstr($lang, '_local')!==false) {
                 continue;
             }
             if (substr($lang, -5) == '_utf8') {   //Remove the _utf8 suffix from the lang to show
@@ -4980,7 +4980,7 @@ function get_list_of_languages() {
         asort($langdirs);
     /// Get some info from each lang (first from moodledata, then from moodle)
         foreach ($langdirs as $lang) {
-            if (strstr('_local',$lang)!==false) {
+            if (strstr($lang, '_local')!==false) {
                 continue;
             }
             if (substr($lang, -5) == '_utf8') {   //Remove the _utf8 suffix from the lang to show