Index: trunk/phase3/includes/Wiki.php |
— | — | @@ -118,16 +118,14 @@ |
119 | 119 | */ |
120 | 120 | function preliminaryChecks ( &$title, &$output, $request ) { |
121 | 121 | |
122 | | - # Debug statement for user levels |
123 | | - // print_r($wgUser); |
124 | | - |
125 | | - $search = $request->getText( 'search' ); |
126 | | - if( !is_null( $search ) && $search !== '' ) { |
| 122 | + if( $request->getCheck( 'search' ) ) { |
127 | 123 | // Compatibility with old search URLs which didn't use Special:Search |
| 124 | + // Just check for presence here, so blank requests still |
| 125 | + // show the search page when using ugly URLs (bug 8054). |
| 126 | + |
128 | 127 | // Do this above the read whitelist check for security... |
129 | 128 | $title = SpecialPage::getTitleFor( 'Search' ); |
130 | 129 | } |
131 | | - $this->setVal( 'Search', $search ); |
132 | 130 | |
133 | 131 | # If the user is not logged in, the Namespace:title of the article must be in |
134 | 132 | # the Read array in order for the user to see it. (We have to check here to |
— | — | @@ -147,13 +145,8 @@ |
148 | 146 | global $wgRequest; |
149 | 147 | wfProfileIn( 'MediaWiki::initializeSpecialCases' ); |
150 | 148 | |
151 | | - $search = $this->getVal('Search'); |
152 | 149 | $action = $this->getVal('Action'); |
153 | | - if( !$this->getVal('DisableInternalSearch') && !is_null( $search ) && $search !== '' ) { |
154 | | - require_once( 'includes/SpecialSearch.php' ); |
155 | | - $title = SpecialPage::getTitleFor( 'Search' ); |
156 | | - wfSpecialSearch(); |
157 | | - } else if( !$title or $title->getDBkey() == '' ) { |
| 150 | + if( !$title or $title->getDBkey() == '' ) { |
158 | 151 | $title = SpecialPage::getTitleFor( 'Badtitle' ); |
159 | 152 | # Die now before we mess up $wgArticle and the skin stops working |
160 | 153 | throw new ErrorPageError( 'badtitle', 'badtitletext' ); |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -309,6 +309,7 @@ |
310 | 310 | * (bug 4650) Keep impossibly large/small counts off Special:Statistics |
311 | 311 | * (bug 10608) PHP notice when installing with PostgreSQL |
312 | 312 | * (bug 10615) Fix for transwiki import when CURL not available |
| 313 | +* (bug 8054) Return search page for empty search requests with ugly URLs |
313 | 314 | |
314 | 315 | |
315 | 316 | == API changes since 1.10 == |