+ # Save a null revision in the page's history notifying of the move
+ $nullRevision = Revision::newNullRevision( $dbw, $oldid, $comment, true, $user );
+ if ( !is_object( $nullRevision ) ) {
+ throw new MWException( 'Failed to create null revision while moving page ID '
+ . $oldid . ' to ' . $nt->getPrefixedDBkey() );
+ }
+
+ $nullRevId = $nullRevision->insertOn( $dbw );
+ $logEntry->setAssociatedRevId( $nullRevId );
+
+ /**
+ * T163966
+ * Increment user_editcount during page moves
+ * Moved from SpecialMovepage.php per T195550
+ */
+ $user->incEditCount();
+