Manybubbles has uploaded a new change for review.
https://gerrit.wikimedia.org/r/111204
Change subject: Handle space in namespace prefixed searches
......................................................................
Handle space in namespace prefixed searches
MWSearch handles namespace prefixed searches containing spaces so core
should as well.
Bug: 60489
Change-Id: I7e602d005a8b2786942b76b7185882e5107942c4
---
M includes/search/SearchEngine.php
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core
refs/changes/04/111204/1
diff --git a/includes/search/SearchEngine.php b/includes/search/SearchEngine.php
index 4155635..51cc539 100644
--- a/includes/search/SearchEngine.php
+++ b/includes/search/SearchEngine.php
@@ -314,7 +314,7 @@
$this->namespaces = null;
$parsed = substr( $query, strlen( $allkeyword ) );
} elseif ( strpos( $query, ':' ) !== false ) {
- $prefix = substr( $query, 0, strpos( $query, ':' ) );
+ $prefix = str_replace( ' ', '_', substr( $query, 0,
strpos( $query, ':' ) ) );
$index = $wgContLang->getNsIndex( $prefix );
if ( $index !== false ) {
$this->namespaces = array( $index );
--
To view, visit https://gerrit.wikimedia.org/r/111204
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I7e602d005a8b2786942b76b7185882e5107942c4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Manybubbles <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits