Add an "ArticleDeleteAfterSuccess" hook
authorMarius Hoch <hoo@online.de>
Sat, 1 Nov 2014 20:39:52 +0000 (21:39 +0100)
committerMarius Hoch <hoo@online.de>
Sat, 1 Nov 2014 20:58:12 +0000 (21:58 +0100)
So that we can show what Wikibase did after the deletion.

Change-Id: If99be002973e68c84125158ff9747b140fb38ea1

docs/hooks.txt
includes/page/Article.php

index 52eeab8..d24c66d 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 54fab29..ac86e8f 100644 (file)
@@ -1807,6 +1807,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(