| 1 | <?php |
| 2 | |
| 3 | namespace MediaWiki\Page\Hook; |
| 4 | |
| 5 | use MediaWiki\Title\Title; |
| 6 | |
| 7 | /** |
| 8 | * This is a hook handler interface, see docs/Hooks.md. |
| 9 | * Use the hook name "ArticleUndelete" to register handlers implementing this interface. |
| 10 | * |
| 11 | * @ingroup Hooks |
| 12 | * @deprecated since 1.40, use PageUndeleteComplete instead. New hook follows consistent naming style and exposes |
| 13 | * variable similar to its counterpart PageDeleteComplete. |
| 14 | */ |
| 15 | interface ArticleUndeleteHook { |
| 16 | /** |
| 17 | * This hook is called when one or more revisions of an article are restored. |
| 18 | * |
| 19 | * @since 1.35 |
| 20 | * |
| 21 | * @param Title $title Title corresponding to the article restored |
| 22 | * @param bool $create Whether or not the restoration caused the page to be created (i.e. it |
| 23 | * didn't exist before) |
| 24 | * @param string $comment Comment associated with the undeletion |
| 25 | * @param int $oldPageId ID of page previously deleted (from archive table). This ID will be used |
| 26 | * for the restored page. |
| 27 | * @param array $restoredPages Set of page IDs that have revisions restored for this undelete, |
| 28 | * with keys set to page IDs and values set to 'true' |
| 29 | * @return bool|void True or no return value to continue or false to abort |
| 30 | */ |
| 31 | public function onArticleUndelete( $title, $create, $comment, $oldPageId, |
| 32 | $restoredPages |
| 33 | ); |
| 34 | } |