From 3ed4c9939885cfcef2659a0d9ade3018a56f02de Mon Sep 17 00:00:00 2001 From: Raimond Spekking Date: Thu, 29 May 2008 10:29:28 +0000 Subject: [PATCH] * Add a h2 header to the begin of the results * 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 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/includes/SpecialSearch.php b/includes/SpecialSearch.php index d68ff9a8fd..7b3fcc630d 100644 --- a/includes/SpecialSearch.php +++ b/includes/SpecialSearch.php @@ -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("
"); } elseif( $num == 0 ) { -- 2.20.1