MediaWiki
1.23.13
|
Implements uploading from previously stored file. More...
Public Member Functions | |
__construct ( $user=false, $stash=false, $repo=false) | |
getSourceType () | |
getTempFileSha1Base36 () | |
Get the base 36 SHA1 of the file. More... | |
initialize ( $key, $name='upload_file', $initTempFile=true) | |
initializeFromRequest (&$request) | |
performUpload ( $comment, $pageText, $watch, $user) | |
Perform the upload, then remove the database record afterward. More... | |
stashFile (User $user=null) | |
Stash the file. More... | |
stashSession () | |
This should return the key instead of the UploadStashFile instance, for backward compatibility. More... | |
unsaveUploadedFile () | |
Remove a temporarily kept file stashed by saveTempUploadedFile(). More... | |
Static Public Member Functions | |
static | isValidKey ( $key) |
static | isValidRequest ( $request) |
Protected Attributes | |
$mFileKey | |
$mFileProps | |
$mSourceType | |
$mVirtualTempPath | |
Private Attributes | |
$repo | |
$stash | |
Implements uploading from previously stored file.
Definition at line 30 of file UploadFromStash.php.
User | bool | $user | Default: false |
UploadStash | bool | $stash | Default: false |
FileRepo | bool | $repo | Default: false |
Definition at line 47 of file UploadFromStash.php.
References $repo, $stash, $user, RepoGroup\singleton(), user, and wfDebug().
UploadFromStash::getSourceType | ( | ) |
UploadFromStash::getTempFileSha1Base36 | ( | ) |
UploadFromStash::initialize | ( | $key, | |
$name = 'upload_file' , |
|||
$initTempFile = true |
|||
) |
string | $key | |
string | $name | |
bool | $initTempFile |
Definition at line 95 of file UploadFromStash.php.
References $name.
Referenced by initializeFromRequest().
UploadFromStash::initializeFromRequest | ( | & | $request | ) |
WebRequest | $request |
Definition at line 118 of file UploadFromStash.php.
References initialize().
|
static |
string | $key |
Definition at line 74 of file UploadFromStash.php.
References UploadStash\KEY_FORMAT_REGEX.
Referenced by isValidRequest(), and ApiUpload\selectUploadModule().
|
static |
WebRequest | $request |
Definition at line 83 of file UploadFromStash.php.
References isValidKey().
Referenced by UploadStashTest\testValidRequestWithInvalidRequests(), and UploadStashTest\testValidRequestWithValidRequests().
UploadFromStash::performUpload | ( | $comment, | |
$pageText, | |||
$watch, | |||
$user | |||
) |
Perform the upload, then remove the database record afterward.
string | $comment | |
string | $pageText | |
bool | $watch | |
User | $user |
Definition at line 187 of file UploadFromStash.php.
References $comment, $user, and unsaveUploadedFile().
UploadFromStash::stashFile | ( | User | $user = null | ) |
Stash the file.
User | $user |
Definition at line 156 of file UploadFromStash.php.
References $user.
Referenced by stashSession().
UploadFromStash::stashSession | ( | ) |
This should return the key instead of the UploadStashFile instance, for backward compatibility.
Definition at line 167 of file UploadFromStash.php.
References stashFile().
UploadFromStash::unsaveUploadedFile | ( | ) |
Remove a temporarily kept file stashed by saveTempUploadedFile().
Definition at line 175 of file UploadFromStash.php.
Referenced by performUpload().
|
protected |
Definition at line 31 of file UploadFromStash.php.
|
protected |
Definition at line 33 of file UploadFromStash.php.
|
protected |
Definition at line 34 of file UploadFromStash.php.
Referenced by getSourceType().
|
protected |
Definition at line 32 of file UploadFromStash.php.
|
private |
Definition at line 40 of file UploadFromStash.php.
Referenced by __construct().
|
private |
Definition at line 37 of file UploadFromStash.php.
Referenced by __construct().