From: Rob Church Date: Thu, 18 Jan 2007 07:44:25 +0000 (+0000) Subject: * (bug 8136) Introduce 'ArticleUndelete' hook; see docs/hooks.txt for more info X-Git-Tag: 1.31.0-rc.0~54315 X-Git-Url: https://git.cyclocoop.org/?a=commitdiff_plain;ds=sidebyside;h=2d5230dc1539562be372e2823ff7d7faa8c3e0cf;p=lhc%2Fweb%2Fwiklou.git * (bug 8136) Introduce 'ArticleUndelete' hook; see docs/hooks.txt for more info --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 4a7a894bb2..688cfafc87 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -119,7 +119,7 @@ lighter making things easier to read. * Ignore self closing on closing tags ( '' now gives '') * (bug 8673) Minor fix for web service API content-type header * Fix API revision list on PHP 5.2.1; bad reference assignment - +* (bug 8136) Introduce 'ArticleUndelete' hook; see docs/hooks.txt for more info == Languages updated == diff --git a/docs/hooks.txt b/docs/hooks.txt index a0b963c7c2..347ad5baa7 100644 --- a/docs/hooks.txt +++ b/docs/hooks.txt @@ -286,6 +286,11 @@ $isminor: minor flag $iswatch: watch flag $section: section # +'ArticleUndeleted': When one or more revisions of an article are restored +$title: Title corresponding to the article restored +$create: Whether or not the restoration caused the page to be created +(i.e. it didn't exist before) + 'AuthPluginSetup': update or replace authentication plugin object ($wgAuth) Gives a chance for an extension to set it programattically to a variable class. &$auth: the $wgAuth object, probably a stub diff --git a/includes/SpecialUndelete.php b/includes/SpecialUndelete.php index 888661b287..a837eafb08 100644 --- a/includes/SpecialUndelete.php +++ b/includes/SpecialUndelete.php @@ -431,8 +431,10 @@ class PageArchive { } if( $newid ) { + wfRunHooks( 'ArticleUndelete', array( &$this->title, true ) ); Article::onArticleCreate( $this->title ); } else { + wfRunHooks( 'ArticleUndelete', array( &$this->title, false ) ); Article::onArticleEdit( $this->title ); } } else {