mirror of
https://github.com/moodle/moodle.git
synced 2025-08-11 03:46:42 +02:00
Replaced optional_var with optional_param
This commit is contained in:
parent
3a6b53e80d
commit
aa8139414e
18 changed files with 85 additions and 90 deletions
|
@ -5,17 +5,14 @@
|
|||
require_once("../../config.php");
|
||||
require_once("lib.php");
|
||||
|
||||
require_variable($id); // Course Module ID, or
|
||||
optional_variable($usedynalink); // category ID
|
||||
optional_variable($confirm); // confirm the action
|
||||
$id = required_param('id', PARAM_INT); // Course Module ID, or
|
||||
$usedynalink = optional_param('usedynalink', 0, PARAM_INT); // category ID
|
||||
$confirm = optional_param('confirm', 0, PARAM_INT); // confirm the action
|
||||
$name = optional_param('name', '', PARAM_ALPHANUM); // confirm the name
|
||||
|
||||
optional_variable($name); // confirm the name
|
||||
|
||||
$name = clean_text($name);
|
||||
|
||||
$action = optional_param('action'); // what to do
|
||||
$hook = optional_param('hook',0); // category ID
|
||||
$mode = optional_param('mode'); // cat
|
||||
$action = optional_param('action', '', PARAM_ALPHA ); // what to do
|
||||
$hook = optional_param('hook', '', PARAM_ALPHANUM); // category ID
|
||||
$mode = optional_param('mode', '', PARAM_ALPHA); // cat
|
||||
|
||||
$action = strtolower($action);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue