Add $suppress to ArticleDelete hook
authorAlex Monk <krenair@gmail.com>
Sun, 20 Sep 2015 21:50:19 +0000 (22:50 +0100)
committerUmherirrender <umherirrender_de.wp@web.de>
Wed, 14 Oct 2015 16:06:46 +0000 (16:06 +0000)
We should be telling extensions whether a deletion is a suppression or not, so
they can behave appropriately.

Change-Id: I2cb6ffd61dd12766fe0266514c9360ff0c90b788

docs/hooks.txt
includes/page/WikiPage.php

index 0e76d58..8d36603 100644 (file)
@@ -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.
index d656bad..ee13ea3 100644 (file)
@@ -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