From: moodler Date: Sat, 17 Jul 2004 04:31:34 +0000 (+0000) Subject: Whoops, forgot to check this in last night. X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=32c60ce365fb378949b3f4b10eef765ab736fe99;p=moodle.git Whoops, forgot to check this in last night. --- diff --git a/lib/setup.php b/lib/setup.php index ba893bb92a..c5d36c90dd 100644 --- a/lib/setup.php +++ b/lib/setup.php @@ -232,8 +232,10 @@ /// 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";