From 97bc06d2ee29b42a3009a2bf4c57ebd71e63cf0e Mon Sep 17 00:00:00 2001 From: Mike Cochrane Date: Sun, 20 Jul 2008 06:56:59 -0400 Subject: gettext strings and pass the query string between tabs http://laconi.ca/PITS/00231 darcs-hash:20080720105659-533db-35a71fab668a7ea692f7b51557b4f84addb796bb.gz --- lib/searchaction.php | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) (limited to 'lib/searchaction.php') diff --git a/lib/searchaction.php b/lib/searchaction.php index 46779bf7a..c0eab7d24 100644 --- a/lib/searchaction.php +++ b/lib/searchaction.php @@ -92,14 +92,19 @@ class SearchAction extends Action { } function search_menu() { - # action => array('prompt', 'title') - static $menu = - array('peoplesearch' => - array('People', - 'Find people on this site'), - 'noticesearch' => - array('Text', - 'Find content of notices')); + # action => array('prompt', 'title', $args) + $action = $this->trimmed('action'); + $menu = + array('peoplesearch' => + array( + _('People'), + _('Find people on this site'), + ($action != 'peoplesearch' && $this->trimmed('q')) ? array('q' => $this->trimmed('q')) : NULL), + 'noticesearch' => + array( _('Text'), + _('Find content of notices'), + ($action != 'noticesearch' && $this->trimmed('q')) ? array('q' => $this->trimmed('q')) : NULL) + ); $this->nav_menu($menu); } } -- cgit v1.2.3-54-g00ecf