From: Andrew Garrett Date: Mon, 28 Apr 2008 12:34:27 +0000 (+0000) Subject: Pass the old article ID in the ArticleDeleteComplete hook, to allow, for example... X-Git-Tag: 1.31.0-rc.0~48036 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/membres/fiche.php?a=commitdiff_plain;h=39eaf982471edb8d277c9154b8d954b24d3fd792;p=lhc%2Fweb%2Fwiklou.git 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 --- 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' ) ); }