Increment edit count for all page moves
authorGeoffreyT2000 <geoffreytrang@gmail.com>
Sun, 25 Mar 2018 22:14:06 +0000 (15:14 -0700)
committerAaron Schulz <aschulz@wikimedia.org>
Fri, 26 Oct 2018 23:35:01 +0000 (23:35 +0000)
The user_editcount field should be incremented for all page moves, not just those done using Special:MovePage. Also, if talk pages and/or subpages are moved along with the base page, they will all be included in the edit count.

Bug: T195550
Change-Id: If75a45e4404ca7162b59bf85fa62a996383658b9

includes/MovePage.php
includes/specials/SpecialMovepage.php

index ecd12c6..5213fc1 100644 (file)
@@ -543,6 +543,13 @@ class MovePage {
                $nullRevId = $nullRevision->insertOn( $dbw );
                $logEntry->setAssociatedRevId( $nullRevId );
 
+               /**
+                * T163966
+                * Increment user_editcount during page moves
+                * Moved from SpecialMovepage.php per T195550
+                */
+               $user->incEditCount();
+
                if ( !$redirectContent ) {
                        // Clean up the old title *before* reset article id - T47348
                        WikiPage::onArticleDelete( $this->oldTitle );
index 2f6dc03..5cbad8a 100644 (file)
@@ -789,12 +789,6 @@ class MovePageForm extends UnlistedSpecialPage {
                # Deal with watches (we don't watch subpages)
                WatchAction::doWatchOrUnwatch( $this->watch, $ot, $user );
                WatchAction::doWatchOrUnwatch( $this->watch, $nt, $user );
-
-               /**
-                * T163966
-                * Increment user_editcount during page moves
-                */
-               $user->incEditCount();
        }
 
        function showLogFragment( $title ) {