search: Fix DYM typos in widget
authorErik Bernhardson <ebernhardson@wikimedia.org>
Thu, 4 Oct 2018 14:44:09 +0000 (07:44 -0700)
committerErik Bernhardson <ebernhardson@wikimedia.org>
Thu, 4 Oct 2018 15:32:16 +0000 (08:32 -0700)
* DYM link was triggering the 'go' feature due to fulltext misspelled
* all ids are of the form mw-search-*, except one. Make it the same
  (WikimediaEvents code was expecting everything to be mw-search-*)

Bug: T206232
Change-Id: Ib91ccf28879b8af2a8c0f2a40b9fe3ec4259a730

includes/widget/search/DidYouMeanWidget.php

index 4e5b76b..135b01d 100644 (file)
@@ -49,7 +49,7 @@ class DidYouMeanWidget {
                        'search' => $resultSet->getQueryAfterRewrite(),
                        // Don't magic this link into a 'go' link, it should always
                        // show search results.
-                       'fultext' => 1,
+                       'fulltext' => 1,
                ];
                $stParams = array_merge( $params, $this->specialSearch->powerSearchOptions() );
 
@@ -67,7 +67,7 @@ class DidYouMeanWidget {
                $original = $linkRenderer->makeKnownLink(
                        $this->specialSearch->getPageTitle(),
                        $term,
-                       [ 'id' => 'mwsearch-DYM-original' ],
+                       [ 'id' => 'mw-search-DYM-original' ],
                        $stParams
                );