Make the permissions check in Special:Movepage reasonable: show a proper 'user blocke...
authorRotem Liss <rotem@users.mediawiki.org>
Fri, 8 Sep 2006 10:42:56 +0000 (10:42 +0000)
committerRotem Liss <rotem@users.mediawiki.org>
Fri, 8 Sep 2006 10:42:56 +0000 (10:42 +0000)
includes/SpecialMovepage.php

index 0593be5..9777a80 100644 (file)
@@ -9,14 +9,21 @@
  * Constructor
  */
 function wfSpecialMovepage( $par = null ) {
-       global $wgUser, $wgOut, $wgRequest, $action, $wgOnlySysopMayMove;
+       global $wgUser, $wgOut, $wgRequest, $action;
 
-       # check rights. We don't want newbies to move pages to prevents possible attack
-       if ( !$wgUser->isAllowed( 'move' ) or $wgUser->isBlocked() or ($wgOnlySysopMayMove and $wgUser->isNewbie())) {
-               $wgOut->showErrorPage( "movenologin", "movenologintext" );
+       # Check rights
+       if ( !$wgUser->isAllowed( 'move' ) ) {
+               $wgOut->showErrorPage( 'movenologin', 'movenologintext' );
                return;
        }
-       # We don't move protected pages
+
+       # Don't allow blocked users to move pages
+       if ( $wgUser->isBlocked() ) {
+               $wgOut->blockedPage();
+               return;
+       }
+
+       # Check for database lock
        if ( wfReadOnly() ) {
                $wgOut->readOnlyPage();
                return;