From: Brion Vibber Date: Fri, 1 Jul 2005 21:15:31 +0000 (+0000) Subject: * (bug 2656) Fix regression: prevent blocked users from reverting images X-Git-Tag: 1.5.0beta2~95 X-Git-Url: http://git.cyclocoop.org/?a=commitdiff_plain;h=f8b783977e912aaf494f0f6ecd26b322a66d8e69;p=lhc%2Fweb%2Fwiklou.git * (bug 2656) Fix regression: prevent blocked users from reverting images --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index bb7e014294..b215a101a3 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -439,6 +439,7 @@ Various bugfixes, small features, and a few experimental things: recentchanges should specify current ID explicitly. * (bug 2609) Fix text justification preferenced with MonoBook skin. * (bug 2594) Display article tab as red for non-existent articles. +* (bug 2656) Fix regression: prevent blocked users from reverting images === Caveats === diff --git a/includes/ImagePage.php b/includes/ImagePage.php index ec39f313b6..600fc22211 100644 --- a/includes/ImagePage.php +++ b/includes/ImagePage.php @@ -344,6 +344,9 @@ class ImagePage extends Article { $wgOut->sysopRequired(); return; } + if ( $wgUser->isBlocked() ) { + return $this->blockedIPpage(); + } if ( wfReadOnly() ) { $wgOut->readOnlyPage(); return; @@ -526,6 +529,9 @@ class ImagePage extends Article { $wgOut->sysopRequired(); return; } + if ( $wgUser->isBlocked() ) { + return $this->blockedIPpage(); + } if( !$wgUser->matchEditToken( $wgRequest->getVal( 'wpEditToken' ), $oldimage ) ) { $wgOut->errorpage( 'internalerror', 'sessionfailure' ); return; @@ -564,6 +570,13 @@ class ImagePage extends Article { $descTitle = $img->getTitle(); $wgOut->returnToMain( false, $descTitle->getPrefixedText() ); } + + function blockedIPpage() { + require_once( 'EditPage.php' ); + $edit = new EditPage( $this ); + return $edit->blockedIPpage(); + } + } /**