Index: trunk/phase3/includes/User.php |
— | — | @@ -1320,6 +1320,15 @@ |
1321 | 1321 | } |
1322 | 1322 | |
1323 | 1323 | /** |
| 1324 | + * If user is blocked, return the ID for the block |
| 1325 | + * @return \int Block ID |
| 1326 | + */ |
| 1327 | + function getBlockId() { |
| 1328 | + $this->getBlockedStatus(); |
| 1329 | + return ($this->mBlock ? $this->mBlock->mId : false); |
| 1330 | + } |
| 1331 | + |
| 1332 | + /** |
1324 | 1333 | * Check if user is blocked on all wikis. |
1325 | 1334 | * Do not use for actual edit permission checks! |
1326 | 1335 | * This is intented for quick UI checks. |
Index: trunk/extensions/FlaggedRevs/FlaggedRevs.php |
— | — | @@ -256,7 +256,7 @@ |
257 | 257 | ######### |
258 | 258 | |
259 | 259 | # Bump this number every time you change flaggedrevs.css/flaggedrevs.js |
260 | | -$wgFlaggedRevStyleVersion = 52; |
| 260 | +$wgFlaggedRevStyleVersion = 53; |
261 | 261 | |
262 | 262 | $wgExtensionFunctions[] = 'efLoadFlaggedRevs'; |
263 | 263 | |
Index: trunk/extensions/FlaggedRevs/language/FlaggedRevs.i18n.php |
— | — | @@ -62,6 +62,7 @@ |
63 | 63 | New [{{fullurl:{{FULLPAGENAMEE}}|oldid=$1&diff=cur&diffonly=0}} changes] may have been made.', |
64 | 64 | 'revreview-basic-same' => 'This is the latest [[{{MediaWiki:Validationpage}}|sighted]] revision ([{{fullurl:Special:Stableversions|page={{FULLPAGENAMEE}}}} list all]), [{{fullurl:Special:Log|type=review&page={{FULLPAGENAMEE}}}} approved] on <i>$2</i>.', |
65 | 65 | 'revreview-basic-source' => 'A [{{fullurl:{{FULLPAGENAMEE}}|stableid=$1}} sighted version] of this page, [{{fullurl:Special:Log|type=review&page={{FULLPAGENAMEE}}}} approved] on <i>$2</i>, was based off this revision.', |
| 66 | + 'revreview-blocked' => 'You cannot review this revision because your account is currently blocked ([$1 details])', |
66 | 67 | 'revreview-changed' => '\'\'\'The requested action could not be performed on this revision of [[:$1|$1]].\'\'\' |
67 | 68 | |
68 | 69 | A template or image may have been requested when no specific version was specified. |
Index: trunk/extensions/FlaggedRevs/specialpages/RevisionReview_body.php |
— | — | @@ -154,7 +154,11 @@ |
155 | 155 | // Basic permission check |
156 | 156 | if( $wgUser->isAllowed( 'review' ) ) { |
157 | 157 | if( $wgUser->isBlocked() ) { |
158 | | - return '<err#>'; |
| 158 | + wfLoadExtensionMessages( 'FlaggedRevs' ); |
| 159 | + $blocklist = SpecialPage::getTitleFor( 'Ipblocklist' ); |
| 160 | + $blocklog = $blocklist->getFullUrl( 'ip=' . urlencode('#'.$wgUser->getBlockId()) ); |
| 161 | + return '<err#><h2>'.wfMsgHtml('blockedtitle').'</h2>'. |
| 162 | + wfMsgExt('revreview-blocked','parseinline',$blocklog); |
159 | 163 | } |
160 | 164 | } else { |
161 | 165 | return '<err#>'; |
Index: trunk/extensions/FlaggedRevs/flaggedrevs.js |
— | — | @@ -342,7 +342,9 @@ |
343 | 343 | if( submit ) { |
344 | 344 | submit.value = wgAjaxReview.sentMsg; |
345 | 345 | } |
346 | | - wgAjaxReview.unlockForm(); |
| 346 | + if( response.indexOf('<suc#>') == 0 ) { |
| 347 | + wgAjaxReview.unlockForm(); |
| 348 | + } |
347 | 349 | document.title = wgAjaxReview.actioncomplete; |
348 | 350 | }; |
349 | 351 | |