jenkins-bot has submitted this change and it was merged.
Change subject: Add TitleMoveStarting, mirroring TitleMoveCompleting
......................................................................
Add TitleMoveStarting, mirroring TitleMoveCompleting
This is a pre-requisite to fix a Flow move regression, T127785.
This allows running an atomic entirely within the move with the correct
ordering.
Bug: T127785
Change-Id: Ie772f737f917854e4cfefe52ec3bea4669c9efe0
---
M docs/hooks.txt
M includes/MovePage.php
2 files changed, 8 insertions(+), 0 deletions(-)
Approvals:
Aaron Schulz: Looks good to me, approved
jenkins-bot: Verified
diff --git a/docs/hooks.txt b/docs/hooks.txt
index 930aa0a..8955f54 100644
--- a/docs/hooks.txt
+++ b/docs/hooks.txt
@@ -3066,6 +3066,11 @@
$nt: new title
$user: user who does the move
+'TitleMoveStarting': Before moving an article (title), but just after the
atomic DB section starts.
+$old: old title
+$nt: new title
+$user: user who does the move
+
'TitleMoveComplete': After moving an article (title), post-commit.
&$old: old title
&$nt: new title
diff --git a/includes/MovePage.php b/includes/MovePage.php
index 6d69eaa..afa4e1c 100644
--- a/includes/MovePage.php
+++ b/includes/MovePage.php
@@ -248,6 +248,9 @@
}
$dbw->startAtomic( __METHOD__ );
+
+ Hooks::run( 'TitleMoveStarting', [ $this->oldTitle,
$this->newTitle, $user ] );
+
$pageid = $this->oldTitle->getArticleID( Title::GAID_FOR_UPDATE
);
$protected = $this->oldTitle->isProtected();
--
To view, visit https://gerrit.wikimedia.org/r/273143
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ie772f737f917854e4cfefe52ec3bea4669c9efe0
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Mattflaschen <[email protected]>
Gerrit-Reviewer: Aaron Schulz <[email protected]>
Gerrit-Reviewer: Catrope <[email protected]>
Gerrit-Reviewer: Matthias Mullie <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits