X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Fsearchgroupnav.php;h=4ea2266926e3aff115d8f65c9b5f43ef88ff509a;hb=3af566d1ecb5793324f7395ebec254848c47df09;hp=8ca5dd20092e9a840552b934b9dfdaf303476eb8;hpb=9e9b8349a2d32ae664a5b000ef34a7bb13a039f5;p=quix0rs-gnu-social.git diff --git a/lib/searchgroupnav.php b/lib/searchgroupnav.php index 8ca5dd2009..4ea2266926 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('people'), _('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('notice'), _('Notice'), + $this->out->menuItem(common_local_url('noticesearch', $args), _('Notice'), _('Find content of notices'), $action_name == 'noticesearch', 'nav_search_notice'); $this->action->elementEnd('ul'); }