From e26991ba2609739278c71bea1511e5c86f9f3b18 Mon Sep 17 00:00:00 2001 From: Michael Date: Mon, 3 Jul 2017 20:48:44 +0000 Subject: [PATCH] Guests should be able to use the search as well --- mod/search.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/mod/search.php b/mod/search.php index 3397c813bf..1975a05bf6 100644 --- a/mod/search.php +++ b/mod/search.php @@ -92,12 +92,12 @@ function search_post(App $a) { function search_content(App $a) { - if((get_config('system','block_public')) && (! local_user()) && (! remote_user())) { - notice( t('Public access denied.') . EOL); + if (get_config('system','block_public') && !local_user() && !remote_user()) { + notice(t('Public access denied.') . EOL); return; } - if(get_config('system','local_search') && !local_user()) { + if (get_config('system','local_search') && !local_user() && !remote_user()) { http_status_exit(403, array("title" => t("Public access denied."), "description" => t("Only logged in users are permitted to perform a search."))); @@ -106,7 +106,7 @@ function search_content(App $a) { //return; } - if (get_config('system','permit_crawling') && !local_user()) { + if (get_config('system','permit_crawling') && !local_user() && !remote_user()) { // Default values: // 10 requests are "free", after the 11th only a call per minute is allowed