From ded180686e186eb2ed7e3f24589d6f494944f14a Mon Sep 17 00:00:00 2001 From: gustav_delius Date: Wed, 5 Apr 2006 19:35:51 +0000 Subject: [PATCH] Fix to make it work without globals hack --- question/question.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 -- 2.39.5