From ab620fbf2b9927fb214b70bb15b98dc95fd46432 Mon Sep 17 00:00:00 2001 From: gustav_delius Date: Tue, 11 Apr 2006 20:42:31 +0000 Subject: [PATCH] Added call to optional_param() --- question/question.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/question/question.php b/question/question.php index 5fbe26ced0..73d7b7f835 100644 --- a/question/question.php +++ b/question/question.php @@ -30,6 +30,9 @@ $qtype = optional_param('qtype', '', PARAM_FILE); $category = optional_param('category', 0, PARAM_INT); + + $delete = optional_param('delete', 0, PARAM_INT); + $confirm = optional_param('confirm', 0, PARAM_INT); // rqp questions set the type to rqp_nn where nn is the rqp_type id if (substr($qtype, 0, 4) == 'rqp_') { @@ -114,9 +117,8 @@ print_header_simple("$streditingquestion", "", $strediting); - if (isset($_REQUEST['delete'])) { - $delete = required_param('delete', PARAM_INT); - if (isset($confirm) and confirm_sesskey()) { + if ($delete) { + if ($confirm and confirm_sesskey()) { if ($confirm == md5($delete)) { if (record_exists('quiz_question_instances', 'question', $question->id) or record_exists('question_states', 'originalquestion', $question->id)) { -- 2.39.5