Merge "escape HTML elements in docblock with double quotes"
[lhc/web/wiklou.git] / includes / api / ApiDelete.php
index 72ddc37..b5079a2 100644 (file)
@@ -4,7 +4,7 @@
  *
  * Created on Jun 30, 2007
  *
- * Copyright © 2007 Roan Kattouw <Firstname>.<Lastname>@gmail.com
+ * Copyright © 2007 Roan Kattouw "<Firstname>.<Lastname>@gmail.com"
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -52,7 +52,7 @@ class ApiDelete extends ApiBase {
                }
 
                $titleObj = $pageObj->getTitle();
-               $reason = ( isset( $params['reason'] ) ? $params['reason'] : null );
+               $reason = $params['reason'];
                $user = $this->getUser();
 
                if ( $titleObj->getNamespace() == NS_FILE ) {
@@ -62,7 +62,7 @@ class ApiDelete extends ApiBase {
                }
 
                if ( !$status->isGood() ) {
-                       $errors = $this->getErrorsArray();
+                       $errors = $status->getErrorsArray();
                        $this->dieUsageMsg( $errors[0] ); // We don't care about multiple errors, just report one of them
                }
 
@@ -217,6 +217,15 @@ class ApiDelete extends ApiBase {
                );
        }
 
+       public function getResultProperties() {
+               return array(
+                       '' => array(
+                               'title' => 'string',
+                               'reason' => 'string'
+                       )
+               );
+       }
+
        public function getDescription() {
                return 'Delete a page';
        }