]> git.mjollnir.org Git - moodle.git/commitdiff
Whoops, forgot to check this in last night.
authormoodler <moodler>
Sat, 17 Jul 2004 04:31:34 +0000 (04:31 +0000)
committermoodler <moodler>
Sat, 17 Jul 2004 04:31:34 +0000 (04:31 +0000)
lib/setup.php

index ba893bb92a5f4b31e5b57338f95b9960a175260c..c5d36c90dd60f0f20919c1ff9f6e9fd7e0902c40 100644 (file)
 /// majority of cases), use the stored locale specified by admin.
 
     if (isset($_GET['lang'])) {
-        $SESSION->lang = $lang;
-        $SESSION->encoding = get_string('thischarset');
+        if (!detect_munged_arguments($lang) and file_exists("$CFG->dirroot/lang/$lang")) {
+            $SESSION->lang = $lang;
+            $SESSION->encoding = get_string('thischarset');
+        }
     }
     if (empty($CFG->lang)) {
         $CFG->lang = "en";