r52261 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r52260‎ | r52261 | r52262 >
Date:22:12, 21 June 2009
Author:rainman
Status:resolved
Tags:
Comment:
Preserve formatting even when create article link is absent
Modified paths:
  • /trunk/phase3/includes/specials/SpecialSearch.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/specials/SpecialSearch.php
@@ -261,12 +261,15 @@
262262 $wgOut->addHtml( "<div class='searchresults'>" );
263263
264264 // show direct page/create link
265 - if( !is_null($t) && ($this->active=='default' || $this->active=='all') ) {
 265+ if( !is_null($t) && ($this->active=='default' || $this->active=='all') && !$search->isComplexQuery($term) ) {
266266 if( !$t->exists() ) {
267267 $wgOut->addWikiMsg( 'searchmenu-new', wfEscapeWikiText( $t->getPrefixedText() ) );
268268 } else {
269269 $wgOut->addWikiMsg( 'searchmenu-exists', wfEscapeWikiText( $t->getPrefixedText() ) );
270270 }
 271+ } else {
 272+ // preserve the paragraph for margins etc...
 273+ $wgOut->addHTML('<p></p>');
271274 }
272275
273276 // prev/next links

Follow-up revisions

RevisionCommit summaryAuthorDate
r52262Follow-up for r52261, some in-progress stuff sneaked in.rainman22:15, 21 June 2009

Status & tagging log