Add RevisionUndeleted hook to replace ArticleRevisionUndeleted
Bug: T248727 Change-Id: Ic4f771fcb3f1468a78b7eef3ff11686083144154
This commit is contained in:
parent
35eea56a95
commit
c2ff5c0355
3 changed files with 12 additions and 1 deletions
|
|
@ -586,6 +586,8 @@ because of Phabricator reports.
|
||||||
use the RecentChange_save hook or similar instead.
|
use the RecentChange_save hook or similar instead.
|
||||||
* The ArticleEditUpdates hook has been deprecated. Please
|
* The ArticleEditUpdates hook has been deprecated. Please
|
||||||
use the RevisionDataUpdates hook or similar instead.
|
use the RevisionDataUpdates hook or similar instead.
|
||||||
|
* The ArticleRevisionUndeleted has been soft deprecated. Please use the new
|
||||||
|
RevisionUndeleted hook instead.
|
||||||
* LinkHolderArray has been deprecated for public usage and will be
|
* LinkHolderArray has been deprecated for public usage and will be
|
||||||
internal part of parser.
|
internal part of parser.
|
||||||
* ResourceLoaderFileModule::compileLessFile() has been deprecated, use
|
* ResourceLoaderFileModule::compileLessFile() has been deprecated, use
|
||||||
|
|
|
||||||
|
|
@ -685,7 +685,8 @@ $reason: Reason for protect
|
||||||
'ArticlePurge': Before executing "&action=purge".
|
'ArticlePurge': Before executing "&action=purge".
|
||||||
[&]$wikiPage: WikiPage (object) to purge
|
[&]$wikiPage: WikiPage (object) to purge
|
||||||
|
|
||||||
'ArticleRevisionUndeleted': After an article revision is restored.
|
'ArticleRevisionUndeleted': DEPRECATED since 1.35! Use RevisionUndeleted instead.
|
||||||
|
After an article revision is restored.
|
||||||
[&]$title: the article title
|
[&]$title: the article title
|
||||||
$revision: the revision
|
$revision: the revision
|
||||||
$oldPageID: the page ID of the revision when archived (may be null)
|
$oldPageID: the page ID of the revision when archived (may be null)
|
||||||
|
|
@ -2896,6 +2897,9 @@ instead. Called after a revision is inserted into the database.
|
||||||
$data: DEPRECATED! Always null!
|
$data: DEPRECATED! Always null!
|
||||||
$flags: DEPRECATED! Always null!
|
$flags: DEPRECATED! Always null!
|
||||||
|
|
||||||
|
'RevisionUndeleted': After an article revision is restored.
|
||||||
|
$revisionRecord: the RevisionRecord that was restored
|
||||||
|
|
||||||
'SearchableNamespaces': An option to modify which namespaces are searchable.
|
'SearchableNamespaces': An option to modify which namespaces are searchable.
|
||||||
&$arr: Array of namespaces ($nsId => $name) which will be used.
|
&$arr: Array of namespaces ($nsId => $name) which will be used.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -750,9 +750,14 @@ class PageArchive {
|
||||||
|
|
||||||
$restored++;
|
$restored++;
|
||||||
|
|
||||||
|
Hooks::run( 'RevisionUndeleted', [ $revision ] );
|
||||||
|
|
||||||
|
// TODO: Hard deprecate after replacing uses with RevisionUndeleted
|
||||||
|
// Deprecated since 1.35
|
||||||
$legacyRevision = new Revision( $revision );
|
$legacyRevision = new Revision( $revision );
|
||||||
Hooks::run( 'ArticleRevisionUndeleted',
|
Hooks::run( 'ArticleRevisionUndeleted',
|
||||||
[ &$this->title, $legacyRevision, $row->ar_page_id ] );
|
[ &$this->title, $legacyRevision, $row->ar_page_id ] );
|
||||||
|
|
||||||
$restoredPages[$row->ar_page_id] = true;
|
$restoredPages[$row->ar_page_id] = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue