Skip to content

Commit

Permalink
Merge branch 'MDL-31853_admin_externalpage_setup' of git://github.com…
Browse files Browse the repository at this point in the history
…/davosmith/moodle
  • Loading branch information
Aparup Banerjee committed Mar 14, 2012
2 parents 772685e + f4a4601 commit 12b8995
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions lib/adminlib.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);

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

0 comments on commit 12b8995

Please sign in to comment.