fix directory leaking to ppl which aint got zot in searchbar-autocomplete if block_public is enabled

This commit is contained in:
marijus 2013-11-09 17:56:19 +01:00
parent b54858d35f
commit 3fbf78a859
2 changed files with 10 additions and 1 deletions

View File

@ -228,6 +228,10 @@ function navbar_complete(&$a) {
// logger('navbar_complete');
if((get_config('system','block_public')) && (! local_user()) && (! remote_user())) {
return login();
}
$dirmode = intval(get_config('system','directory_mode'));
$search = ((x($_REQUEST,'query')) ? htmlentities($_REQUEST['query'],ENT_COMPAT,'UTF-8',false) : '');
if(! $search || mb_strlen($search) < 2)
@ -278,4 +282,4 @@ function navbar_complete(&$a) {
}
}
return array();
}
}

View File

@ -14,6 +14,11 @@ function directory_aside(&$a) {
require_once('include/contact_widgets.php');
$a->set_widget('find_people',findpeople_widget());
}
if((get_config('system','block_public')) && (! local_user()) && (! remote_user())) {
return;
}
$a->set_widget('dir_sort_order',dir_sort_links());
}