MDL-31853 Fix pagelayout problem with admin_externalpage_setup
This commit is contained in:
committed by
Aparup Banerjee
parent
9086379bb7
commit
4850ab676c
+9
-9
@@ -5787,6 +5787,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);
|
||||
|
||||
@@ -5801,15 +5810,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) {
|
||||
|
||||
Reference in New Issue
Block a user