Index: trunk/phase3/includes/api/ApiUpload.php |
— | — | @@ -74,7 +74,7 @@ |
75 | 75 | // TODO: Move to subclass |
76 | 76 | $sd = & $_SESSION['wsDownload'][ $this->mParams['internalhttpsession'] ]; |
77 | 77 | |
78 | | - wfDebug("InternalHTTP:: " . print_r($this->mParams, true)); |
| 78 | + //wfDebug("InternalHTTP:: " . print_r($this->mParams, true)); |
79 | 79 | // get the params from the init session: |
80 | 80 | $this->mUpload = new UploadFromFile(); |
81 | 81 | |
— | — | @@ -305,7 +305,8 @@ |
306 | 306 | } |
307 | 307 | |
308 | 308 | public function getAllowedParams() { |
309 | | - return array( |
| 309 | + global $wgEnableAsyncDownload; |
| 310 | + $params = array( |
310 | 311 | 'filename' => null, |
311 | 312 | 'comment' => array( |
312 | 313 | ApiBase::PARAM_DFLT => '' |
— | — | @@ -319,11 +320,14 @@ |
320 | 321 | 'chunk' => null, |
321 | 322 | 'done' => false, |
322 | 323 | 'url' => null, |
323 | | - /*'asyncdownload' => false,*/ // btongminh: Disabled pending fixing wfShellBackgroundExec |
324 | 324 | 'httpstatus' => false, |
325 | 325 | 'sessionkey' => null, |
326 | 326 | 'internalhttpsession' => null, |
327 | 327 | ); |
| 328 | + if($wgEnableAsyncDownload){ |
| 329 | + $params['asyncdownload'] = false; |
| 330 | + } |
| 331 | + return $params; |
328 | 332 | } |
329 | 333 | |
330 | 334 | public function getParamDescription() { |