From 91dd5f411a091436885bd438ab3061fb864f5971 Mon Sep 17 00:00:00 2001 From: Michael Dale Date: Wed, 15 Jul 2009 20:27:55 +0000 Subject: [PATCH] fixed httpstatus boolean & updated error to use dieUsageMsg --- includes/api/ApiUpload.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/includes/api/ApiUpload.php b/includes/api/ApiUpload.php index ec24ad27f6..3e86583e1a 100644 --- a/includes/api/ApiUpload.php +++ b/includes/api/ApiUpload.php @@ -89,9 +89,7 @@ class ApiUpload extends ApiBase { } else if( $this->mParams['httpstatus'] && $this->mParams['sessionkey'] ){ // return the status of the given upload session_key: if( !isset( $_SESSION['wsDownload'][ $this->mParams['sessionkey'] ] ) ){ - return $this->getResult()->addValue( null, $this->getModuleName(), - array( 'error' => 'invalid-session-key' - )); + return $this->dieUsageMsg( array( 'error' => 'invalid-session-key' ) ); } $sd = & $_SESSION['wsDownload'][$this->mParams['sessionkey']]; // keep passing down the upload sessionkey @@ -302,7 +300,7 @@ class ApiUpload extends ApiBase { 'ignorewarnings' => false, 'done' => false, 'sessionkey' => null, - 'httpstatus' => null, + 'httpstatus' => false, 'chunksessionkey' => null, 'internalhttpsession' => null, ); -- 2.20.1