Skip to content

Commit

Permalink
global search MDL-25099 locking the global search block to 'hidden' w…
Browse files Browse the repository at this point in the history
…hen feature is disabled in experimental settings.
  • Loading branch information
nebgor committed Nov 10, 2010
1 parent cff76c3 commit a6f4018
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions admin/settings/development.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,14 @@
$ADMIN->add('development', new admin_externalpage('mnettestclient', get_string('testclient', 'mnet'), "$CFG->wwwroot/$CFG->admin/mnet/testclient.php"));
}

// lock block to hidden if global search is disabled.
if ($CFG->enableglobalsearch != 1) {
//get the one block.
if (!$block = $DB->get_record('block', array('name'=>'search'))) {
print_error('blockdoesnotexist', 'error');
}
$DB->set_field('block', 'visible', '0', array('id'=>$block->id)); // Hide block
}

$ADMIN->add('development', new admin_externalpage('purgecaches', get_string('purgecaches','admin'), "$CFG->wwwroot/$CFG->admin/purgecaches.php"));
} // end of speedup

0 comments on commit a6f4018

Please sign in to comment.