Merge "Remove the feature switch for disabling autopatrol logging"
[lhc/web/wiklou.git] / includes / changes / RecentChange.php
index b051120..8e8b93f 100644 (file)
@@ -622,7 +622,7 @@ class RecentChange {
                $dbw->update(
                        'recentchanges',
                        [
-                               'rc_patrolled' => 1
+                               'rc_patrolled' => self::PRC_PATROLLED
                        ],
                        [
                                'rc_id' => $this->getAttribute( 'rc_id' )
@@ -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 )
@@ -890,7 +884,7 @@ class RecentChange {
                        'rc_last_oldid' => 0,
                        'rc_bot' => $user->isAllowed( 'bot' ) ? (int)$wgRequest->getBool( 'bot', true ) : 0,
                        'rc_ip' => self::checkIPAddress( $ip ),
-                       'rc_patrolled' => $markPatrolled ? 1 : 0,
+                       'rc_patrolled' => $markPatrolled ? self::PRC_PATROLLED : self::PRC_UNPATROLLED,
                        'rc_new' => 0, # obsolete
                        'rc_old_len' => null,
                        'rc_new_len' => null,
@@ -976,7 +970,7 @@ class RecentChange {
                        'rc_last_oldid' => $oldRevId,
                        'rc_bot' => $bot ? 1 : 0,
                        'rc_ip' => self::checkIPAddress( $ip ),
-                       'rc_patrolled' => 1, // Always patrolled, just like log entries
+                       'rc_patrolled' => self::PRC_PATROLLED, // Always patrolled, just like log entries
                        'rc_new' => 0, # obsolete
                        'rc_old_len' => null,
                        'rc_new_len' => null,