r22605 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r22604‎ | r22605 | r22606 >
Date:18:53, 31 May 2007
Author:aaron
Status:old
Tags:
Comment:
*Blocked users can't review
Modified paths:
  • /trunk/extensions/FlaggedRevs/FlaggedRevsPage.body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/FlaggedRevs/FlaggedRevsPage.body.php
@@ -15,11 +15,20 @@
1616
1717 function execute( $par ) {
1818 global $wgRequest, $wgUser, $wgOut, $wgFlaggedRevComments, $wgFlaggedRevTags;
19 -
20 - if( !$wgUser->isAllowed( 'review' ) ) {
 19+
 20+ $confirm = $wgRequest->wasPosted() &&
 21+ $wgUser->matchEditToken( $wgRequest->getVal( 'wpEditToken' ) );
 22+
 23+ if( $wgUser->isAllowed( 'review' ) ) {
 24+ if( $wgUser->isBlocked( !$confirm ) ) {
 25+ $wgOut->blockedPage();
 26+ return;
 27+ }
 28+ } else {
2129 $wgOut->permissionRequired( 'review' );
2230 return;
2331 }
 32+
2433 $this->setHeaders();
2534 // Our target page
2635 $this->target = $wgRequest->getText( 'target' );