* Special:Search: Add CSS classes to 'none found' and 'create link' messages
authorRaimond Spekking <raymond@users.mediawiki.org>
Thu, 4 Nov 2010 11:06:51 +0000 (11:06 +0000)
committerRaimond Spekking <raymond@users.mediawiki.org>
Thu, 4 Nov 2010 11:06:51 +0000 (11:06 +0000)
RELEASE-NOTES
includes/specials/SpecialSearch.php

index 6a412f9..192d21d 100644 (file)
@@ -198,6 +198,7 @@ LocalSettings.php. The specific bugs are listed below in the general notes.
 * (bug 17394) Make installer check for latest version against MediaWiki.org
 * (bug 20627) Installer should be in languages other than English
 * Support for metadata in SVG files (title, description).
+* Special:Search: Add CSS classes to 'none found' and 'create link' messages
 
 === Bug fixes in 1.17 ===
 * (bug 17560) Half-broken deletion moved image files to deletion archive
index e573b87..e681984 100644 (file)
@@ -302,7 +302,8 @@ class SpecialSearch {
                        $textMatches->free();
                }
                if( $num === 0 ) {
-                       $wgOut->addWikiMsg( 'search-nonefound', wfEscapeWikiText( $term ) );
+                       #$wgOut->addWikiMsg( 'search-nonefound', wfEscapeWikiText( $term ) );
+                       $wgOut->wrapWikiMsg( "<p class=\"mw-search-nonefound\">\n$1</p>", array( 'search-nonefound', wfEscapeWikiText( $term ) ) );
                        $this->showCreateLink( $t );
                }
                $wgOut->addHtml( "</div>" );
@@ -328,7 +329,7 @@ class SpecialSearch {
                        }
                } 
                if( $messageName ) {
-                       $wgOut->addWikiMsg( $messageName, wfEscapeWikiText( $t->getPrefixedText() ) );
+                       $wgOut->wrapWikiMsg( "<p class=\"mw-search-createlink\">\n$1</p>", array( $messageName, wfEscapeWikiText( $t->getPrefixedText() ) ) );
                } else {
                        // preserve the paragraph for margins etc...
                        $wgOut->addHtml( '<p></p>' );