From 19dd28798163603000f236158bcf1739a3a0dd21 Mon Sep 17 00:00:00 2001 From: GeoffreyT2000 Date: Sun, 25 Mar 2018 15:14:06 -0700 Subject: [PATCH] Increment edit count for all page moves 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 | 7 +++++++ includes/specials/SpecialMovepage.php | 6 ------ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/includes/MovePage.php b/includes/MovePage.php index ecd12c6f8e..5213fc171d 100644 --- a/includes/MovePage.php +++ b/includes/MovePage.php @@ -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 ); diff --git a/includes/specials/SpecialMovepage.php b/includes/specials/SpecialMovepage.php index 2f6dc03b10..5cbad8a33b 100644 --- a/includes/specials/SpecialMovepage.php +++ b/includes/specials/SpecialMovepage.php @@ -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 ) { -- 2.20.1