Gerrit Patch Uploader has uploaded a new change for review.
https://gerrit.wikimedia.org/r/175394
Change subject: Add search suggestions for Special:MovePage/*
......................................................................
Add search suggestions for Special:MovePage/*
* Implements prefixSearchSubpages()
Change-Id: I73f4d37fe4ca72f614491fffb1168676b6804fbf
---
M includes/specials/SpecialMovepage.php
1 file changed, 15 insertions(+), 0 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core
refs/changes/94/175394/1
diff --git a/includes/specials/SpecialMovepage.php
b/includes/specials/SpecialMovepage.php
index 4cbf584..c96ad54 100644
--- a/includes/specials/SpecialMovepage.php
+++ b/includes/specials/SpecialMovepage.php
@@ -783,6 +783,21 @@
$out->addHTML( "</ul>\n" );
}
+ /**
+ * Return an array of subpages beginning with $search that this special
page will accept.
+ *
+ * @param string $search Prefix to search for
+ * @param int $limit Maximum number of results to return
+ * @return string[] Matching subpages
+ */
+ public function prefixSearchSubpages( $search, $limit = 10 ) {
+ if ( $search === '' ) {
+ return array( Title::newMainPage()->getPrefixedText() );
+ }
+ // Autocomplete subpage the same as a normal search
+ return PrefixSearch::titleSearch( $search, $limit );
+ }
+
protected function getGroupName() {
return 'pagetools';
}
--
To view, visit https://gerrit.wikimedia.org/r/175394
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I73f4d37fe4ca72f614491fffb1168676b6804fbf
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Gerrit Patch Uploader <[email protected]>
Gerrit-Reviewer: Gerrit Patch Uploader <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits