Index: trunk/extensions/FlaggedRevs/FlaggedRevsPage.body.php |
— | — | @@ -15,11 +15,20 @@ |
16 | 16 | |
17 | 17 | function execute( $par ) { |
18 | 18 | 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 { |
21 | 29 | $wgOut->permissionRequired( 'review' ); |
22 | 30 | return; |
23 | 31 | } |
| 32 | + |
24 | 33 | $this->setHeaders(); |
25 | 34 | // Our target page |
26 | 35 | $this->target = $wgRequest->getText( 'target' ); |