From: Michael Dale Date: Thu, 27 Aug 2009 14:46:54 +0000 (+0000) Subject: enabled async downloaded via configuration var: wgEnableAsyncDownload (pending window... X-Git-Tag: 1.31.0-rc.0~40035 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/comptes/ajouter.php?a=commitdiff_plain;h=8fbc2feb5ac389f7627977eeb2ce3f9a123a84c9;p=lhc%2Fweb%2Fwiklou.git enabled async downloaded via configuration var: wgEnableAsyncDownload (pending windows fix) --- 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() {