Merge "Add an "ArticleDeleteAfterSuccess" hook"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Wed, 5 Nov 2014 09:47:58 +0000 (09:47 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Wed, 5 Nov 2014 09:47:58 +0000 (09:47 +0000)
docs/hooks.txt
includes/page/Article.php

index 18b7099..0eb6572 100644 (file)
@@ -528,6 +528,10 @@ $error: if the deletion was prohibited, the (raw HTML) error message to display
 $status: Status object, modify this to throw an error. Overridden by $error
   (added in 1.20)
 
+'ArticleDeleteAfterSuccess': Output after an article has been deleted.
+$title: Title of the article that has been deleted.
+$outputPage: OutputPage that can be used to append the output.
+
 'ArticleDeleteComplete': After an article is deleted.
 $wikiPage: the WikiPage that was deleted
 $user: the user that deleted the article
index 7900b2c..cf53f1d 100644 (file)
@@ -1803,6 +1803,9 @@ class Article implements Page {
                        $loglink = '[[Special:Log/delete|' . wfMessage( 'deletionlog' )->text() . ']]';
 
                        $outputPage->addWikiMsg( 'deletedtext', wfEscapeWikiText( $deleted ), $loglink );
+
+                       wfRunHooks( 'ArticleDeleteAfterSuccess', array( $this->getTitle(), $outputPage ) );
+
                        $outputPage->returnToMain( false );
                } else {
                        $outputPage->setPageTitle(