From: Aaron Schulz Date: Wed, 19 Nov 2008 00:19:25 +0000 (+0000) Subject: * Remove
X-Git-Tag: 1.31.0-rc.0~44270 X-Git-Url: http://git.cyclocoop.org/url?a=commitdiff_plain;h=a62f1dc4d812b166a04f2c1890724e57a82a30bb;p=lhc%2Fweb%2Fwiklou.git * Remove
* Use count variables since they are already there --- diff --git a/includes/specials/SpecialSearch.php b/includes/specials/SpecialSearch.php index 7b5a533490..f15ada498a 100644 --- a/includes/specials/SpecialSearch.php +++ b/includes/specials/SpecialSearch.php @@ -254,7 +254,7 @@ class SpecialSearch { $wgOut->addHtml( "
" ); if( $titleMatches ) { - if( $titleMatches->numRows() ) { + if( $numTitleMatches > 0 ) { $wgOut->wrapWikiMsg( "==$1==\n", 'titlematches' ); $wgOut->addHTML( $this->showMatches( $titleMatches ) ); } @@ -263,11 +263,9 @@ class SpecialSearch { if( $textMatches ) { // output appropriate heading - if( $textMatches->numRows() ) { - if($titleMatches) - $wgOut->wrapWikiMsg( "==$1==\n", 'textmatches' ); - else // if no title matches the heading is redundant - $wgOut->addHTML("
"); + if( $numTextMatches > 0 && $numTitleMatches > 0 ) { + // if no title matches the heading is redundant + $wgOut->wrapWikiMsg( "==$1==\n", 'textmatches' ); } elseif( $num == 0 ) { # Don't show the 'no text matches' if we received title matches $wgOut->wrapWikiMsg( "==$1==\n", 'notextmatches' ); @@ -276,7 +274,7 @@ class SpecialSearch { if( $textMatches->hasInterwikiResults() ) $wgOut->addHTML( $this->showInterwiki( $textMatches->getInterwikiResults(), $term )); // show results - if( $textMatches->numRows() ) + if( $numTextMatches > 0 ) $wgOut->addHTML( $this->showMatches( $textMatches ) ); $textMatches->free();