From: GeoffreyT2000 Date: Sun, 25 Mar 2018 22:14:06 +0000 (-0700) Subject: Increment edit count for all page moves X-Git-Tag: 1.34.0-rc.0~3637 X-Git-Url: https://git.cyclocoop.org/%242?a=commitdiff_plain;h=19dd28798163603000f236158bcf1739a3a0dd21;p=lhc%2Fweb%2Fwiklou.git 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 --- 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 ) {