From: gustav_delius Date: Wed, 5 Apr 2006 19:35:51 +0000 (+0000) Subject: Fix to make it work without globals hack X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=ded180686e186eb2ed7e3f24589d6f494944f14a;p=moodle.git Fix to make it work without globals hack --- diff --git a/question/question.php b/question/question.php index c4be99a428..5fbe26ced0 100644 --- a/question/question.php +++ b/question/question.php @@ -83,7 +83,8 @@ } if(!empty($id) && isset($_REQUEST['hide']) && confirm_sesskey()) { - if(!set_field('question', 'hidden', $_REQUEST['hide'], 'id', $id)) { + $hide = required_param('hide', PARAM_INT); + if(!set_field('question', 'hidden', $hide, 'id', $id)) { error("Faild to hide the question."); } redirect($SESSION->returnurl); @@ -114,6 +115,7 @@ print_header_simple("$streditingquestion", "", $strediting); if (isset($_REQUEST['delete'])) { + $delete = required_param('delete', PARAM_INT); if (isset($confirm) and confirm_sesskey()) { if ($confirm == md5($delete)) { if (record_exists('quiz_question_instances', 'question', $question->id) or