Last modified: 2008-06-11 02:02:23 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 8136 - Trigger hook on page rollback
Trigger hook on page rollback
Product: MediaWiki
Classification: Unclassified
General/Unknown (Other open bugs)
All All
: Normal enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
Depends on:
Blocks: 8649
  Show dependency treegraph
Reported: 2006-12-03 16:48 UTC by Mark Clements (HappyDog)
Modified: 2008-06-11 02:02 UTC (History)
2 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Description Mark Clements (HappyDog) 2006-12-03 16:48:46 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
Comment 1 Rob Church 2006-12-03 22:02:03 UTC
New hooks sound appropriate to me.
Comment 2 Andrew Dunbar 2007-01-10 00:33:31 UTC
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.
Comment 3 Rob Church 2007-01-18 07:45:31 UTC
'ArticleUndelete' hook added in r19441. Repurposing bug to the rollback hook.
Comment 4 Chad H. 2008-06-11 02:02:23 UTC
Handled via ArticleRollbackComplete, as of 1.12.

Note You need to log in before you can comment on or make changes to this bug.