Remove useless comments from search output
authorChad Horohoe <chadh@wikimedia.org>
Tue, 22 Apr 2014 08:52:11 +0000 (01:52 -0700)
committerChad Horohoe <chadh@wikimedia.org>
Tue, 22 Apr 2014 08:52:12 +0000 (01:52 -0700)
They show up when results are broken, but it's better to skip
the broken result entirely and not put in a pointless comment.

Change-Id: I691b04f31e2e439f9481c954f177e21b7f80ca2c

includes/specials/SpecialSearch.php

index 61bb1cd..0c4252e 100644 (file)
@@ -551,7 +551,7 @@ class SpecialSearch extends SpecialPage {
                $profile = new ProfileSection( __METHOD__ );
 
                if ( $result->isBrokenTitle() ) {
-                       return "<!-- Broken link in search result -->\n";
+                       return '';
                }
 
                $title = $result->getTitle();
@@ -583,7 +583,7 @@ class SpecialSearch extends SpecialPage {
                // The least confusing at this point is to drop the result.
                // You may get less results, but... oh well. :P
                if ( $result->isMissingRevision() ) {
-                       return "<!-- missing page " . htmlspecialchars( $title->getPrefixedText() ) . "-->\n";
+                       return '';
                }
 
                // format redirects / relevant sections
@@ -783,7 +783,7 @@ class SpecialSearch extends SpecialPage {
                $profile = new ProfileSection( __METHOD__ );
 
                if ( $result->isBrokenTitle() ) {
-                       return "<!-- Broken link in search result -->\n";
+                       return '';
                }
 
                $title = $result->getTitle();