Preserve formatting even when create article link is absent
authorRobert Stojnić <rainman@users.mediawiki.org>
Sun, 21 Jun 2009 22:12:10 +0000 (22:12 +0000)
committerRobert Stojnić <rainman@users.mediawiki.org>
Sun, 21 Jun 2009 22:12:10 +0000 (22:12 +0000)
includes/specials/SpecialSearch.php

index aa126a9..314aab0 100644 (file)
@@ -261,12 +261,15 @@ class SpecialSearch {
                $wgOut->addHtml( "<div class='searchresults'>" );
                
                // show direct page/create link
-               if( !is_null($t) && ($this->active=='default' || $this->active=='all') ) {
+               if( !is_null($t) && ($this->active=='default' || $this->active=='all')  && !$search->isComplexQuery($term) ) {
                        if( !$t->exists() ) {
                                $wgOut->addWikiMsg( 'searchmenu-new', wfEscapeWikiText( $t->getPrefixedText() ) );
                        } else {
                                $wgOut->addWikiMsg( 'searchmenu-exists', wfEscapeWikiText( $t->getPrefixedText() ) );
                        }
+               } else {
+                       // preserve the paragraph for margins etc...
+                       $wgOut->addHTML('<p></p>');
                }
 
                // prev/next links