r114388 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r114387‎ | r114388 | r114389 >
Date:18:28, 21 March 2012
Author:catrope
Status:ok
Tags:
Comment:
1.19wmf1: Update ArticleFeedbackv5 to trunk state to pick up r114386 and r114387
Modified paths:
  • /branches/wmf/1.19wmf1/extensions/ArticleFeedbackv5/api/ApiViewActivityArticleFeedbackv5.php (modified) (history)

Diff [purge]

Index: branches/wmf/1.19wmf1/extensions/ArticleFeedbackv5/api/ApiViewActivityArticleFeedbackv5.php
@@ -242,12 +242,30 @@
243243 * @return array db record rows
244244 */
245245 protected function fetchActivity( $title, $feedbackId, $limit = 25, $continue = null ) {
 246+ global $wgUser; // we need to check permissions in here for suppressionlog stuff
246247
247 - $where = array (
 248+
 249+ // get afv5 log items PLUS suppress log
 250+ if ( $wgUser->isAllowed( 'aftv5-delete-feedback' ) ) {
 251+ $where = array (
 252+ 0 => "(log_type = 'articlefeedbackv5')
 253+ OR (log_type = 'suppress' AND
 254+ (log_action = 'oversight' OR
 255+ log_action = 'unoversight' OR
 256+ log_action = 'decline' OR
 257+ log_action = 'request' OR
 258+ log_action = 'unrequest'))",
 259+ 'log_namespace' => NS_SPECIAL,
 260+ 'log_title' => "ArticleFeedbackv5/$title/$feedbackId"
 261+ );
 262+ // get only afv5 log items
 263+ } else {
 264+ $where = array (
248265 'log_type' => 'articlefeedbackv5',
249266 'log_namespace' => NS_SPECIAL,
250267 'log_title' => "ArticleFeedbackv5/$title/$feedbackId"
251268 );
 269+ }
252270
253271 $where = $this->applyContinue( $continue, $where );
254272

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r114386bug 35254 - bugfix for bugfix - make sure if the user has oversight (aftv5 de...emsmith18:16, 21 March 2012
r114387bug 35254 - typoemsmith18:18, 21 March 2012

Status & tagging log