UploadFromUrl Class Reference

Inherits UploadBase.

List of all members.

Public Member Functions

 initialize ($name, $url, $na, $nb=false)
 Entry point for API upload.
 initializeFromRequest (&$request)
 Entry point for SpecialUpload.
 fetchFile ()
 Do the real fetching stuff.
 uploadCurlCallback ($ch, $data)
 Callback function for CURL-based web transfer Write data to file unless we've passed the length limit; if so, abort immediately.

Static Public Member Functions

static isAllowed ($user)
 Checks if the user is allowed to use the upload-by-URL feature.
static isEnabled ()
 Checks if the upload from URL feature is enabled.
static isValidRequest ($request)
static isValidUrl ($url)

Protected Attributes

 $mTempDownloadPath

Private Member Functions

 curlCopy ()
 Safe copy from URL Returns true if there was an error, false otherwise.


Detailed Description

Definition at line 11 of file UploadFromUrl.php.


Member Function Documentation

UploadFromUrl::curlCopy (  )  [private]

Safe copy from URL Returns true if there was an error, false otherwise.

Definition at line 92 of file UploadFromUrl.php.

References $wgOut.

Referenced by fetchFile().

UploadFromUrl::fetchFile (  ) 

Do the real fetching stuff.

Reimplemented from UploadBase.

Definition at line 77 of file UploadFromUrl.php.

References $res, curlCopy(), Status::newFatal(), and Status::newGood().

UploadFromUrl::initialize ( name,
url,
na,
nb = false 
)

Entry point for API upload.

Definition at line 35 of file UploadFromUrl.php.

References $name, $url, $wgTmpDirectory, and UploadBase::initializePathInfo().

Referenced by initializeFromRequest().

UploadFromUrl::initializeFromRequest ( &$  request  ) 

Entry point for SpecialUpload.

Parameters:
$request Object: WebRequest object

Reimplemented from UploadBase.

Definition at line 48 of file UploadFromUrl.php.

References initialize().

static UploadFromUrl::isAllowed ( user  )  [static]

Checks if the user is allowed to use the upload-by-URL feature.

If the user is allowed, pass on permissions checking to the parent.

Reimplemented from UploadBase.

Definition at line 18 of file UploadFromUrl.php.

static UploadFromUrl::isEnabled (  )  [static]

Checks if the upload from URL feature is enabled.

Reimplemented from UploadBase.

Definition at line 27 of file UploadFromUrl.php.

References $wgAllowCopyUploads.

Referenced by UploadForm::getSourceSection().

static UploadFromUrl::isValidRequest ( request  )  [static]

Parameters:
$request Object: WebRequest object

Reimplemented from UploadBase.

Definition at line 62 of file UploadFromUrl.php.

References isValidUrl().

static UploadFromUrl::isValidUrl ( url  )  [static]

Definition at line 69 of file UploadFromUrl.php.

References $url.

Referenced by isValidRequest().

UploadFromUrl::uploadCurlCallback ( ch,
data 
)

Callback function for CURL-based web transfer Write data to file unless we've passed the length limit; if so, abort immediately.

Access:
private

Definition at line 127 of file UploadFromUrl.php.

References $wgMaxUploadSize.


Member Data Documentation

UploadFromUrl::$mTempDownloadPath [protected]

Definition at line 12 of file UploadFromUrl.php.


The documentation for this class was generated from the following file:

Generated on Sat Apr 30 22:57:51 2011 for MediaWiki by  doxygen 1.5.9