From: GeoffreyT2000 Date: Wed, 6 Mar 2019 01:55:49 +0000 (-0800) Subject: Set rc_patrolled to 2 for autopatrolled changes in rebuildrecentchanges.php X-Git-Tag: 1.34.2~7 X-Git-Url: https://git.cyclocoop.org/%27.WWW_URL.%27admin/config/%7B%24admin_url%7Dmembres/%7B%7B%20url_for%28%27user_edit%27%2C%20userid=session.user.id%29%20%7D%7D?a=commitdiff_plain;h=405f71c51dbb3794f4d141c542c0eaf564da8165;p=lhc%2Fweb%2Fwiklou.git Set rc_patrolled to 2 for autopatrolled changes in rebuildrecentchanges.php This fixes what rc_patrolled should be for autopatrolled changes. Also, non-upload log entries will have rc_patrolled = 2 for now until T217388 decides what rc_patrolled should be for such entries. In contrast, upload entries can be patrolled unlike other log entries, so they will have rc_patrolled = 0. Bug: T199474 Change-Id: Ib7d1f5f7dd3541768305debee703fd342844714b (cherry picked from commit 87aaf7a1664a1a031f5872ffaf5fd9730db39444) --- diff --git a/maintenance/rebuildrecentchanges.php b/maintenance/rebuildrecentchanges.php index 7267b2cac4..9cbb5cd9c6 100644 --- a/maintenance/rebuildrecentchanges.php +++ b/maintenance/rebuildrecentchanges.php @@ -326,7 +326,7 @@ class RebuildRecentchanges extends Maintenance { 'rc_title' => $row->log_title, 'rc_minor' => 0, 'rc_bot' => 0, - 'rc_patrolled' => 1, + 'rc_patrolled' => $row->log_type == 'upload' ? 0 : 2, 'rc_new' => 0, 'rc_this_oldid' => 0, 'rc_last_oldid' => 0, @@ -448,11 +448,12 @@ class RebuildRecentchanges extends Maintenance { foreach ( $actorQuery['orconds'] as $cond ) { $dbw->update( 'recentchanges', - [ 'rc_patrolled' => 1 ], + [ 'rc_patrolled' => 2 ], [ $cond, 'rc_timestamp > ' . $dbw->addQuotes( $dbw->timestamp( $this->cutoffFrom ) ), 'rc_timestamp < ' . $dbw->addQuotes( $dbw->timestamp( $this->cutoffTo ) ), + 'rc_patrolled' => 0 ], __METHOD__ );