FIX #655 : when user enter an empty search query:
authorAntoine Musso <hashar@users.mediawiki.org>
Tue, 12 Jul 2005 14:57:04 +0000 (14:57 +0000)
committerAntoine Musso <hashar@users.mediawiki.org>
Tue, 12 Jul 2005 14:57:04 +0000 (14:57 +0000)
* show an empty search form
* hide subtitle

RELEASE-NOTES
includes/SpecialSearch.php

index e9ca3b0..2cd3631 100644 (file)
@@ -560,6 +560,7 @@ of MediaWiki:Newpagetext) to &action=edit, if page is new.
 * Add serialized version number to image metadata cache records
 * (bug 2780) Fix thumbnail generation with GD for new image schema
 * (bug 2791) Slovene numeric format
+* (bug 655) Provide empty search form when searching for nothing
 
 === Caveats ===
 
index 0af2925..20948b9 100644 (file)
@@ -134,9 +134,8 @@ class SpecialSearch {
                
                #if ( !$this->parseQuery() ) {
                if( '' === trim( $term ) ) {
-                       $wgOut->addWikiText(
-                               '==' . wfMsg( 'badquery' ) . "==\n" .
-                               wfMsg( 'badquerytext' ) );
+                       $wgOut->setSubtitle( '' );
+                       $wgOut->addHTML( $this->powerSearchBox( $term ) );
                        wfProfileOut( $fname );
                        return;
                }