r114194 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r114193‎ | r114194 | r114195 >
Date:21:42, 19 March 2012
Author:emsmith
Status:ok
Tags:
Comment:
bug 35254 - oversight items (request and unrequest oversight, decline oversight, oversight and unoversight) now go directly to the suppressionlog instead of into the afv5 activity log
Modified paths:
  • /trunk/extensions/ArticleFeedbackv5/ArticleFeedbackv5.php (modified) (history)
  • /trunk/extensions/ArticleFeedbackv5/api/ApiArticleFeedbackv5Utils.php (modified) (history)

Diff [purge]

Index: trunk/extensions/ArticleFeedbackv5/ArticleFeedbackv5.php
@@ -312,12 +312,12 @@
313313 $wgLogTypes[] = 'articlefeedbackv5';
314314 $wgLogNames['articlefeedbackv5'] = 'articlefeedbackv5-log-name';
315315 $wgLogHeaders['articlefeedbackv5'] = 'articlefeedbackv5-log-header';
316 -$wgLogActions['articlefeedbackv5/oversight'] = 'articlefeedbackv5-log-oversight';
317 -$wgLogActions['articlefeedbackv5/unoversight'] = 'articlefeedbackv5-log-unoversight';
 316+$wgLogActions['suppress/oversight'] = 'articlefeedbackv5-log-oversight';
 317+$wgLogActions['suppress/unoversight'] = 'articlefeedbackv5-log-unoversight';
318318 $wgLogActions['articlefeedbackv5/hidden'] = 'articlefeedbackv5-log-hidden';
319319 $wgLogActions['articlefeedbackv5/unhidden'] = 'articlefeedbackv5-log-unhidden';
320 -$wgLogActions['articlefeedbackv5/decline'] = 'articlefeedbackv5-log-decline';
321 -$wgLogActions['articlefeedbackv5/request'] = 'articlefeedbackv5-log-request';
322 -$wgLogActions['articlefeedbackv5/unrequest'] = 'articlefeedbackv5-log-unrequest';
 320+$wgLogActions['suppress/decline'] = 'articlefeedbackv5-log-decline';
 321+$wgLogActions['suppress/request'] = 'articlefeedbackv5-log-request';
 322+$wgLogActions['suppress/unrequest'] = 'articlefeedbackv5-log-unrequest';
323323 $wgLogActions['articlefeedbackv5/flag'] = 'articlefeedbackv5-log-flag';
324324 $wgLogActions['articlefeedbackv5/unflag'] = 'articlefeedbackv5-log-unflag';
Index: trunk/extensions/ArticleFeedbackv5/api/ApiArticleFeedbackv5Utils.php
@@ -215,11 +215,21 @@
216216 $valid = array( 'oversight', 'unoversight', 'hidden', 'unhidden',
217217 'decline', 'request', 'unrequest', 'flag', 'unflag' );
218218
 219+ // suppress
 220+ $suppress = array( 'oversight', 'unoversight', 'decline', 'request', 'unrequest');
 221+
219222 // if we do not have a valid action, return immediately
220223 if ( !in_array( $type, $valid ) ) {
221224 return;
222225 }
223226
 227+ // log type might be afv5 or suppress
 228+ $logtype = 'articlefeedbackv5';
 229+
 230+ if ( in_array( $type, $suppress ) ) {
 231+ $logtype = 'suppress';
 232+ }
 233+
224234 // we only have the page id, we need the string page name for the permalink
225235 $title_object = Title::newFromID( $pageId );
226236
@@ -251,7 +261,7 @@
252262 $doer = null;
253263 }
254264
255 - $log = new LogPage( 'articlefeedbackv5' );
 265+ $log = new LogPage( $logtype, false );
256266 // comments become the notes section from the feedback
257267 $log->addEntry( $type, $permalink, $notes, array(), $doer );
258268

Follow-up revisions

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