Merge "Function type hints for LinkHolderArray.php"
[lhc/web/wiklou.git] / includes / specials / SpecialEditWatchlist.php
index 02d8d70..369f11f 100644 (file)
@@ -125,11 +125,16 @@ class SpecialEditWatchlist extends UnlistedSpecialPage {
         * @return string[] Matching subpages
         */
        public function prefixSearchSubpages( $search, $limit = 10 ) {
-               // SpecialWatchlist uses SpecialEditWatchlist::getMode, so new types should be added
-               // here and there - no 'edit' here, because that the default for this page
-               $subpages = array( 'clear', 'raw' );
-               $escaped = preg_quote( $search );
-               return array_slice( preg_grep( "/^$escaped/i", $subpages ), 0, $limit );
+               return self::prefixSearchArray(
+                       $search,
+                       $limit,
+                       // SpecialWatchlist uses SpecialEditWatchlist::getMode, so new types should be added
+                       // here and there - no 'edit' here, because that the default for this page
+                       array(
+                               'clear',
+                               'raw',
+                       )
+               );
        }
 
        /**