From c597aba342c2d4bd7ee53dc471d6b7deafb62a5e Mon Sep 17 00:00:00 2001 From: Jeffery To Date: Fri, 9 Oct 2009 11:52:03 +0800 Subject: [PATCH] Fixed facebook connect primary nav to hide search option when site is private and user is not logged in --- plugins/FBConnect/FBConnectPlugin.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/plugins/FBConnect/FBConnectPlugin.php b/plugins/FBConnect/FBConnectPlugin.php index 702aee3496..950718a33c 100644 --- a/plugins/FBConnect/FBConnectPlugin.php +++ b/plugins/FBConnect/FBConnectPlugin.php @@ -318,8 +318,10 @@ class FBConnectPlugin extends Plugin $action->menuItem(common_local_url('doc', array('title' => 'help')), _('Help'), _('Help me!'), false, 'nav_help'); - $action->menuItem(common_local_url('peoplesearch'), - _('Search'), _('Search for people or text'), false, 'nav_search'); + if ($user || !common_config('site', 'private')) { + $action->menuItem(common_local_url('peoplesearch'), + _('Search'), _('Search for people or text'), false, 'nav_search'); + } return false; }