Added call to optional_param()

This commit is contained in:
gustav_delius
2006-04-11 20:42:31 +00:00
parent 9d6a11f8ff
commit ab620fbf2b
+5 -3
View File
@@ -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)) {