Add ids to "Did you mean" links so they can be distinguished
authortjones <tjones@wikimedia.org>
Fri, 25 Sep 2015 17:48:49 +0000 (13:48 -0400)
committertjones <tjones@wikimedia.org>
Fri, 25 Sep 2015 18:48:19 +0000 (14:48 -0400)
Add  distinct labels on the did-you-mean suggestion elements
so anyone who wants to detect or identify them can.

Bug: T110359
Change-Id: I77048275063afe1e6e2f4f87eb91ad3576f49a07

includes/specials/SpecialSearch.php

index 06cad42..d806be3 100644 (file)
@@ -436,7 +436,7 @@ class SpecialSearch extends SpecialPage {
                $suggest = Linker::linkKnown(
                        $this->getPageTitle(),
                        $textMatches->getSuggestionSnippet() ?: null,
-                       array(),
+                       array( 'id' => 'mw-search-DYM-suggestion' ),
                        $stParams
                );
 
@@ -470,7 +470,7 @@ class SpecialSearch extends SpecialPage {
                $rewritten = Linker::linkKnown(
                        $this->getPageTitle(),
                        $textMatches->getQueryAfterRewriteSnippet() ?: null,
-                       array(),
+                       array( 'id' => 'mw-search-DYM-rewritten' ),
                        $stParams
                );
 
@@ -479,7 +479,7 @@ class SpecialSearch extends SpecialPage {
                $original = Linker::linkKnown(
                        $this->getPageTitle(),
                        htmlspecialchars( $term ),
-                       array(),
+                       array( 'id' => 'mw-search-DYM-original' ),
                        $stParams
                );