From 6c8edbf50e02743de62494207a50bd91e5418469 Mon Sep 17 00:00:00 2001 From: tjones Date: Fri, 25 Sep 2015 13:48:49 -0400 Subject: [PATCH] Add ids to "Did you mean" links so they can be distinguished 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 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/includes/specials/SpecialSearch.php b/includes/specials/SpecialSearch.php index 06cad422b1..d806be3ac6 100644 --- a/includes/specials/SpecialSearch.php +++ b/includes/specials/SpecialSearch.php @@ -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 ); -- 2.20.1