]> git.mjollnir.org Git - moodle.git/commitdiff
Now new lang packs won't be available until UTF-8
authorstronk7 <stronk7>
Wed, 29 Mar 2006 16:18:46 +0000 (16:18 +0000)
committerstronk7 <stronk7>
Wed, 29 Mar 2006 16:18:46 +0000 (16:18 +0000)
migration was performed. Until then, only "en" and
old lang packs will be available.

The opposite is also true: only new lang packs will be available
once the UTF-8 migration was performed.

lib/moodlelib.php

index f8e8997c24d75b90d303e0f88e1b32f684301319..4181946c41b0e0d8b0beb7d03fc2c68e73e564d4 100644 (file)
@@ -4936,6 +4936,12 @@ function get_list_of_languages() {
                 continue;
             }
         /// Search under dirroot/lang
+        /// If $CFG->unicodedb = false, ignore new lang packs
+            if (empty($CFG->unicodedb)) {
+                if (file_exists($CFG->dirroot .'/lang/'. $lang .'/langconfig.php')) {
+                    continue;
+                }
+            }
             if (file_exists($CFG->dirroot .'/lang/'. $lang .'/'. $filetocheck)) {
                 include($CFG->dirroot .'/lang/'. $lang .'/'. $filetocheck);
                 if (!empty($string['thislanguage'])) {
@@ -4944,6 +4950,12 @@ function get_list_of_languages() {
                 unset($string);
             }
         /// And moodledata/lang
+        /// If $CFG->unicodedb = false, ignore new lang packs
+            if (empty($CFG->unicodedb)) {
+                if (file_exists($CFG->dataroot .'/lang/'. $lang .'/langconfig.php')) {
+                    continue;
+                }
+            }
             if (file_exists($CFG->dataroot .'/lang/'. $lang .'/'. $filetocheck)) {
                 include($CFG->dataroot .'/lang/'. $lang .'/'. $filetocheck);
                 if (!empty($string['thislanguage'])) {
@@ -4966,6 +4978,13 @@ function get_list_of_languages() {
             if (strstr('_local',$lang)!==false) {
                 continue;
             }
+        /// Search under moodledata/lang
+        /// If $CFG->unicodedb = false, ignore new lang packs
+            if (empty($CFG->unicodedb)) {
+                if (file_exists($CFG->dataroot .'/lang/'. $lang .'/langconfig.php')) {
+                    continue;
+                }
+            }
             if (file_exists($CFG->dataroot .'/lang/'. $lang .'/'. $filetocheck)) {
                 include($CFG->dataroot .'/lang/'. $lang .'/'. $filetocheck);
                 if (!empty($string['thislanguage'])) {
@@ -4973,6 +4992,13 @@ function get_list_of_languages() {
                 }
                 unset($string);
             }
+        /// And dirroot/lang
+        /// If $CFG->unicodedb = false, ignore new lang packs
+            if (empty($CFG->unicodedb)) {
+                if (file_exists($CFG->dirroot .'/lang/'. $lang .'/langconfig.php')) {
+                    continue;
+                }
+            }
             if (file_exists($CFG->dirroot .'/lang/'. $lang .'/'. $filetocheck)) {
                 include($CFG->dirroot .'/lang/'. $lang .'/'. $filetocheck);
                 if (!empty($string['thislanguage'])) {