From: jenkins-bot Date: Wed, 1 Jul 2015 15:13:22 +0000 (+0000) Subject: Merge "Pass user to WikiPage::doDeleteArticleReal" X-Git-Tag: 1.31.0-rc.0~10917 X-Git-Url: https://git.cyclocoop.org/%242?a=commitdiff_plain;h=cbe6abfd239a451a5500b0affe1abbbd73d03d64;hp=4fe6cba775718ef4bf7c762588939a12e5b2f98c;p=lhc%2Fweb%2Fwiklou.git Merge "Pass user to WikiPage::doDeleteArticleReal" --- diff --git a/includes/api/ApiDelete.php b/includes/api/ApiDelete.php index d8b57182c4..6279dfdef8 100644 --- a/includes/api/ApiDelete.php +++ b/includes/api/ApiDelete.php @@ -131,7 +131,7 @@ class ApiDelete extends ApiBase { $error = ''; // Luckily, Article.php provides a reusable delete function that does the hard work for us - return $page->doDeleteArticleReal( $reason, false, 0, true, $error ); + return $page->doDeleteArticleReal( $reason, false, 0, true, $error, $user ); } /** diff --git a/includes/page/Article.php b/includes/page/Article.php index a6b6b51ce8..f213f6a2cf 100644 --- a/includes/page/Article.php +++ b/includes/page/Article.php @@ -1795,8 +1795,10 @@ class Article implements Page { */ public function doDelete( $reason, $suppress = false ) { $error = ''; - $outputPage = $this->getContext()->getOutput(); - $status = $this->mPage->doDeleteArticleReal( $reason, $suppress, 0, true, $error ); + $context = $this->getContext(); + $outputPage = $context->getOutput(); + $user = $context->getUser(); + $status = $this->mPage->doDeleteArticleReal( $reason, $suppress, 0, true, $error, $user ); if ( $status->isGood() ) { $deleted = $this->getTitle()->getPrefixedText();