r71331 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r71330‎ | r71331 | r71332 >
Date:06:25, 20 August 2010
Author:werdna
Status:deferred
Tags:
Comment:
Abuse filter log suppression:
* Create a unique title for each log entry, Special:AbuseLog/X
* Log suppression and unsuppression in the suppression log like everything else.
Modified paths:
  • /trunk/extensions/AbuseFilter/AbuseFilter.i18n.php (modified) (history)
  • /trunk/extensions/AbuseFilter/AbuseFilter.php (modified) (history)
  • /trunk/extensions/AbuseFilter/SpecialAbuseLog.php (modified) (history)

Diff [purge]

Index: trunk/extensions/AbuseFilter/SpecialAbuseLog.php
@@ -38,6 +38,11 @@
3939
4040 $detailsid = $wgRequest->getIntOrNull( 'details' );
4141 $hideid = $wgRequest->getIntOrNull( 'hide' );
 42+
 43+ if ( $parameter ) {
 44+ $detailsid = $parameter;
 45+ }
 46+
4247 if ( $detailsid ) {
4348 $this->showDetails( $detailsid );
4449 } elseif ( $hideid ) {
@@ -156,6 +161,11 @@
157162 array( 'afl_id' => $logid ),
158163 __METHOD__
159164 );
 165+
 166+ $logPage = new LogPage( 'suppress' );
 167+ $action = $fields['hidden'] ? 'hide-afl' : 'unhide-afl';
 168+
 169+ $logPage->addEntry( $action, $this->getTitle( $logid ), $fields['reason'] );
160170
161171 $wgOut->redirect( SpecialPage::getTitleFor( 'AbuseLog' )->getFullURL() );
162172
@@ -375,9 +385,8 @@
376386 if ( self::canSeeDetails() ) {
377387 $examineTitle = SpecialPage::getTitleFor( 'AbuseFilter', 'examine/log/' . $row->afl_id );
378388 $detailsLink = $sk->makeKnownLinkObj(
379 - $this->getTitle(),
380 - wfMsg( 'abusefilter-log-detailslink' ),
381 - 'details=' . $row->afl_id
 389+ $this->getTitle($row->afl_id),
 390+ wfMsg( 'abusefilter-log-detailslink' )
382391 );
383392 $examineLink = $sk->link(
384393 $examineTitle,
Index: trunk/extensions/AbuseFilter/AbuseFilter.php
@@ -85,6 +85,8 @@
8686 $wgLogNames['abusefilter'] = 'abusefilter-log-name';
8787 $wgLogHeaders['abusefilter'] = 'abusefilter-log-header';
8888 $wgLogActionsHandlers['abusefilter/modify'] = array( 'AbuseFilter', 'modifyActionText' );
 89+$wgLogActions['suppress/hide-afl'] = 'abusefilter-logentry-suppress';
 90+$wgLogActions['suppress/unhide-afl'] = 'abusefilter-logentry-unsuppress';
8991
9092 $wgAbuseFilterAvailableActions = array( 'flag', 'throttle', 'warn', 'disallow', 'blockautopromote', 'block', 'degroup', 'tag' );
9193
Index: trunk/extensions/AbuseFilter/AbuseFilter.i18n.php
@@ -114,6 +114,8 @@
115115 'abusefilter-log-hide-reason' => 'Reason:',
116116 'abusefilter-log-hide-forbidden' => 'You do not have permission to hide
117117 abuse log entries.',
 118+ 'abusefilter-logentry-suppress' => 'hid [[$1]]',
 119+ 'abusefilter-logentry-unsuppress' => 'unhid [[$1]]',
118120
119121 // Abuse filter management
120122 'abusefilter-management' => 'Abuse filter management',

Follow-up revisions

RevisionCommit summaryAuthorDate
r71332Merge r68584, r68590, r68681, r71331: AbuseFilter log entry suppression, for ...werdna06:33, 20 August 2010

Status & tagging log