Merge "API: Cleanup around comment/reason params"
authorCatrope <roan.kattouw@gmail.com>
Wed, 18 Jul 2012 01:59:34 +0000 (01:59 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Wed, 18 Jul 2012 01:59:34 +0000 (01:59 +0000)
1  2 
includes/api/ApiDelete.php

@@@ -52,7 -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 +62,7 @@@
                }
  
                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
                }