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:
parent
3459c717d4
commit
e9ce68559e
@ -8,11 +8,12 @@ function search_init(&$a) {
|
|||||||
|
|
||||||
function search_content(&$a,$update = 0, $load = false) {
|
function search_content(&$a,$update = 0, $load = false) {
|
||||||
|
|
||||||
if((get_config('system','block_public')) && (! local_user()) && (! remote_user())) {
|
if((get_config('system','block_public')) || (get_config('system','block_public_search'))) {
|
||||||
notice( t('Public access denied.') . EOL);
|
if ((! local_user()) && (! remote_user())) {
|
||||||
|
notice( t('Public access denied.') . EOL);
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
nav_set_selected('search');
|
nav_set_selected('search');
|
||||||
|
|
||||||
require_once("include/bbcode.php");
|
require_once("include/bbcode.php");
|
||||||
|
Reference in New Issue
Block a user