mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
MDL-21818 fixed globals problems
This commit is contained in:
parent
794eed327d
commit
8db38eab80
1 changed files with 10 additions and 4 deletions
|
@ -9,7 +9,7 @@
|
|||
#require_once("$CFG->dirroot/course/lib.php"); // For side-blocks
|
||||
$PAGE->requires->yui2_lib('connection');
|
||||
|
||||
$ewiki_action = optional_param('ewiki_action', '', PARAM_ALPHA); // Action on Wiki-Page
|
||||
$ewiki_action = null; // this is a bloody global which is set up elsewhere
|
||||
$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); // Wiki Page Name
|
||||
|
@ -283,10 +283,16 @@
|
|||
"view.php?id=$cm->id&groupid=$groupid&userid=$userid&page=$ewiki_title",
|
||||
format_string($wiki->name,true).": ".$ewiki_title, $cm->id, $userid);
|
||||
} else if ($ewiki_action != 'edit') {
|
||||
if (!in_array($ewiki_action, array('view', 'links', 'info'))) {
|
||||
add_to_log($course->id, "wiki", 'bogus',
|
||||
"view.php?id=$cm->id&groupid=$groupid&userid=$userid&page=$ewiki_title",
|
||||
format_string($wiki->name,true).": ".$ewiki_title, $cm->id, $userid);
|
||||
} else {
|
||||
add_to_log($course->id, "wiki", $ewiki_action,
|
||||
"view.php?id=$cm->id&groupid=$groupid&userid=$userid&page=$ewiki_title",
|
||||
format_string($wiki->name,true).": ".$ewiki_title, $cm->id, $userid);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// Print the page header
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue