Merge branch 'w11_MDL-31534_m23_pageinitroot' of git://github.com/skodak/moodle

This commit is contained in:
Eloy Lafuente (stronk7) 2012-03-12 15:49:04 +01:00
commit ccd7a793ee

View File

@ -34,6 +34,13 @@
redirect_if_major_upgrade_required();
$urlparams = array();
if ($CFG->defaulthomepage == HOMEPAGE_MY && optional_param('redirect', 1, PARAM_BOOL) === 0) {
$urlparams['redirect'] = 0;
}
$PAGE->set_url('/', $urlparams);
$PAGE->set_course($SITE);
if ($CFG->forcelogin) {
require_login();
} else {
@ -42,13 +49,6 @@
$hassiteconfig = has_capability('moodle/site:config', get_context_instance(CONTEXT_SYSTEM));
$urlparams = array();
if ($CFG->defaulthomepage == HOMEPAGE_MY && optional_param('redirect', 1, PARAM_BOOL) === 0) {
$urlparams['redirect'] = 0;
}
$PAGE->set_url('/', $urlparams);
$PAGE->set_course($SITE);
/// If the site is currently under maintenance, then print a message
if (!empty($CFG->maintenance_enabled) and !$hassiteconfig) {
print_maintenance_message();