Remove the feature switch for disabling autopatrol logging
authorAmir Sarabadani <ladsgroup@gmail.com>
Thu, 12 Apr 2018 19:03:44 +0000 (21:03 +0200)
committerKrinkle <krinklemail@gmail.com>
Fri, 13 Apr 2018 20:52:53 +0000 (20:52 +0000)
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

includes/DefaultSettings.php
includes/changes/RecentChange.php
includes/logging/LogEntry.php
includes/logging/PatrolLog.php

index a0f849e..c12f2f2 100644 (file)
@@ -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
  */
index 2f41905..8e8b93f 100644 (file)
@@ -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 )
index 97dadba..e17ac03 100644 (file)
@@ -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,
index d1de2cd..9b2e098 100644 (file)
@@ -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;
                }