]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/searchaction.php
lcase tname
[quix0rs-gnu-social.git] / lib / searchaction.php
index bf598ea93d2f0a7fb6ae9fba94b69fb43e8ee5ac..a7bcf3789d51975c16c03dbefb9cede7134292a9 100644 (file)
@@ -26,7 +26,10 @@ class SearchAction extends Action {
                $this->show_form();
        }
 
-       function show_top($error=NULL) {
+       function show_top($arr=NULL) {
+               if ($arr) {
+                       $error = $arr[1];
+               }
                if ($error) {
                        common_element('p', 'error', $error);
                } else {
@@ -42,13 +45,18 @@ class SearchAction extends Action {
        function get_title() {
                return NULL;
        }
-       
+
+       function show_header($arr) {
+               return;
+       }
+
        function show_form($error=NULL) {
                $q = $this->trimmed('q');
                $page = $this->trimmed('page', 1);
-               
-               common_show_header($this->get_title(), NULL, $error, array($this, 'show_top'));
-               common_element_start('form', array('method' => 'post',
+
+               common_show_header($this->get_title(), array($this, 'show_header'), array($q, $error),
+                                                  array($this, 'show_top'));
+               common_element_start('form', array('method' => 'get',
                                                                                   'id' => 'login',
                                                                                   'action' => common_local_url($this->trimmed('action'))));
                common_element_start('p');
@@ -62,8 +70,8 @@ class SearchAction extends Action {
                                                                          'id' => 'search',
                                                                          'name' => 'search',
                                                                          'class' => 'submit',
-                                                                         'value' => _t('Search')));
-                                          
+                                                                         'value' => _('Search')));
+
                common_element_end('p');
                common_element_end('form');
                if ($q) {
@@ -71,7 +79,7 @@ class SearchAction extends Action {
                }
                common_show_footer();
        }
-       
+
        function search_menu() {
         # action => array('prompt', 'title')
         static $menu =