Index: trunk/phase3/includes/api/ApiDelete.php |
— | — | @@ -137,10 +137,11 @@ |
138 | 138 | if($reason === false) |
139 | 139 | return array(array('cannotdelete')); |
140 | 140 | } |
141 | | - |
142 | | - if (!wfRunHooks('ArticleDelete', array(&$article, &$wgUser, &$reason))) |
143 | | - $this->dieUsageMsg(array('hookaborted')); |
144 | 141 | |
| 142 | + $error = ''; |
| 143 | + if (!wfRunHooks('ArticleDelete', array(&$article, &$wgUser, &$reason, $error))) |
| 144 | + $this->dieUsageMsg(array('hookaborted', $error)); |
| 145 | + |
145 | 146 | // Luckily, Article.php provides a reusable delete function that does the hard work for us |
146 | 147 | if($article->doDeleteArticle($reason)) { |
147 | 148 | wfRunHooks('ArticleDeleteComplete', array(&$article, &$wgUser, $reason, $article->getId())); |
Index: trunk/phase3/includes/FileDeleteForm.php |
— | — | @@ -108,7 +108,8 @@ |
109 | 109 | $id = $title->getArticleID( GAID_FOR_UPDATE ); |
110 | 110 | // Need to delete the associated article |
111 | 111 | $article = new Article( $title ); |
112 | | - if( wfRunHooks('ArticleDelete', array(&$article, &$wgUser, &$reason)) ) { |
| 112 | + $error = ''; |
| 113 | + if( wfRunHooks('ArticleDelete', array(&$article, &$wgUser, &$reason, &$error)) ) { |
113 | 114 | if( $article->doDeleteArticle( $reason, $suppress, $id ) ) { |
114 | 115 | global $wgRequest; |
115 | 116 | if( $wgRequest->getCheck( 'wpWatch' ) ) { |