From: Bryan Tong Minh Date: Sat, 9 Feb 2008 12:32:32 +0000 (+0000) Subject: New hooks: LinksUpdate, LinksUpdateComplete. Add function getTitle to LinksUpdate. X-Git-Tag: 1.31.0-rc.0~49549 X-Git-Url: https://git.cyclocoop.org/admin/%7B%7Blocalurl:Special:UserLogin%7D%7D?a=commitdiff_plain;h=8599bbee84e49ce6e98b681c9813065f4dbf500f;p=lhc%2Fweb%2Fwiklou.git New hooks: LinksUpdate, LinksUpdateComplete. Add function getTitle to LinksUpdate. --- 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; + } }