From 39eaf982471edb8d277c9154b8d954b24d3fd792 Mon Sep 17 00:00:00 2001 From: Andrew Garrett Date: Mon, 28 Apr 2008 12:34:27 +0000 Subject: [PATCH] Pass the old article ID in the ArticleDeleteComplete hook, to allow, for example, extensions that store metadata about articles to do their own cascading deletes --- includes/Article.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/includes/Article.php b/includes/Article.php index 18be4da422..e56febfa4c 100644 --- a/includes/Article.php +++ b/includes/Article.php @@ -2217,6 +2217,8 @@ class Article { function doDelete( $reason, $suppress = false ) { global $wgOut, $wgUser; wfDebug( __METHOD__."\n" ); + + $id = $this->getId(); if (wfRunHooks('ArticleDelete', array(&$this, &$wgUser, &$reason))) { if ( $this->doDeleteArticle( $reason, $suppress ) ) { @@ -2229,7 +2231,7 @@ class Article { $wgOut->addWikiMsg( 'deletedtext', $deleted, $loglink ); $wgOut->returnToMain( false ); - wfRunHooks('ArticleDeleteComplete', array(&$this, &$wgUser, $reason)); + wfRunHooks('ArticleDeleteComplete', array(&$this, &$wgUser, $reason, $id)); } else { $wgOut->showFatalError( wfMsg( 'cannotdelete' ) ); } -- 2.20.1