From: Jeffery To Date: Tue, 11 Aug 2009 12:47:41 +0000 (+0800) Subject: Don't show Search in the primary nav if the user isn't logged in and the site is... X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=4d37e919ec761a1160bca9a2e204b68745376455;p=quix0rs-gnu-social.git Don't show Search in the primary nav if the user isn't logged in and the site is private --- diff --git a/lib/action.php b/lib/action.php index 6da9adab57..1bdc4daea7 100644 --- a/lib/action.php +++ b/lib/action.php @@ -450,8 +450,10 @@ class Action extends HTMLOutputter // lawsuit } $this->menuItem(common_local_url('doc', array('title' => 'help')), _('Help'), _('Help me!'), false, 'nav_help'); - $this->menuItem(common_local_url('peoplesearch'), - _('Search'), _('Search for people or text'), false, 'nav_search'); + if ($user || !common_config('site', 'private')) { + $this->menuItem(common_local_url('peoplesearch'), + _('Search'), _('Search for people or text'), false, 'nav_search'); + } Event::handle('EndPrimaryNav', array($this)); } $this->elementEnd('ul');