Don't show Search in the primary nav if the user isn't logged in and the site is private

This commit is contained in:
Jeffery To 2009-08-11 20:47:41 +08:00
parent 73cde378c9
commit 4d37e919ec

View File

@ -450,8 +450,10 @@ class Action extends HTMLOutputter // lawsuit
} }
$this->menuItem(common_local_url('doc', array('title' => 'help')), $this->menuItem(common_local_url('doc', array('title' => 'help')),
_('Help'), _('Help me!'), false, 'nav_help'); _('Help'), _('Help me!'), false, 'nav_help');
$this->menuItem(common_local_url('peoplesearch'), if ($user || !common_config('site', 'private')) {
_('Search'), _('Search for people or text'), false, 'nav_search'); $this->menuItem(common_local_url('peoplesearch'),
_('Search'), _('Search for people or text'), false, 'nav_search');
}
Event::handle('EndPrimaryNav', array($this)); Event::handle('EndPrimaryNav', array($this));
} }
$this->elementEnd('ul'); $this->elementEnd('ul');