Merge "API: Use message-per-value for apihelp-query+usercontribs-param-prop"
[lhc/web/wiklou.git] / includes / api / ApiDelete.php
index e455f71..bdf02bf 100644 (file)
@@ -39,6 +39,8 @@ class ApiDelete extends ApiBase {
         * result object.
         */
        public function execute() {
+               $this->useTransactionalTimeLimit();
+
                $params = $this->extractRequestParams();
 
                $pageObj = $this->getTitleOrPageId( $params, 'fromdbmaster' );
@@ -131,7 +133,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 );
        }
 
        /**
@@ -214,7 +216,7 @@ class ApiDelete extends ApiBase {
                return 'csrf';
        }
 
-       public function getExamplesMessages() {
+       protected function getExamplesMessages() {
                return array(
                        'action=delete&title=Main%20Page&token=123ABC'
                                => 'apihelp-delete-example-simple',