From 8fbc2feb5ac389f7627977eeb2ce3f9a123a84c9 Mon Sep 17 00:00:00 2001 From: Michael Dale Date: Thu, 27 Aug 2009 14:46:54 +0000 Subject: [PATCH] enabled async downloaded via configuration var: wgEnableAsyncDownload (pending windows fix) --- includes/api/ApiUpload.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/includes/api/ApiUpload.php b/includes/api/ApiUpload.php index 3c6debd8fd..41be72d340 100644 --- a/includes/api/ApiUpload.php +++ b/includes/api/ApiUpload.php @@ -74,7 +74,7 @@ class ApiUpload extends ApiBase { // TODO: Move to subclass $sd = & $_SESSION['wsDownload'][ $this->mParams['internalhttpsession'] ]; - wfDebug("InternalHTTP:: " . print_r($this->mParams, true)); + //wfDebug("InternalHTTP:: " . print_r($this->mParams, true)); // get the params from the init session: $this->mUpload = new UploadFromFile(); @@ -305,7 +305,8 @@ class ApiUpload extends ApiBase { } public function getAllowedParams() { - return array( + global $wgEnableAsyncDownload; + $params = array( 'filename' => null, 'comment' => array( ApiBase::PARAM_DFLT => '' @@ -319,11 +320,14 @@ class ApiUpload extends ApiBase { 'chunk' => null, 'done' => false, 'url' => null, - /*'asyncdownload' => false,*/ // btongminh: Disabled pending fixing wfShellBackgroundExec 'httpstatus' => false, 'sessionkey' => null, 'internalhttpsession' => null, ); + if($wgEnableAsyncDownload){ + $params['asyncdownload'] = false; + } + return $params; } public function getParamDescription() { -- 2.20.1