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. | |
Definition at line 11 of file UploadFromUrl.php.
| 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.
| $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] |
| $request | Object: WebRequest object |
Reimplemented from UploadBase.
Definition at line 62 of file UploadFromUrl.php.
References isValidUrl().
| static UploadFromUrl::isValidUrl | ( | $ | url | ) | [static] |
| 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.
Definition at line 127 of file UploadFromUrl.php.
References $wgMaxUploadSize.
UploadFromUrl::$mTempDownloadPath [protected] |
Definition at line 12 of file UploadFromUrl.php.
1.5.9