Stop Google DDoSing me by providing block_public_search, which unlike

block_public will block *only* searching without an observer.
This commit is contained in:
Thomas Willingham 2014-01-19 23:48:26 +00:00
parent 3459c717d4
commit e9ce68559e

View File

@ -8,11 +8,12 @@ function search_init(&$a) {
function search_content(&$a,$update = 0, $load = false) {
if((get_config('system','block_public')) && (! local_user()) && (! remote_user())) {
notice( t('Public access denied.') . EOL);
if((get_config('system','block_public')) || (get_config('system','block_public_search'))) {
if ((! local_user()) && (! remote_user())) {
notice( t('Public access denied.') . EOL);
return;
}
}
nav_set_selected('search');
require_once("include/bbcode.php");