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

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T10136, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 8136 - Trigger hook on page rollback
Trigger hook on page rollback
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
General/Unknown (Other open bugs)
unspecified
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: ---


Attachments

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
method.
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.


Navigation
Links