From 24fd3960f775fc8bd5d3912ea8f6fa9d530be917 Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Sat, 27 Sep 2008 10:52:49 +0000 Subject: [PATCH] New "ArticleEditUpdates" hook (bug 15490) --- docs/hooks.txt | 5 +++++ includes/Article.php | 2 ++ 2 files changed, 7 insertions(+) diff --git a/docs/hooks.txt b/docs/hooks.txt index ff87eceb8c..9a0ad256cd 100644 --- a/docs/hooks.txt +++ b/docs/hooks.txt @@ -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 diff --git a/includes/Article.php b/includes/Article.php index 28a83b71e2..e389de3bab 100644 --- a/includes/Article.php +++ b/includes/Article.php @@ -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 ) ) { -- 2.20.1