Permalink
Browse files

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?
  • Loading branch information...
1 parent 768cf7d commit 391f5270400be11d8e58edcae188a06769ccaa6b stronk7 committed Apr 5, 2006
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/setup.php
View
@@ -493,7 +493,7 @@ class object {};
/// 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;

0 comments on commit 391f527

Please sign in to comment.