* (bug 8136) Introduce 'ArticleUndelete' hook; see docs/hooks.txt for more info
authorRob Church <robchurch@users.mediawiki.org>
Thu, 18 Jan 2007 07:44:25 +0000 (07:44 +0000)
committerRob Church <robchurch@users.mediawiki.org>
Thu, 18 Jan 2007 07:44:25 +0000 (07:44 +0000)
RELEASE-NOTES
docs/hooks.txt
includes/SpecialUndelete.php

index 4a7a894..688cfaf 100644 (file)
@@ -119,7 +119,7 @@ lighter making things easier to read.
 * Ignore self closing on closing tags ( '</div />' now gives '</div>') 
 * (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 ==
 
index a0b963c..347ad5b 100644 (file)
@@ -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
index 888661b..a837eaf 100644 (file)
@@ -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 {