Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Avoid $_REQUEST["id"] usage. MDL-14806 ; backported from 19_STABLE

  • Loading branch information...
commit 7658e249155a33142445f9b6ae5b7328e49ea378 1 parent 60ec12e
stronk7 authored
Showing with 1 addition and 9 deletions.
  1. +1 −9 mod/wiki/view.php
View
10 mod/wiki/view.php
@@ -44,8 +44,6 @@
if (! $cm = get_coursemodule_from_instance("wiki", $wiki->id, $course->id)) {
error("Course Module ID was incorrect");
}
- $id = $cm->id;
- $_REQUEST["id"] = $id;
}
require_course_login($course, true, $cm);
@@ -56,9 +54,6 @@
/// Default format:
$moodle_format=FORMAT_MOODLE;
- ### SAVE ID from Moodle
- $moodleID=@$_REQUEST["id"];
-
/// Globally disable CamelCase, if the option is selected for this wiki.
$moodle_disable_camel_case = ($wiki->disablecamelcase == 1);
@@ -98,7 +93,7 @@
/// Build the ewsiki script constant
/// ewbase will also be needed by EWIKI_SCRIPT_BINARY
- $ewbase = 'view.php?id='.$moodleID;
+ $ewbase = 'view.php?id='.$cm->id;
if (isset($userid) && $userid!=0) $ewbase .= '&userid='.$userid;
if (isset($groupid) && $groupid!=0) $ewbase .= '&groupid='.$groupid;
$ewscript = $ewbase.'&page=';
@@ -207,9 +202,6 @@
$content=ewiki_page($page);
$content2='';
- ### RESTORE ID from Moodle
- $_REQUEST["id"]=$moodleID;
- $id=$moodleID;
/// ################# EWIKI Part ###########################
}
else {
Please sign in to comment.
Something went wrong with that request. Please try again.