Permalink
Browse files

Replaced optional_var with optional_param

  • Loading branch information...
moodler
moodler committed Dec 7, 2005
1 parent cf08dfb commit b3188b3069c70e2992373f7fa574a6ef35827b6e
Showing with 15 additions and 15 deletions.
  1. +2 −2 mod/quiz/questiontypes/datasetdependent/categorydatasetdefinitions.php
  2. +13 −13 mod/wiki/view.php
@@ -6,8 +6,8 @@
require_once("$CFG->dirroot/config.php");
- require_variable($category);
- optional_variable($question);
+ $category = required_param('category', PARAM_ALPHANUM);
+ $question = optional_param('question', '', PARAM_INT);
if (! $category = get_record("quiz_categories", "id", $category)) {
error("This wasn't a valid category!");
View
@@ -6,19 +6,19 @@
require_once("../../config.php");
require_once("lib.php");
-# require_once("$CFG->dirroot/course/lib.php"); // For side-blocks
-
- optional_variable($ewiki_action,""); // Action on Wiki-Page
- optional_variable($id); // Course Module ID, or
- optional_variable($wid); // Wiki ID
- optional_variable($page, false); // Wiki Page Name
- optional_variable($q,""); // Search Context
- optional_variable($userid, 0); // User wiki.
- optional_variable($groupid, 0); // Group wiki.
- optional_variable($canceledit,""); // Editing has been cancelled
-
-/// Only want to add edit log entries if we have made some changes ie submitted a form
- $editsave = optional_param('thankyou');
+ #require_once("$CFG->dirroot/course/lib.php"); // For side-blocks
+
+ $ewiki_action = optional_param('ewiki_action', '', PARAM_ALPHA); // Action on Wiki-Page
+ $id = optional_param('id', 0, PARAM_INT); // Course Module ID, or
+ $wid = optional_param('wid', 0, PARAM_INT); // Wiki ID
+ $page = optional_param('page', false, PARAM_ALPHANUM); // Wiki Page Name
+ $q = optional_param('q',"", PARAM_ALPHANUM); // Search Context
+ $userid = optional_param('userid', 0, PARAM_INT); // User wiki.
+ $groupid = optional_param('groupid', 0, PARAM_INT); // Group wiki.
+ $canceledit = optional_param('canceledit','', PARAM_INT); // Editing has been cancelled
+
+ // Only want to add edit log entries if we have made some changes ie submitted a form
+ $editsave = optional_param('thankyou', '', PARAM_INT);

0 comments on commit b3188b3

Please sign in to comment.