*
* @param $session_id String: the session id to grab download details from
* @param $upload_session_key String: the key of the given upload session
- * (a given client could have started a few http uploads at once)
+ * (a given client could have started a few http uploads at once)
*/
public static function doSessionIdDownload( $session_id, $upload_session_key ){
global $wgUser, $wgEnableWriteAPI, $wgAsyncHTTPTimeout;
session_write_close();
$req = new HttpRequest( $sd['url'], array(
- 'target_file_path' => $sd['target_file_path'],
+ 'target_file_path' => $sd['target_file_path'],
'upload_session_key'=> $upload_session_key,
- 'timeout' => $wgAsyncHTTPTimeout
+ 'timeout' => $wgAsyncHTTPTimeout
) );
// run the actual request .. (this can take some time)
wfDebug( __METHOD__ . "do Request: " . $sd['url'] . ' tf: ' . $sd['target_file_path'] );
* Get the contents of a file by HTTP
* @param $url string Full URL to act on
* @param $Opt associative array Optional array of options:
- * 'method' => 'GET', 'POST' etc.
- * 'target_file_path' => if curl should output to a target file
- * 'adapter' => 'curl', 'soket'
+ * 'method' => 'GET', 'POST' etc.
+ * 'target_file_path' => if curl should output to a target file
+ * 'adapter' => 'curl', 'soket'
*/
public function doRequest() {
# Use curl if available
}
private function doCurlReq(){
- global $wgHTTPProxy, $wgTitle;
+ global $wgHTTPProxy, $wgTitle;
- $status = Status::newGood();
+ $status = Status::newGood();
$c = curl_init( $this->url );
// proxy setup:
var $mDestWarningAck;
var $mLocalFile;
- var $mUpload; // Instance of UploadBase or derivative
+ var $mUpload; // Instance of UploadBase or derivative
# Placeholders for text injection by hooks (must be HTML)
# extensions should take care to _append_ to the present value
$this->mReUpload = $request->getCheck( 'wpReUpload' );
$this->mAction = $request->getVal( 'action' );
- $this->mUpload = UploadBase::createFromRequest( $request );
+ $this->mUpload = UploadBase::createFromRequest( $request );
}
*
* FIXME this should really use the standard Status class (instead of associative array)
* FIXME would be nice if we refactored this into the upload api.
- * (the special upload page is not the only response point that needs clean localized error msgs)
+ * (the special upload page is not the only response point that needs clean localized error msgs)
*
* @access private
*/
function processUpload(){
global $wgOut, $wgFileExtensions, $wgLang;
- $details = $this->internalProcessUpload();
- switch( $details['status'] ) {
+ $details = $this->internalProcessUpload();
+ switch( $details['status'] ) {
case UploadBase::SUCCESS:
$wgOut->redirect( $this->mLocalFile->getTitle()->getFullURL() );
break;
default:
throw new MWException( __METHOD__ . ": Unknown value `{$details['status']}`" );
- }
+ }
}
/**
Xml::element( 'legend', null, wfMsg( 'upload' ) ) .
Xml::openElement( 'table', array( 'border' => '0', 'id' => 'mw-upload-table' ) ) .
"<tr>
- {$this->uploadFormTextTop}
+ {$this->uploadFormTextTop}
<td class='mw-label'>
<label for='wpUploadFile'>{$sourcefilename}</label>
</td>