From: stronk7 Date: Wed, 5 Apr 2006 23:29:46 +0000 (+0000) Subject: Hehe, setup itself was using register_globals hack! ;-) X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=391f5270400be11d8e58edcae188a06769ccaa6b;p=moodle.git Hehe, setup itself was using register_globals hack! ;-) Now the lang menu is working again. Note: I've used the PARAM_SAFEDIR flag because it's the only one supporting alpha+digits+underscore. Its name doesn't seem to be perfect for this. Perhaps we should create some alias? --- diff --git a/lib/setup.php b/lib/setup.php index a350547b91..f651012d2e 100644 --- a/lib/setup.php +++ b/lib/setup.php @@ -493,7 +493,7 @@ $CFG->os = PHP_OS; /// then use the one from the default language. Otherwise (and this is the /// majority of cases), use the stored locale specified by admin. - if (isset($_GET['lang'])) { + if ($lang = optional_param('lang', PARAM_SAFEDIR)) { if (!detect_munged_arguments($lang, 0) and (file_exists($CFG->dataroot .'/lang/'. $lang) or file_exists($CFG->dirroot .'/lang/'. $lang))) { $SESSION->lang = $lang;