r109624 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r109623‎ | r109624 | r109625 >
Date:16:09, 20 January 2012
Author:gregchiasson
Status:ok
Tags:
Comment:
AFT5 - followup to r109582, replace spaces with tabs.
Modified paths:
  • /trunk/extensions/ArticleFeedbackv5/api/ApiArticleFeedbackv5Utils.php (modified) (history)
  • /trunk/extensions/ArticleFeedbackv5/api/ApiViewFeedbackArticleFeedbackv5.php (modified) (history)

Diff [purge]

Index: trunk/extensions/ArticleFeedbackv5/api/ApiViewFeedbackArticleFeedbackv5.php
@@ -227,7 +227,6 @@
228228 case 6: $content .= $this->renderBucket6( $record ); break;
229229 default: $content .= $this->renderNoBucket( $record ); break;
230230 }
231 - # TODO: check roles to determine what to show here (and cache somewhere so we don't keep looking them up).
232231 $can_flag = !$this->access[ 'blocked' ];
233232 $can_vote = !$this->access[ 'blocked' ];
234233 $can_hide = $this->access[ 'rollbackers' ];
Index: trunk/extensions/ArticleFeedbackv5/api/ApiArticleFeedbackv5Utils.php
@@ -193,15 +193,15 @@
194194
195195 public function initializeAccess() {
196196 global $wgUser;
197 - return array(
198 - 'blocked' => $wgUser->isBlocked(),
199 - 'anon' => $wgUser->isAnon(),
200 - 'registered' => !$wgUser->isAnon() && !$wgUser->isBlocked(),
201 - 'autoconfirmed' => in_array('autoconfirmed', $wgUser->getEffectiveGroups()),
202 - 'rollbackers' => in_array('rollbacker', $wgUser->getEffectiveGroups()),
203 - 'admins' => in_array('sysop', $wgUser->getEffectiveGroups()),
204 - 'oversight' => in_array('oversight', $wgUser->getEffectiveGroups())
205 - );
 197+ return array(
 198+ 'blocked' => $wgUser->isBlocked(),
 199+ 'anon' => $wgUser->isAnon(),
 200+ 'registered' => !$wgUser->isAnon() && !$wgUser->isBlocked(),
 201+ 'autoconfirmed' => in_array('autoconfirmed', $wgUser->getEffectiveGroups()),
 202+ 'rollbackers' => in_array('rollbacker', $wgUser->getEffectiveGroups()),
 203+ 'admins' => in_array('sysop', $wgUser->getEffectiveGroups()),
 204+ 'oversight' => in_array('oversight', $wgUser->getEffectiveGroups())
 205+ );
206206 }
207207 }
208208

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r109582AFT5 - Add permissions/roll checks to AFT5 feedback page and API calls. Requi...gregchiasson23:16, 19 January 2012

Status & tagging log