RevisionUndeleted hook: Add $oldPageId

Not always the same as the restored revision's pageId

Bug: T248727
Change-Id: I4e3ea4519d34de7c67ad8999575affe77d756f08
This commit is contained in:
DannyS712 2020-04-14 23:08:03 +00:00
parent c260233ff9
commit 5127acb8ec
2 changed files with 2 additions and 1 deletions

View file

@ -2899,6 +2899,7 @@ $flags: DEPRECATED! Always null!
'RevisionUndeleted': After an article revision is restored.
$revisionRecord: the RevisionRecord that was restored
$oldPageID: the page ID of the revision when archived (may be null)
'SearchableNamespaces': An option to modify which namespaces are searchable.
&$arr: Array of namespaces ($nsId => $name) which will be used.

View file

@ -785,7 +785,7 @@ class PageArchive {
$restored++;
Hooks::run( 'RevisionUndeleted', [ $revision ] );
Hooks::run( 'RevisionUndeleted', [ $revision, $row->ar_page_id ] );
// TODO: Hard deprecate after replacing uses with RevisionUndeleted
// Deprecated since 1.35