Index: trunk/phase3/includes/api/ApiUpload.php |
— | — | @@ -138,8 +138,8 @@ |
139 | 139 | // Cleanup any temporary mess |
140 | 140 | $this->mUpload->cleanupTempFile(); |
141 | 141 | |
142 | | - if( $this->mParams['enablechunks'] ) { |
143 | | - foreach ($result as $key => $value) { |
| 142 | + if( isset($result['chunked-output']) ) { |
| 143 | + foreach ($result['chunked-output'] as $key => $value) { |
144 | 144 | if($value === null) $value = ""; |
145 | 145 | $this->getResult()->addValue( null, $key, $value ); |
146 | 146 | } |
— | — | @@ -249,7 +249,7 @@ |
250 | 250 | |
251 | 251 | $this->dieUsage( 'An internal error occurred', 'internal-error', 0, $error ); |
252 | 252 | } elseif( $this->mParams['enablechunks'] ) { |
253 | | - return $status->value; |
| 253 | + return array("chunked-output" => $status->value); |
254 | 254 | } |
255 | 255 | |
256 | 256 | $file = $this->mUpload->getLocalFile(); |
— | — | @@ -279,7 +279,7 @@ |
280 | 280 | 'watch' => false, |
281 | 281 | 'ignorewarnings' => false, |
282 | 282 | 'file' => null, |
283 | | - 'enablechunks' => false, |
| 283 | + 'enablechunks' => null, /* must be null to work with requireOnlyOneParameter */ |
284 | 284 | 'chunksession' => null, |
285 | 285 | 'chunk' => null, |
286 | 286 | 'done' => false, |