Navigation Menu

Skip to content

Commit

Permalink
MDL-31853 Fix pagelayout problem with admin_externalpage_setup
Browse files Browse the repository at this point in the history
  • Loading branch information
davosmith authored and Aparup Banerjee committed Mar 14, 2012
1 parent 9086379 commit 4850ab6
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions lib/adminlib.php
Expand Up @@ -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);

Expand All @@ -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) {
Expand Down

0 comments on commit 4850ab6

Please sign in to comment.