MDL-28187 message: fixed up $PAGE->set_url() in /message/index.php so the nav highlig...
authorAndrew Davis <andrew@moodle.com>
Thu, 8 Mar 2012 07:45:45 +0000 (14:45 +0700)
committerAndrew Davis <andrew@moodle.com>
Sat, 17 Mar 2012 04:41:06 +0000 (11:41 +0700)
message/edit.php

index 9cabdc2..c0b2cb4 100644 (file)
@@ -30,12 +30,9 @@ $course = optional_param('course', SITEID, PARAM_INT);   // course id (defaults
 $disableall = optional_param('disableall', 0, PARAM_BOOL); //disable all of this user's notifications
 
 $url = new moodle_url('/message/edit.php');
 $disableall = optional_param('disableall', 0, PARAM_BOOL); //disable all of this user's notifications
 
 $url = new moodle_url('/message/edit.php');
-if ($userid !== $USER->id) {
-    $url->param('id', $userid);
-}
-if ($course != SITEID) {
-    $url->param('course', $course);
-}
+$url->param('id', $userid);
+$url->param('course', $course);
+
 $PAGE->set_url($url);
 
 if (!$course = $DB->get_record('course', array('id' => $course))) {
 $PAGE->set_url($url);
 
 if (!$course = $DB->get_record('course', array('id' => $course))) {