https://www.mediawiki.org/wiki/Special:Code/MediaWiki/114388

Revision: 114388
Author:   catrope
Date:     2012-03-21 18:28:56 +0000 (Wed, 21 Mar 2012)
Log Message:
-----------
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: 
branches/wmf/1.19wmf1/extensions/ArticleFeedbackv5/api/ApiViewActivityArticleFeedbackv5.php
===================================================================
--- 
branches/wmf/1.19wmf1/extensions/ArticleFeedbackv5/api/ApiViewActivityArticleFeedbackv5.php
 2012-03-21 18:18:09 UTC (rev 114387)
+++ 
branches/wmf/1.19wmf1/extensions/ArticleFeedbackv5/api/ApiViewActivityArticleFeedbackv5.php
 2012-03-21 18:28:56 UTC (rev 114388)
@@ -242,12 +242,30 @@
         * @return array db record rows
         */
        protected function fetchActivity( $title, $feedbackId, $limit = 25, 
$continue = null ) {
+               global $wgUser; // we need to check permissions in here for 
suppressionlog stuff
 
-               $where = array (
+
+               // get afv5 log items PLUS suppress log
+               if ( $wgUser->isAllowed( 'aftv5-delete-feedback' ) ) {
+                       $where = array (
+                               0 => "(log_type = 'articlefeedbackv5')
+                                       OR (log_type = 'suppress' AND
+                                       (log_action = 'oversight' OR
+                                        log_action = 'unoversight' OR
+                                        log_action = 'decline' OR
+                                        log_action = 'request' OR
+                                        log_action = 'unrequest'))",
+                               'log_namespace' => NS_SPECIAL,
+                               'log_title' => 
"ArticleFeedbackv5/$title/$feedbackId"
+                       );
+               // get only afv5 log items
+               } else {
+                       $where = array (
                                'log_type' => 'articlefeedbackv5',
                                'log_namespace' => NS_SPECIAL,
                                'log_title' => 
"ArticleFeedbackv5/$title/$feedbackId"
                        );
+               }
 
                $where = $this->applyContinue( $continue, $where );
 


_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to