MDL-32564 fix admin/timezone.php page setup
authorPetr Skoda <commits@skodak.org>
Sun, 13 May 2012 20:31:29 +0000 (22:31 +0200)
committerPetr Skoda <commits@skodak.org>
Sat, 19 May 2012 16:52:58 +0000 (18:52 +0200)
admin/timezone.php

index 34e1fa4..e031be4 100644 (file)
@@ -9,6 +9,9 @@
          $zone = clean_param($zone, PARAM_PATH);
     }
 
+    $PAGE->set_url('/admin/timezone.php');
+    $PAGE->set_context(context_system::instance());
+
     require_login();
 
     require_capability('moodle/site:config', get_context_instance(CONTEXT_SYSTEM));
@@ -18,7 +21,6 @@
     $strusers = get_string("users");
     $strall = get_string("all");
 
-    $PAGE->set_url('/admin/timezone.php');
     $PAGE->set_title($strtimezone);
     $PAGE->set_heading($strtimezone);
     $PAGE->navbar->add($strtimezone);