mirror of
https://github.com/moodle/moodle.git
synced 2025-01-31 12:45:04 +01:00
Merge branch 'MDL-31853_admin_externalpage_setup' of git://github.com/davosmith/moodle
This commit is contained in:
commit
12b8995749
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user