* Add a h2 header to the begin of the results
authorRaimond Spekking <raymond@users.mediawiki.org>
Thu, 29 May 2008 10:29:28 +0000 (10:29 +0000)
committerRaimond Spekking <raymond@users.mediawiki.org>
Thu, 29 May 2008 10:29:28 +0000 (10:29 +0000)
* Reduce h2 to h3 for the subheaders (appears in MW standard installations only)
* Looks now better for installations with LuceneSearch too, where a header was missed.
* Improves navigation for screenreaders too (they need headers for a fast navigation by tab)

includes/SpecialSearch.php

index d68ff9a..7b3fcc6 100644 (file)
@@ -205,6 +205,7 @@ class SpecialSearch {
                if($textMatches && !is_null($textMatches->getTotalHits()))
                        $totalNum += $textMatches->getTotalHits();
                if ( $num > 0 ) {
+                       $wgOut->wrapWikiMsg( "==$1==\n", 'searchresults' );
                        if ( $totalNum > 0 ){
                                $top = wfMsgExt('showingresultstotal', array( 'parseinline' ), 
                                        $this->offset+1, $this->offset+$num, $totalNum );
@@ -232,7 +233,7 @@ class SpecialSearch {
 
                if( $titleMatches ) {
                        if( $titleMatches->numRows() ) {
-                               $wgOut->wrapWikiMsg( "==$1==\n", 'titlematches' );
+                               $wgOut->wrapWikiMsg( "===$1===\n", 'titlematches' );
                                $wgOut->addHTML( $this->showMatches( $titleMatches ) );
                        }
                        $titleMatches->free();
@@ -242,7 +243,7 @@ class SpecialSearch {
                        // output appropriate heading
                        if( $textMatches->numRows() ) {
                                if($titleMatches)
-                                       $wgOut->wrapWikiMsg( "==$1==\n", 'textmatches' );
+                                       $wgOut->wrapWikiMsg( "===$1===\n", 'textmatches' );
                                else // if no title matches the heading is redundant
                                        $wgOut->addHTML("<hr/>");                                                               
                        } elseif( $num == 0 ) {