Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

MDL-31853 Fix pagelayout problem with admin_externalpage_setup

  • Loading branch information...
commit 7f40235c186634b161d0464d32ff6f58e71c050a 1 parent da9cfb9
@davosmith davosmith authored nebgor committed
Showing with 9 additions and 9 deletions.
  1. +9 −9 lib/adminlib.php
View
18 lib/adminlib.php
@@ -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) {
Please sign in to comment.
Something went wrong with that request. Please try again.