]> git.mjollnir.org Git - moodle.git/commitdiff
course MDL-19794: Fix more initialisation order problems
authortjhunt <tjhunt>
Tue, 28 Jul 2009 04:16:59 +0000 (04:16 +0000)
committertjhunt <tjhunt>
Tue, 28 Jul 2009 04:16:59 +0000 (04:16 +0000)
course/category.php
course/search.php

index 3b49668a312c4148e093779545ca26d19655cb64..606654e7b54cb46c21dac5f2e289d1b9e8b5d7c0 100644 (file)
 
     print_course_search();
 
-    if ($editingon && update_category_button()) {
-        admin_externalpage_print_footer();
-    } else {
-        print_footer();
-    }
+    print_footer();
 
-?>
index 76f14a0dfc3ab1da06c85a0f8d8a11878ad369af..3089a06bf29d46f6cc1e97cacb5377db06351973 100644 (file)
 
     $site = get_site();
 
+    $urlparams = array();
+    foreach (array('search', 'page', 'blocklist', 'modulelist') as $param) {
+        if (!empty($$param)) {
+            $urlparams[$param] = $$param;
+        }
+    }
+    if ($perpage != 10) {
+        $urlparams['perpage'] = $perpage;
+    }
+    $PAGE->set_url('course/search.php', $urlparams);
+    $PAGE->set_context(get_context_instance(CONTEXT_SYSTEM));
+
     if ($CFG->forcelogin) {
         require_login();
     }
 
-    if (update_category_button()) {
+    if (can_edit_in_category()) {
         if ($edit !== -1) {
             $USER->editing = $edit;
         }