From: Michael Dale Date: Wed, 15 Jul 2009 20:27:55 +0000 (+0000) Subject: fixed httpstatus boolean & updated error to use dieUsageMsg X-Git-Tag: 1.31.0-rc.0~40913 X-Git-Url: http://git.cyclocoop.org/%7B%7B%20url_for%28%27admin_vote_add%27%29%20%7D%7D?a=commitdiff_plain;h=91dd5f411a091436885bd438ab3061fb864f5971;p=lhc%2Fweb%2Fwiklou.git fixed httpstatus boolean & updated error to use dieUsageMsg --- 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, );