Last modified: 2008-06-11 02:02:23 UTC
As far as I can see, there is currently no way for an extension to react to a
page being undeleted (restored) or an edit being rolled-back.
This means that extensions which cache meta-data based on the page contents will
go out of sync if either of these situations occur.
I don't know if either of these warrant a new hook, or whether
ArticleInsertComplete (for undelete) and ArticleSave/ArticleSaveComplete (for
rollback) should be re-used.
I am happy to implement a patch for this if someone can advise me on the best
New hooks sound appropriate to me.
Article::onArticleCreate() looks like the right place for a lower-level article
creation hook than 'ArticleInsertComplete'.
However, Article::onArticleCreate() is used as a cache clearing function from
Title.php which makes it a misnomer. I recommend separating it into a function
which reflects its name and calls an 'OnArticleCreate' hook and a new
cache-clearing function with a name to match which can be called from Title.php
when moving articles.
'ArticleUndelete' hook added in r19441. Repurposing bug to the rollback hook.
Handled via ArticleRollbackComplete, as of 1.12.