From 0fb13507396a96913828642eb75811b7dafd90d0 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Sat, 17 Dec 2005 00:44:23 +0000 Subject: [PATCH] * (bug 3493) Mark edits patrolled when they are reverted patch by Leon Planken http://bugzilla.wikimedia.org/attachment.cgi?id=1203 --- RELEASE-NOTES | 3 +++ includes/Article.php | 17 ++++++++++++----- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 58ac9332c3..fd83c53704 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -328,6 +328,9 @@ fully support the editing toolbar, but was found to be too confusing. * Removed FulltextStoplist.php, no longer used (was for MySQL 3.x workaround) * (bug 4298) Include rc_id on enhanced RC singleton diff links for patrolling * Did some refactoring on ChangesList.php merging dupe code +* (bug 1586) Fix interwiki generator for wikimedia obscure domains +* (bug 3493) Mark edits patrolled when they are reverted + patch by Leon Planken === Caveats === diff --git a/includes/Article.php b/includes/Article.php index fe6ce44e90..02bbaecfdd 100644 --- a/includes/Article.php +++ b/includes/Article.php @@ -2025,7 +2025,7 @@ class Article { * Revert a modification */ function rollback() { - global $wgUser, $wgOut, $wgRequest; + global $wgUser, $wgOut, $wgRequest, $wgUseRCPatrol; $fname = 'Article::rollback'; if ( ! $wgUser->isAllowed('rollback') ) { @@ -2098,12 +2098,19 @@ class Article { return; } + $set = array(); if ( $bot ) { # Mark all reverted edits as bot - $dbw->update( 'recentchanges', - array( /* SET */ - 'rc_bot' => 1 - ), array( /* WHERE */ + $set['rc_bot'] = 1; + } + if ( $wgUseRCPatrol ) { + # Mark all reverted edits as patrolled + $set['rc_patrolled'] = 1; + } + + if ( $set ) { + $dbw->update( 'recentchanges', $set, + array( /* WHERE */ 'rc_cur_id' => $current->getPage(), 'rc_user_text' => $current->getUserText(), "rc_timestamp > '{$s->rev_timestamp}'", -- 2.20.1