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
This commit is contained in:
parent
8e6154c878
commit
793499cde0
2 changed files with 8 additions and 0 deletions
|
|
@ -3066,6 +3066,11 @@ $old: old title
|
|||
$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
|
||||
|
|
|
|||
|
|
@ -248,6 +248,9 @@ class MovePage {
|
|||
}
|
||||
|
||||
$dbw->startAtomic( __METHOD__ );
|
||||
|
||||
Hooks::run( 'TitleMoveStarting', [ $this->oldTitle, $this->newTitle, $user ] );
|
||||
|
||||
$pageid = $this->oldTitle->getArticleID( Title::GAID_FOR_UPDATE );
|
||||
$protected = $this->oldTitle->isProtected();
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue