Permalink
Browse files

better param handling SC#331; merged from MOODLE_17_STABLE

  • Loading branch information...
1 parent 34bf3d4 commit da5104e60a1c4e9a28484f26d61fe82d9aa2994c skodak committed Nov 6, 2006
Showing with 5 additions and 5 deletions.
  1. +5 −5 mod/forum/user.php
View
@@ -5,11 +5,11 @@
require_once('../../config.php');
require_once('lib.php');
- $course = required_param('course'); // course id
- $id = optional_param('id'); // user id
- $mode = optional_param('mode', 'posts');
- $page = optional_param('page', 0);
- $perpage = optional_param('perpage', 5);
+ $course = required_param('course', PARAM_INT); // course id
+ $id = optional_param('id', 0, PARAM_INT); // user id
+ $mode = optional_param('mode', 'posts', PARAM_ALPHA);
+ $page = optional_param('page', 0, PARAM_INT);
+ $perpage = optional_param('perpage', 5, PARAM_INT);
if (empty($id)) { // See your own profile by default
require_login();

0 comments on commit da5104e

Please sign in to comment.