* should write to a file location and give updates
*
*/
- private function initBackgroundDownload( $url, $target_file_path, $content_length = null ){
+ private static function initBackgroundDownload( $url, $target_file_path, $content_length = null ){
global $wgMaxUploadSize, $IP, $wgPhpCli, $wgServer;
$status = Status::newGood();
// run the background download request:
$cmd = $wgPhpCli . ' ' . $IP . "/maintenance/http_session_download.php --sid {$session_id} --usk {$upload_session_key}";
- $pid = wfShellBackgroundExec( $cmd, $retval );
+ $pid = wfShellBackgroundExec( $cmd );
// the pid is not of much use since we won't be visiting this same apache any-time soon.
if( !$pid )
return Status::newFatal( 'could not run background shell exec' );
return $status;
}
- function getUploadSessionKey(){
+ static function getUploadSessionKey(){
$key = mt_rand( 0, 0x7fffffff );
$_SESSION['wsUploadData'][$key] = array();
return $key;
}
}
-}
\ No newline at end of file
+}