Merge branch 'MDL-31853_admin_externalpage_setup' of git://github.com/davosmith/moodle

This commit is contained in:
Aparup Banerjee 2012-03-14 09:16:27 +08:00
commit 12b8995749

View File

@ -5792,6 +5792,15 @@ function admin_externalpage_setup($section, $extrabutton = '', array $extraurlpa
$site = get_site();
require_login();
if (!empty($options['pagelayout'])) {
// A specific page layout has been requested.
$PAGE->set_pagelayout($options['pagelayout']);
} else if ($section === 'upgradesettings') {
$PAGE->set_pagelayout('maintenance');
} else {
$PAGE->set_pagelayout('admin');
}
$adminroot = admin_get_root(false, false); // settings not required for external pages
$extpage = $adminroot->locate($section, true);
@ -5806,15 +5815,6 @@ function admin_externalpage_setup($section, $extrabutton = '', array $extraurlpa
die;
}
if (!empty($options['pagelayout'])) {
// A specific page layout has been requested.
$PAGE->set_pagelayout($options['pagelayout']);
} else if ($section === 'upgradesettings') {
$PAGE->set_pagelayout('maintenance');
} else {
$PAGE->set_pagelayout('admin');
}
// $PAGE->set_extra_button($extrabutton); TODO
if (!$actualurl) {