From: Alex Monk Date: Sun, 20 Sep 2015 21:50:19 +0000 (+0100) Subject: Add $suppress to ArticleDelete hook X-Git-Tag: 1.31.0-rc.0~9394 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/banques/ajouter.php?a=commitdiff_plain;h=8223023be39e5d763e51287b7d86321398cf7018;p=lhc%2Fweb%2Fwiklou.git Add $suppress to ArticleDelete hook We should be telling extensions whether a deletion is a suppression or not, so they can behave appropriately. Change-Id: I2cb6ffd61dd12766fe0266514c9360ff0c90b788 --- diff --git a/docs/hooks.txt b/docs/hooks.txt index 0e76d58a74..8d3660374d 100644 --- a/docs/hooks.txt +++ b/docs/hooks.txt @@ -575,6 +575,7 @@ $error: if the deletion was prohibited, the (raw HTML) error message to display (added in 1.13) $status: Status object, modify this to throw an error. Overridden by $error (added in 1.20) +$suppress: Whether this is a suppression deletion or not (added in 1.27) 'ArticleDeleteAfterSuccess': Output after an article has been deleted. $title: Title of the article that has been deleted. diff --git a/includes/page/WikiPage.php b/includes/page/WikiPage.php index d656bad195..ee13ea37d9 100644 --- a/includes/page/WikiPage.php +++ b/includes/page/WikiPage.php @@ -2780,7 +2780,7 @@ class WikiPage implements Page, IDBAccessObject { $user = is_null( $user ) ? $wgUser : $user; if ( !Hooks::run( 'ArticleDelete', - array( &$this, &$user, &$reason, &$error, &$status ) + array( &$this, &$user, &$reason, &$error, &$status, $suppress ) ) ) { if ( $status->isOK() ) { // Hook aborted but didn't set a fatal status