Make Special:Redirect work for blocked users and in read-only mode
[lhc/web/wiklou.git] / includes / specials / SpecialRedirect.php
index 2022d74..553e2b1 100644 (file)
@@ -2,7 +2,6 @@
 /**
  * Implements Special:Redirect
  *
- * @section LICENSE
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
@@ -263,6 +262,34 @@ class SpecialRedirect extends FormSpecialPage {
                $form->setMethod( 'get' );
        }
 
+       /**
+        * Return an array of subpages that this special page will accept.
+        *
+        * @return string[] subpages
+        */
+       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';
        }