From 4d37e919ec761a1160bca9a2e204b68745376455 Mon Sep 17 00:00:00 2001 From: Jeffery To Date: Tue, 11 Aug 2009 20:47:41 +0800 Subject: Don't show Search in the primary nav if the user isn't logged in and the site is private --- lib/action.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/action.php b/lib/action.php index 6da9adab5..1bdc4daea 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'); -- cgit v1.2.3-54-g00ecf From fedadd5c5ba52a5a05cf1f621f38ed33807a2c71 Mon Sep 17 00:00:00 2001 From: Jeffery To Date: Tue, 11 Aug 2009 21:00:51 +0800 Subject: Added opensearch to the list of public actions. IE7+ will ask for this (opensearch/people and opensearch/notice) on every page access, and as the content is not sensitive, returning it is better than a 307 redirect. --- index.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/index.php b/index.php index 980b9881b..214f92245 100644 --- a/index.php +++ b/index.php @@ -184,7 +184,8 @@ function main() if (!$user && common_config('site', 'private')) { $public_actions = array('openidlogin', 'finishopenidlogin', - 'recoverpassword', 'api', 'doc'); + 'recoverpassword', 'api', 'doc', + 'opensearch'); $login_action = 'openidlogin'; if (!common_config('site', 'openidonly')) { $public_actions[] = 'login'; -- cgit v1.2.3-54-g00ecf