r55622 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r55621‎ | r55622 | r55623 >
Date:14:46, 27 August 2009
Author:dale
Status:ok (Comments)
Tags:
Comment:
enabled async downloaded via configuration var: wgEnableAsyncDownload (pending windows fix)
Modified paths:
  • /trunk/phase3/includes/api/ApiUpload.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/api/ApiUpload.php
@@ -74,7 +74,7 @@
7575 // TODO: Move to subclass
7676 $sd = & $_SESSION['wsDownload'][ $this->mParams['internalhttpsession'] ];
7777
78 - wfDebug("InternalHTTP:: " . print_r($this->mParams, true));
 78+ //wfDebug("InternalHTTP:: " . print_r($this->mParams, true));
7979 // get the params from the init session:
8080 $this->mUpload = new UploadFromFile();
8181
@@ -305,7 +305,8 @@
306306 }
307307
308308 public function getAllowedParams() {
309 - return array(
 309+ global $wgEnableAsyncDownload;
 310+ $params = array(
310311 'filename' => null,
311312 'comment' => array(
312313 ApiBase::PARAM_DFLT => ''
@@ -319,11 +320,14 @@
320321 'chunk' => null,
321322 'done' => false,
322323 'url' => null,
323 - /*'asyncdownload' => false,*/ // btongminh: Disabled pending fixing wfShellBackgroundExec
324324 'httpstatus' => false,
325325 'sessionkey' => null,
326326 'internalhttpsession' => null,
327327 );
 328+ if($wgEnableAsyncDownload){
 329+ $params['asyncdownload'] = false;
 330+ }
 331+ return $params;
328332 }
329333
330334 public function getParamDescription() {

Comments

#Comment by Bryan (talk | contribs)   14:49, 27 August 2009

This doesn't fix the underlying issue that wfShellBackgroundExec doesn't work at all. (Or at least it ignores the &, so that downloads are still performed synchronously)

#Comment by Mdale (talk | contribs)   18:18, 27 August 2009

I tested it locally with both memchached session and php session, and it "works in my local ubuntu install" .. if there is a better command for wfShellBackgroundExec let me know.

Status & tagging log