MDL-21233 moodle_url improvemewnts, code simplification, more diagnostics; fixed several regressions

This commit is contained in:
Petr Skoda
2010-01-16 15:39:56 +00:00
parent 5192a212f8
commit a685593466
424 changed files with 955 additions and 906 deletions
+3 -3
View File
@@ -28,7 +28,7 @@ require_once('../config.php');
$userid = optional_param('id', $USER->id, PARAM_INT); // user id
$course = optional_param('course', SITEID, PARAM_INT); // course id (defaults to Site)
$url = new moodle_url($CFG->wwwroot.'/message/edit.php');
$url = new moodle_url('/message/edit.php');
if ($userid !== $USER->id) {
$url->param('id', $userid);
}
@@ -173,9 +173,9 @@ $userfullname = fullname($user, true);
if (has_capability('moodle/course:viewparticipants', $coursecontext) ||
has_capability('moodle/site:viewparticipants', $systemcontext)) {
$PAGE->navbar->add($strparticipants, new moodle_url($CFG->wwwroot.'/message/index.php', array('id'=>$course->id)));
$PAGE->navbar->add($strparticipants, new moodle_url('/message/index.php', array('id'=>$course->id)));
}
$PAGE->navbar->add($userfullname, new moodle_url($CFG->wwwroot.'/user/view.php', array('id'=>$user->id, 'course'=>$course->id)));
$PAGE->navbar->add($userfullname, new moodle_url('/user/view.php', array('id'=>$user->id, 'course'=>$course->id)));
$PAGE->navbar->add($streditmymessage);
$PAGE->set_title("$course->shortname: $streditmymessage");
if ($course->id != SITEID) {