MDL-31853 Fix pagelayout problem with admin_externalpage_setup

This commit is contained in:
Davo Smith
2012-03-02 16:12:45 +00:00
parent 5bbf3cb72b
commit f4a46019ca
+9 -9
View File
@@ -5811,6 +5811,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);
@@ -5825,15 +5834,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) {