Revision: 43696
Author:   aaron
Date:     2008-11-19 00:19:25 +0000 (Wed, 19 Nov 2008)

Log Message:
-----------
* Remove <hr/>
* Use count variables since they are already there

Modified Paths:
--------------
    trunk/phase3/includes/specials/SpecialSearch.php

Modified: trunk/phase3/includes/specials/SpecialSearch.php
===================================================================
--- trunk/phase3/includes/specials/SpecialSearch.php    2008-11-19 00:11:14 UTC 
(rev 43695)
+++ trunk/phase3/includes/specials/SpecialSearch.php    2008-11-19 00:19:25 UTC 
(rev 43696)
@@ -254,7 +254,7 @@
                $wgOut->addHtml( "<div class='searchresults'>" );
 
                if( $titleMatches ) {
-                       if( $titleMatches->numRows() ) {
+                       if( $numTitleMatches > 0 ) {
                                $wgOut->wrapWikiMsg( "==$1==\n", 'titlematches' 
);
                                $wgOut->addHTML( $this->showMatches( 
$titleMatches ) );
                        }
@@ -263,11 +263,9 @@
 
                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("<hr/>");               
                                                
+                       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 @@
                        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();



_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to