jenkins-bot has submitted this change and it was merged.

Change subject: Add $suppress to ArticleDelete hook
......................................................................


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
---
M docs/hooks.txt
M includes/page/WikiPage.php
2 files changed, 2 insertions(+), 1 deletion(-)

Approvals:
  Umherirrender: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/docs/hooks.txt b/docs/hooks.txt
index 0e76d58..8d36603 100644
--- a/docs/hooks.txt
+++ b/docs/hooks.txt
@@ -575,6 +575,7 @@
   (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 d656bad..ee13ea3 100644
--- a/includes/page/WikiPage.php
+++ b/includes/page/WikiPage.php
@@ -2780,7 +2780,7 @@
 
                $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

-- 
To view, visit https://gerrit.wikimedia.org/r/239758
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I2cb6ffd61dd12766fe0266514c9360ff0c90b788
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Alex Monk <[email protected]>
Gerrit-Reviewer: CSteipp <[email protected]>
Gerrit-Reviewer: Hoo man <[email protected]>
Gerrit-Reviewer: Umherirrender <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to