From 3506dfa22f941963523fa56e568ec0e756776775 Mon Sep 17 00:00:00 2001 From: Sam Hemelryk Date: Wed, 4 Jan 2012 14:04:57 +0800 Subject: [PATCH] MDL-30608 Blocks: Fixed block disappering from search page --- admin/search.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/admin/search.php b/admin/search.php index 55d93c070af..40fbeb4b56d 100644 --- a/admin/search.php +++ b/admin/search.php @@ -8,7 +8,8 @@ require_once($CFG->libdir.'/adminlib.php'); $query = trim(optional_param('query', '', PARAM_NOTAGS)); // Search string $PAGE->set_context(get_context_instance(CONTEXT_SYSTEM)); -$PAGE->set_course($SITE); + +admin_externalpage_setup('search', '', array('query' => $query)); // now hidden page $adminroot = admin_get_root(); // need all settings here $adminroot->search = $query; // So we can reference it in search boxes later in this invocation @@ -16,8 +17,6 @@ $statusmsg = ''; $errormsg = ''; $focus = ''; -admin_externalpage_setup('search', '', array('query' => $query)); // now hidden page - // now we'll deal with the case that the admin has submitted the form with changed settings if ($data = data_submitted() and confirm_sesskey()) { if (admin_write_settings($data)) {