Use PRC_AUTOPATROLLED for log entries and category entries
authorRoan Kattouw <roan.kattouw@gmail.com>
Tue, 24 Apr 2018 19:48:35 +0000 (12:48 -0700)
committerRoan Kattouw <roan.kattouw@gmail.com>
Thu, 26 Apr 2018 18:21:48 +0000 (11:21 -0700)
These actions mark edits as patrolled automatically, so the
correct rc_patrolled value to use is PRC_AUTOPATROLLED rather than
PRC_PATROLLED. The code for log entries checks the autopatrol right, and
the code for category entries has a comment that says "just like log
entries".

Bug: T190408
Bug: T184791
Change-Id: Id994af8cd3833a862a09389431256aba35c2e6d9

includes/changes/RecentChange.php

index 8e8b93f..47e6c68 100644 (file)
@@ -884,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 ? self::PRC_PATROLLED : self::PRC_UNPATROLLED,
+                       'rc_patrolled' => $markPatrolled ? self::PRC_AUTOPATROLLED : self::PRC_UNPATROLLED,
                        'rc_new' => 0, # obsolete
                        'rc_old_len' => null,
                        'rc_new_len' => null,
@@ -970,7 +970,7 @@ class RecentChange {
                        'rc_last_oldid' => $oldRevId,
                        'rc_bot' => $bot ? 1 : 0,
                        'rc_ip' => self::checkIPAddress( $ip ),
-                       'rc_patrolled' => self::PRC_PATROLLED, // Always patrolled, just like log entries
+                       'rc_patrolled' => self::PRC_AUTOPATROLLED, // Always patrolled, just like log entries
                        'rc_new' => 0, # obsolete
                        'rc_old_len' => null,
                        'rc_new_len' => null,