Skip to content

Commit

Permalink
MDL-30608 Blocks: Fixed block disappering from search page
Browse files Browse the repository at this point in the history
  • Loading branch information
Sam Hemelryk authored and Rajesh Taneja committed Jan 9, 2012
1 parent 0e84b16 commit 3506dfa
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions admin/search.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,15 @@
$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
$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)) {
Expand Down

0 comments on commit 3506dfa

Please sign in to comment.