Go to the documentation of this file.
61 wfDebug( __METHOD__ .
" creating new UploadStash instance for " .
$user->getId() .
"\n" );
63 wfDebug( __METHOD__ .
" creating new UploadStash instance with no user\n" );
102 $metadata = $this->stash->getMetadata( $key );
103 $this->initializePathInfo(
$name,
104 $initTempFile ? $this->getRealPath( $metadata[
'us_path'] ) :
false,
105 $metadata[
'us_size'],
109 $this->mFileKey = $key;
110 $this->mVirtualTempPath = $metadata[
'us_path'];
111 $this->mFileProps = $this->stash->getFileProps( $key );
112 $this->mSourceType = $metadata[
'us_source_type'];
120 $fileKey =
$request->getText(
'wpFileKey',
$request->getText(
'wpSessionKey' ) );
123 $desiredDestName =
$request->getText(
128 $this->
initialize( $fileKey, $desiredDestName );
143 return $this->mFileProps[
'sha1'];
159 $this->mLocalFile = parent::stashFile(
$user );
160 return $this->mLocalFile;
176 return $this->stash->removeFile( $this->mFileKey );
188 $rv = parent::performUpload(
$comment, $pageText, $watch,
$user );
do that in ParserLimitReportFormat instead use this to modify the parameters of the image and a DIV can begin in one section and end in another Make sure your code can handle that case gracefully See the EditSectionClearerLink extension for an example zero but section is usually empty its values are the globals values my talk my contributions etc etc otherwise the built in rate limiting checks are if enabled also a ContextSource error or success you ll probably need to make sure the header is varied on WebRequest $request
static singleton()
Get a RepoGroup instance.
skin txt MediaWiki includes four core it has been set as the default in MediaWiki since the replacing Monobook it had been been the default skin since before being replaced by Vector largely rewritten in while keeping its appearance Several legacy skins were removed in the as the burden of supporting them became too heavy to bear Those in etc for skin dependent CSS etc for skin dependent JavaScript These can also be customised on a per user by etc This feature has led to a wide variety of user styles becoming that gallery is a good place to ending in php
initializeFromRequest(&$request)
getTempFileSha1Base36()
Get the base 36 SHA1 of the file.
UploadStash is intended to accomplish a few things:
Implements uploading from previously stored file.
unsaveUploadedFile()
Remove a temporarily kept file stashed by saveTempUploadedFile().
wfDebug( $text, $dest='all')
Sends a line to the debug log if enabled or, optionally, to a comment in output.
__construct( $user=false, $stash=false, $repo=false)
This document is intended to provide useful advice for parties seeking to redistribute MediaWiki to end users It s targeted particularly at maintainers for Linux since it s been observed that distribution packages of MediaWiki often break We ve consistently had to recommend that users seeking support use official tarballs instead of their distribution s and this often solves whatever problem the user is having It would be nice if this could such and we might be restricted by PHP settings such as safe mode or open_basedir We cannot assume that the software even has read access anywhere useful Many shared hosts run all users web applications under the same user
Allows to change the fields on the form that will be generated $name
performUpload( $comment, $pageText, $watch, $user)
Perform the upload, then remove the database record afterward.
stashSession()
This should return the key instead of the UploadStashFile instance, for backward compatibility.
static isValidRequest( $request)
stashFile(User $user=null)
Stash the file.
please add to it if you re going to add events to the MediaWiki code where normally authentication against an external auth plugin would be creating a account $user
The User object encapsulates all of the user-specific settings (user_id, name, rights,...
initialize( $key, $name='upload_file', $initTempFile=true)