Call method with the same name it's defined with
[lhc/web/wiklou.git] / includes / api / ApiDelete.php
index d1f0806..21264bc 100644 (file)
@@ -61,8 +61,7 @@ class ApiDelete extends ApiBase {
                        $this->dieUsageMsg( $status[0] );
                }
                if ( !$status->isGood() ) {
-                       $errors = $status->getErrorsArray();
-                       $this->dieUsageMsg( $errors[0] ); // We don't care about multiple errors, just report one of them
+                       $this->dieStatus( $status );
                }
 
                // Deprecated parameters
@@ -122,6 +121,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 );
        }
@@ -160,6 +160,7 @@ class ApiDelete extends ApiBase {
                if ( is_null( $reason ) ) { // Log and RC don't like null reasons
                        $reason = '';
                }
+
                return FileDeleteForm::doDelete( $title, $file, $oldimage, $reason, $suppress, $user );
        }
 
@@ -205,6 +206,7 @@ class ApiDelete extends ApiBase {
 
        public function getParamDescription() {
                $p = $this->getModulePrefix();
+
                return array(
                        'title' => "Title of the page you want to delete. Cannot be used together with {$p}pageid",
                        'pageid' => "Page ID of the page you want to delete. Cannot be used together with {$p}title",