From: Amir Sarabadani Date: Thu, 12 Apr 2018 19:03:44 +0000 (+0200) Subject: Remove the feature switch for disabling autopatrol logging X-Git-Tag: 1.31.0-rc.0~78^2 X-Git-Url: http://git.cyclocoop.org/%27.%28%24current%20%3E%202?a=commitdiff_plain;h=922be510668b6a2bf6073a96668a7a45f6a49c4d;hp=93a531f935febc0d2f1c143ddef815a5ccf1a87b;p=lhc%2Fweb%2Fwiklou.git Remove the feature switch for disabling autopatrol logging Per the RFC, it will now become the default and only behaviour to not log autpatrol actions. The information is already recorded via the rc_patrolled field. Bug: T184485 Change-Id: I98ae895a2b4cde4bb945f1df23be4a070b0bf9c4 --- diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index a0f849e43a..c12f2f2045 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -6862,14 +6862,6 @@ $wgUseNPPatrol = true; */ $wgUseFilePatrol = true; -/** - * Log autopatrol actions to the log table - * The default used to be true before 1.31 - * - * @since 1.22 - */ -$wgLogAutopatrol = false; - /** * Provide syndication feeds (RSS, Atom) for, e.g., Recentchanges, Newpages */ diff --git a/includes/changes/RecentChange.php b/includes/changes/RecentChange.php index 2f419056a5..8e8b93f118 100644 --- a/includes/changes/RecentChange.php +++ b/includes/changes/RecentChange.php @@ -704,9 +704,6 @@ class RecentChange { function () use ( $rc, $tags ) { $rc->addTags( $tags ); $rc->save(); - if ( $rc->mAttribs['rc_patrolled'] ) { - PatrolLog::record( $rc, true, $rc->getPerformer() ); - } }, DeferredUpdates::POSTSEND, wfGetDB( DB_MASTER ) @@ -780,9 +777,6 @@ class RecentChange { function () use ( $rc, $tags ) { $rc->addTags( $tags ); $rc->save(); - if ( $rc->mAttribs['rc_patrolled'] ) { - PatrolLog::record( $rc, true, $rc->getPerformer() ); - } }, DeferredUpdates::POSTSEND, wfGetDB( DB_MASTER ) diff --git a/includes/logging/LogEntry.php b/includes/logging/LogEntry.php index 97dadba8a5..e17ac032aa 100644 --- a/includes/logging/LogEntry.php +++ b/includes/logging/LogEntry.php @@ -782,13 +782,6 @@ class ManualLogEntry extends LogEntryBase { if ( $to === 'udp' || $to === 'rcandudp' ) { $rc->notifyRCFeeds(); } - - // Log the autopatrol if the log entry is patrollable - if ( $this->getIsPatrollable() && - $rc->getAttribute( 'rc_patrolled' ) === RecentChange::PRC_AUTOPATROLLED - ) { - PatrolLog::record( $rc, true, $this->getPerformer() ); - } } }, DeferredUpdates::POSTSEND, diff --git a/includes/logging/PatrolLog.php b/includes/logging/PatrolLog.php index d1de2cd3ae..9b2e098298 100644 --- a/includes/logging/PatrolLog.php +++ b/includes/logging/PatrolLog.php @@ -27,6 +27,7 @@ * logs of patrol events */ class PatrolLog { + /** * Record a log event for a change being patrolled * @@ -39,10 +40,8 @@ class PatrolLog { * @return bool */ public static function record( $rc, $auto = false, User $user = null, $tags = null ) { - global $wgLogAutopatrol; - - // do not log autopatrolled edits if setting disables it - if ( $auto && !$wgLogAutopatrol ) { + // Do not log autopatrol actions: T184485 + if ( $auto ) { return false; }