]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Add hidden form value when the site is not in fancy mode so the action is not lost
authorMike Cochrane <mikec@mikenz.geek.nz>
Sun, 20 Jul 2008 04:03:51 +0000 (00:03 -0400)
committerMike Cochrane <mikec@mikenz.geek.nz>
Sun, 20 Jul 2008 04:03:51 +0000 (00:03 -0400)
darcs-hash:20080720040351-533db-a0924ce6cd6e472c7001a167ce36452adf99b038.gz

lib/searchaction.php

index a7bcf3789d51975c16c03dbefb9cede7134292a9..729cfe6d402d4f2e9f1da19f8df20fec02c4bd95 100644 (file)
@@ -51,6 +51,8 @@ class SearchAction extends Action {
        }
 
        function show_form($error=NULL) {
+               global $config;
+
                $q = $this->trimmed('q');
                $page = $this->trimmed('page', 1);
 
@@ -60,6 +62,11 @@ class SearchAction extends Action {
                                                                                   'id' => 'login',
                                                                                   'action' => common_local_url($this->trimmed('action'))));
                common_element_start('p');
+               if (!isset($config['site']['fancy']) || !$config['site']['fancy']) {
+                       common_element('input', array('name' => 'action',
+                                                                                 'type' => 'hidden',
+                                                                                 'value' => $this->trimmed('action')));
+               }
                common_element('input', array('name' => 'q',
                                                                          'id' => 'q',
                                                                          'type' => 'text',