EBernhardson has uploaded a new change for review.
https://gerrit.wikimedia.org/r/294085
Change subject: search: did you mean should always go to SERP
......................................................................
search: did you mean should always go to SERP
Did you mean had an odd inconcistency, where if you came to
Special:Search from autocomplete and click a did you mean link to an
exact title match, you would be sent to the page rather than a results
page. This seems odd and inconsistent, so always provide the 'fulltext'
parameter to disable the 'go' feature.
Change-Id: I8c80505053cd04b67afbe2139415fb0a44d954b4
---
M includes/specials/SpecialSearch.php
1 file changed, 6 insertions(+), 2 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core
refs/changes/85/294085/1
diff --git a/includes/specials/SpecialSearch.php
b/includes/specials/SpecialSearch.php
index b98ddda1..a779b66 100644
--- a/includes/specials/SpecialSearch.php
+++ b/includes/specials/SpecialSearch.php
@@ -485,7 +485,9 @@
protected function getDidYouMeanHtml( SearchResultSet $textMatches ) {
# mirror Go/Search behavior of original request ..
$params = [ 'search' => $textMatches->getSuggestionQuery() ];
- if ( $this->fulltext != null ) {
+ if ( $this->fulltext === null ) {
+ $params['fulltext'] = 'Search';
+ } else {
$params['fulltext'] = $this->fulltext;
}
$stParams = array_merge( $params, $this->powerSearchOptions() );
@@ -519,7 +521,9 @@
// Search instead for '$orig'
$params = [ 'search' => $textMatches->getQueryAfterRewrite() ];
- if ( $this->fulltext != null ) {
+ if ( $this->fulltext === null ) {
+ $params['fulltext'] = 'Search';
+ } else {
$params['fulltext'] = $this->fulltext;
}
$stParams = array_merge( $params, $this->powerSearchOptions() );
--
To view, visit https://gerrit.wikimedia.org/r/294085
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I8c80505053cd04b67afbe2139415fb0a44d954b4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: EBernhardson <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits