diff options
author | cenarium <cenarium.sysop@gmail.com> | 2016-09-21 19:18:08 +0200 |
---|---|---|
committer | cenarium <cenarium.sysop@gmail.com> | 2016-09-21 19:18:28 +0200 |
commit | e1509f0caa25c0dbecd93bdaa082564f925d4665 (patch) | |
tree | d4ae18afbe84717e8a43061a47116e48bb306cf6 /includes/FileDeleteForm.php | |
parent | 550ef848c738d654629ed6e8d0ef9b7511a9dc5d (diff) | |
download | mediawikicore-e1509f0caa25c0dbecd93bdaa082564f925d4665.tar.gz mediawikicore-e1509f0caa25c0dbecd93bdaa082564f925d4665.zip |
Move tagging of API deletions to RC save
Since the recent change save of logged actions is now deferred, we need
to move tagging of API deletions to the RC save, like other API actions
do already. Otherwise, only the log gets tagged, not the RC.
Bug: T108564
Change-Id: I4e6e18e7f8fb7a6b0932e7579bafddcc1b0a9758
Diffstat (limited to 'includes/FileDeleteForm.php')
-rw-r--r-- | includes/FileDeleteForm.php | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/includes/FileDeleteForm.php b/includes/FileDeleteForm.php index 47360df81f78..e6223e81b84e 100644 --- a/includes/FileDeleteForm.php +++ b/includes/FileDeleteForm.php @@ -150,11 +150,12 @@ class FileDeleteForm { * @param string $reason Reason of the deletion * @param bool $suppress Whether to mark all deleted versions as restricted * @param User $user User object performing the request + * @param array $tags Tags to apply to the deletion action * @throws MWException * @return bool|Status */ public static function doDelete( &$title, &$file, &$oldimage, $reason, - $suppress, User $user = null + $suppress, User $user = null, $tags = [] ) { if ( $user === null ) { global $wgUser; @@ -178,6 +179,7 @@ class FileDeleteForm { $logEntry->setPerformer( $user ); $logEntry->setTarget( $title ); $logEntry->setComment( $logComment ); + $logEntry->setTags( $tags ); $logid = $logEntry->insert(); $logEntry->publish( $logid ); @@ -192,7 +194,8 @@ class FileDeleteForm { $dbw->startAtomic( __METHOD__ ); // delete the associated article first $error = ''; - $deleteStatus = $page->doDeleteArticleReal( $reason, $suppress, 0, false, $error, $user ); + $deleteStatus = $page->doDeleteArticleReal( $reason, $suppress, 0, false, $error, + $user, $tags ); // doDeleteArticleReal() returns a non-fatal error status if the page // or revision is missing, so check for isOK() rather than isGood() if ( $deleteStatus->isOK() ) { |