r104827 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r104826‎ | r104827 | r104828 >
Date:02:13, 1 December 2011
Author:aaron
Status:ok
Tags:
Comment:
Added blockchecks to action=moodbar and action=feedbackdashboardresponse
Modified paths:
  • /trunk/extensions/MoodBar/ApiFeedbackDashboardResponse.php (modified) (history)
  • /trunk/extensions/MoodBar/ApiMoodBar.php (modified) (history)

Diff [purge]

Index: trunk/extensions/MoodBar/ApiFeedbackDashboardResponse.php
@@ -8,6 +8,9 @@
99 if ( $wgUser->isAnon() ) {
1010 $this->dieUsage( "You don't have permission to do that", 'permission-denied' );
1111 }
 12+ if ( $wgUser->isBlocked( false ) ) {
 13+ $this->dieUsageMsg( array( 'blockedtext' ) );
 14+ }
1215
1316 $params = $this->extractRequestParams();
1417
Index: trunk/extensions/MoodBar/ApiMoodBar.php
@@ -2,6 +2,12 @@
33
44 class ApiMoodBar extends ApiBase {
55 public function execute() {
 6+ global $wgUser;
 7+
 8+ if ( $wgUser->isBlocked( false ) ) {
 9+ $this->dieUsageMsg( array( 'blockedtext' ) );
 10+ }
 11+
612 $params = $this->extractRequestParams();
713
814 $params['page'] = Title::newFromText( $params['page'] );

Follow-up revisions

RevisionCommit summaryAuthorDate
r104828Adding block status checks to APIs (MFT of r104827)aaron02:23, 1 December 2011

Status & tagging log