New "ArticleEditUpdates" hook (bug 15490)
authorAaron Schulz <aaron@users.mediawiki.org>
Sat, 27 Sep 2008 10:52:49 +0000 (10:52 +0000)
committerAaron Schulz <aaron@users.mediawiki.org>
Sat, 27 Sep 2008 10:52:49 +0000 (10:52 +0000)
docs/hooks.txt
includes/Article.php

index ff87ece..9a0ad25 100644 (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
 
index 28a83b7..e389de3 100644 (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 ) ) {