Make Special:Redirect work for blocked users and in read-only mode
[lhc/web/wiklou.git] / includes / specials / SpecialRedirect.php
index a2683e5..553e2b1 100644 (file)
@@ -263,25 +263,33 @@ class SpecialRedirect extends FormSpecialPage {
        }
 
        /**
-        * Return an array of subpages beginning with $search that this special page will accept.
+        * Return an array of subpages 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
+        * @return string[] subpages
         */
-       public function prefixSearchSubpages( $search, $limit = 10 ) {
-               return self::prefixSearchArray(
-                       $search,
-                       $limit,
-                       array(
-                               "file",
-                               "page",
-                               "revision",
-                               "user",
-                       )
+       protected function getSubpagesForPrefixSearch() {
+               return array(
+                       'file',
+                       'page',
+                       'revision',
+                       'user',
                );
        }
 
+       /**
+        * @return bool
+        */
+       public function requiresWrite() {
+               return false;
+       }
+
+       /**
+        * @return bool
+        */
+       public function requiresUnblock() {
+               return false;
+       }
+
        protected function getGroupName() {
                return 'redirects';
        }