$id = $title->getArticleID( GAID_FOR_UPDATE );
// Need to delete the associated article
$article = new Article( $title );
- if( wfRunHooks('ArticleDelete', array(&$article, &$wgUser, &$reason)) ) {
+ $error = '';
+ if( wfRunHooks('ArticleDelete', array(&$article, &$wgUser, &$reason, &$error)) ) {
if( $article->doDeleteArticle( $reason, $suppress, $id ) ) {
global $wgRequest;
if( $wgRequest->getCheck( 'wpWatch' ) ) {
if($reason === false)
return array(array('cannotdelete'));
}
-
- if (!wfRunHooks('ArticleDelete', array(&$article, &$wgUser, &$reason)))
- $this->dieUsageMsg(array('hookaborted'));
+
+ $error = '';
+ if (!wfRunHooks('ArticleDelete', array(&$article, &$wgUser, &$reason, $error)))
+ $this->dieUsageMsg(array('hookaborted', $error));
// Luckily, Article.php provides a reusable delete function that does the hard work for us
if($article->doDeleteArticle($reason)) {