* (bug 3493) Mark edits patrolled when they are reverted
authorBrion Vibber <brion@users.mediawiki.org>
Sat, 17 Dec 2005 00:44:23 +0000 (00:44 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Sat, 17 Dec 2005 00:44:23 +0000 (00:44 +0000)
  patch by Leon Planken
http://bugzilla.wikimedia.org/attachment.cgi?id=1203

RELEASE-NOTES
includes/Article.php

index 58ac933..fd83c53 100644 (file)
@@ -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 ===
index fe6ce44..02bbaec 100644 (file)
@@ -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}'",