]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/searchaction.php
Twitter-compatible API - since_id and before_id were polluting the cache and generati...
[quix0rs-gnu-social.git] / lib / searchaction.php
index 46779bf7acdc63e69484b77e6acda63bf5d5c103..f99883b251ec7ca2eed5044f555155c5f1ed5166 100644 (file)
@@ -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);
        }
 }