Permalink
Browse files

MDL-31853 Fix pagelayout problem with admin_externalpage_setup

  • Loading branch information...
1 parent 5bbf3cb commit f4a46019ca6cdafea21ab6f8f84e9fa579888037 @davosmith davosmith committed Mar 2, 2012
Showing with 9 additions and 9 deletions.
  1. +9 −9 lib/adminlib.php
View
@@ -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) {

0 comments on commit f4a4601

Please sign in to comment.