Index: branches/wmf-deployment/includes/specials/SpecialSearch.php |
— | — | @@ -261,6 +261,8 @@ |
262 | 262 | |
263 | 263 | // prev/next links |
264 | 264 | if( $num || $this->offset ) { |
| 265 | + // Show the create link ahead |
| 266 | + $this->showCreateLink( $t ); |
265 | 267 | $prevnext = wfViewPrevNext( $this->offset, $this->limit, |
266 | 268 | SpecialPage::getTitleFor( 'Search' ), |
267 | 269 | wfArrayToCGI( $this->powerSearchOptions(), array( 'search' => $term ) ), |
— | — | @@ -301,8 +303,22 @@ |
302 | 304 | } |
303 | 305 | if( $num === 0 ) { |
304 | 306 | $wgOut->addWikiMsg( 'search-nonefound', wfEscapeWikiText( $term ) ); |
| 307 | + $this->showCreateLink( $t ); |
305 | 308 | } |
| 309 | + $wgOut->addHtml( "</div>" ); |
| 310 | + if( $num === 0 ) { |
| 311 | + $wgOut->addHTML( $this->searchFocus() ); |
| 312 | + } |
306 | 313 | |
| 314 | + if( $num || $this->offset ) { |
| 315 | + $wgOut->addHTML( "<p class='mw-search-pager-bottom'>{$prevnext}</p>\n" ); |
| 316 | + } |
| 317 | + wfProfileOut( __METHOD__ ); |
| 318 | + } |
| 319 | + |
| 320 | + protected function showCreateLink( $t ) { |
| 321 | + global $wgOut; |
| 322 | + |
307 | 323 | // show direct page/create link |
308 | 324 | if( !is_null($t) ) { |
309 | 325 | if( !$t->exists() ) { |
— | — | @@ -314,15 +330,6 @@ |
315 | 331 | // preserve the paragraph for margins etc... |
316 | 332 | $wgOut->addHTML('<p></p>'); |
317 | 333 | } |
318 | | - $wgOut->addHtml( "</div>" ); |
319 | | - if( $num === 0 ) { |
320 | | - $wgOut->addHTML( $this->searchFocus() ); |
321 | | - } |
322 | | - |
323 | | - if( $num || $this->offset ) { |
324 | | - $wgOut->addHTML( "<p class='mw-search-pager-bottom'>{$prevnext}</p>\n" ); |
325 | | - } |
326 | | - wfProfileOut( __METHOD__ ); |
327 | 334 | } |
328 | 335 | |
329 | 336 | /** |