New "ArticleEditUpdates" hook (bug 15490)

This commit is contained in:
Aaron Schulz 2008-09-27 10:52:49 +00:00
parent c49599293b
commit 24fd3960f7
2 changed files with 7 additions and 0 deletions

View file

@ -352,6 +352,11 @@ $id: id of the article that was deleted
'ArticleEditUpdateNewTalk': before updating user_newtalk when a user talk page was changed
$article: article (object) of the user talk page
'ArticleEditUpdates': when edit updates (mainly link tracking) are made when an article has been changed
$article: the article (object)
$editInfo: data holder that includes the parser output ($editInfo->output) for that page after the change
$changed: bool for if the page was changed
'ArticleEditUpdatesDeleteFromRecentchanges': before deleting old entries from recentchanges table, return false to not delete old entries
$article: article (object) being modified

View file

@ -2814,6 +2814,8 @@ class Article {
$u = new LinksUpdate( $this->mTitle, $editInfo->output, false );
$u->setRecursiveTouch( $changed ); // refresh/invalidate including pages too
$u->doUpdate();
wfRunHooks( 'ArticleEditUpdates', array( &$this, &$editInfo, $changed ) );
if( wfRunHooks( 'ArticleEditUpdatesDeleteFromRecentchanges', array( &$this ) ) ) {
if ( 0 == mt_rand( 0, 99 ) ) {