diff options
author | sarven <csarven@plantard.controlezvous.ca> | 2009-01-23 02:43:55 +0000 |
---|---|---|
committer | sarven <csarven@plantard.controlezvous.ca> | 2009-01-23 02:43:55 +0000 |
commit | 8ba19b0686bc4f616e506ab387eb287ae95226df (patch) | |
tree | 06160115a9e52ced2d15bf97a54bebddf2c20d8d /lib/searchgroupnav.php | |
parent | 0daf242100925396aad4cc9fea5de0de2ec98ce8 (diff) | |
parent | ba3b82c5638ba01fa0da6c9025ba2a4b852e66af (diff) |
Merge branch 'master' of ../trunk
Diffstat (limited to 'lib/searchgroupnav.php')
-rw-r--r-- | lib/searchgroupnav.php | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/lib/searchgroupnav.php b/lib/searchgroupnav.php index 2a0f5a6ea..4ea226692 100644 --- a/lib/searchgroupnav.php +++ b/lib/searchgroupnav.php @@ -48,6 +48,7 @@ require_once INSTALLDIR.'/lib/widget.php'; class SearchGroupNav extends Widget { var $action = null; + var $q = null; /** * Construction @@ -55,10 +56,11 @@ class SearchGroupNav extends Widget * @param Action $action current action, used for output */ - function __construct($action=null) + function __construct($action=null, $q = null) { parent::__construct($action); $this->action = $action; + $this->q = $q; } /** @@ -71,9 +73,13 @@ class SearchGroupNav extends Widget { $action_name = $this->action->trimmed('action'); $this->action->elementStart('ul', array('class' => 'nav')); - $this->out->menuItem(common_local_url('peoplesearch'), _('People'), + $args = array(); + if ($this->q) { + $args['q'] = $this->q; + } + $this->out->menuItem(common_local_url('peoplesearch', $args), _('People'), _('Find people on this site'), $action_name == 'peoplesearch', 'nav_search_people'); - $this->out->menuItem(common_local_url('noticesearch'), _('Notice'), + $this->out->menuItem(common_local_url('noticesearch', $args), _('Notice'), _('Find content of notices'), $action_name == 'noticesearch', 'nav_search_notice'); $this->action->elementEnd('ul'); } |