From 8599bbee84e49ce6e98b681c9813065f4dbf500f Mon Sep 17 00:00:00 2001 From: Bryan Tong Minh Date: Sat, 9 Feb 2008 12:32:32 +0000 Subject: [PATCH] New hooks: LinksUpdate, LinksUpdateComplete. Add function getTitle to LinksUpdate. --- docs/hooks.txt | 6 ++++++ includes/LinksUpdate.php | 11 +++++++++++ 2 files changed, 17 insertions(+) diff --git a/docs/hooks.txt b/docs/hooks.txt index fb9517a268..17ac821073 100644 --- a/docs/hooks.txt +++ b/docs/hooks.txt @@ -637,6 +637,12 @@ $lang: laguage code (string) $specialPageAliases: associative array of magic words synonyms $lang: laguage code (string) +'LinksUpdate': At the beginning of LinksUpdate::doUpdate() just before the actual update +&$linksUpdate: the LinkUpdate object + +'LinksUpdateComplete': At the end of LinksUpdate::doUpdate() when updating has completed +&$linksUpdate: the LinkUpdate object + 'LinksUpdateConstructed': At the end of LinksUpdate() is contruction. &$linksUpdate: the LinkUpdate object diff --git a/includes/LinksUpdate.php b/includes/LinksUpdate.php index 9bcd9d67e6..a52414c39b 100644 --- a/includes/LinksUpdate.php +++ b/includes/LinksUpdate.php @@ -73,11 +73,15 @@ class LinksUpdate { */ function doUpdate() { global $wgUseDumbLinkUpdate; + + wfRunHooks( 'LinksUpdate', array( &$this ) ); if ( $wgUseDumbLinkUpdate ) { $this->doDumbUpdate(); } else { $this->doIncrementalUpdate(); } + wfRunHooks( 'LinksUpdateComplete', array( &$this ) ); + } function doIncrementalUpdate() { @@ -595,5 +599,12 @@ class LinksUpdate { } return $arr; } + + /** + * Return the title object of the page being updated + */ + function getTitle() { + return $this->mTitle; + } } -- 2.20.1