BlueSpice MediaWiki REL1_27
 All Classes Namespaces Files Functions Variables Groups Pages
SFUploadWindow Class Reference
Inheritance diagram for SFUploadWindow:
Collaboration diagram for SFUploadWindow:

Public Member Functions

 __construct ($request=null)
 
 execute ($par)
 
- Public Member Functions inherited from UnlistedSpecialPage
 __construct ($name, $restriction= '', $function=false, $file= 'default')
 
 isListed ()
 
- Public Member Functions inherited from SpecialPage
 __construct ($name= '', $restriction= '', $listed=true, $function=false, $file= '', $includable=false)
 
 getName ()
 
 getRestriction ()
 
 isListed ()
 
 setListed ($listed)
 
 listed ($x=null)
 
 isIncludable ()
 
 including ($x=null)
 
 getLocalName ()
 
 isExpensive ()
 
 isCached ()
 
 isRestricted ()
 
 userCanExecute (User $user)
 
 displayRestrictionError ()
 
 checkPermissions ()
 
 checkReadOnly ()
 
 requireLogin ($reasonMsg= 'exception-nologin-text', $titleMsg= 'exception-nologin')
 
 prefixSearchSubpages ($search, $limit, $offset)
 
 setHeaders ()
 
 run ($subPage)
 
 execute ($subPage)
 
 outputHeader ($summaryMessageKey= '')
 
 getDescription ()
 
 getTitle ($subpage=false)
 
 getPageTitle ($subpage=false)
 
 setContext ($context)
 
 getContext ()
 
 getRequest ()
 
 getOutput ()
 
 getUser ()
 
 getSkin ()
 
 getLanguage ()
 
 getConfig ()
 
 getFullTitle ()
 
 msg ()
 
 addHelpLink ($to, $overrideBaseUrl=false)
 
 getFinalGroupName ()
 
 doesWrites ()
 

Static Public Member Functions

static getInitialPageText ($comment= '', $license= '', $copyStatus= '', $source= '')
 
static getExistsWarning ($exists)
 
static ajaxGetExistsWarning ($filename)
 
static ajaxGetLicensePreview ($license)
 
static getDupeWarning ($dupes)
 
- Static Public Member Functions inherited from SpecialPage
static getTitleFor ($name, $subpage=false, $fragment= '')
 
static getSafeTitleFor ($name, $subpage=false)
 

Public Attributes

 $mRequest
 
 $mSourceType
 
 $mUpload
 
 $mLocalFile
 
 $mUploadClicked
 
 $mDesiredDestName
 
 $mComment
 
 $mLicense
 
 $mIgnoreWarning
 
 $mWatchThis
 
 $mCopyrightStatus
 
 $mCopyrightSource
 
 $mForReUpload
 
 $mCancelUpload
 
 $mTokenOk
 
 $mInputID
 
 $mDelimiter
 

Protected Member Functions

 loadRequest ($request)
 
 showUploadForm ($form)
 
 getUploadForm ($message= '', $sessionKey= '', $hideIgnoreWarning=false)
 
 showViewDeletedLinks ()
 
 recoverableUploadError ($message)
 
 uploadWarning ($warnings)
 
 uploadError ($message)
 
 processUpload ()
 
 watchCheck ()
 
 processVerificationError ($details)
 
 unsaveUploadedFile ()
 
- Protected Member Functions inherited from SpecialPage
 getLoginSecurityLevel ()
 
 checkLoginSecurityLevel ($level=null)
 
 getSubpagesForPrefixSearch ()
 
 prefixSearchString ($search, $limit, $offset)
 
 beforeExecute ($subPage)
 
 afterExecute ($subPage)
 
 getRobotPolicy ()
 
 addFeedLinks ($params)
 
 getGroupName ()
 
 useTransactionalTimeLimit ()
 

Protected Attributes

 $mTextTop
 
 $mTextAfterSummary
 
- Protected Attributes inherited from SpecialPage
 $mName
 
 $mRestriction
 
 $mIncluding
 
 $mIncludable
 
 $mContext
 

Additional Inherited Members

- Static Protected Member Functions inherited from SpecialPage
static prefixSearchArray ($search, $limit, array $subpages, $offset)
 

Constructor & Destructor Documentation

SFUploadWindow::__construct (   $request = null)

Constructor : initialise object Get data POSTed through the form and assign them to the object

Parameters
WebRequest$requestData posted.

Member Function Documentation

static SFUploadWindow::ajaxGetExistsWarning (   $filename)
static

Get a list of warnings

Parameters
stringlocal filename, e.g. 'file exists', 'non-descriptive filename'
Returns
array list of warning messages
static SFUploadWindow::ajaxGetLicensePreview (   $license)
static

Render a preview of a given license for the AJAX preview on upload

Parameters
string$license
Returns
string
SFUploadWindow::execute (   $par)

Special page entry point

static SFUploadWindow::getDupeWarning (   $dupes)
static

Construct a warning and a gallery from an array of duplicate files.

static SFUploadWindow::getExistsWarning (   $exists)
static

Formats a result of UploadBase::getExistsWarning as HTML This check is static and can be done pre-upload via AJAX

Parameters
array$existsThe result of UploadBase::getExistsWarning
Returns
string Empty string if there is no warning or an HTML fragment consisting of one or more elements if there is a warning.
static SFUploadWindow::getInitialPageText (   $comment = '',
  $license = '',
  $copyStatus = '',
  $source = '' 
)
static

Get the initial image page text based on a comment and optional file status information

SFUploadWindow::getUploadForm (   $message = '',
  $sessionKey = '',
  $hideIgnoreWarning = false 
)
protected

Get an UploadForm instance with title and text properly set.

Parameters
string$messageHTML string to add to the form
string$sessionKeySession key in case this is a stashed upload
Returns
UploadForm
SFUploadWindow::loadRequest (   $request)
protected

Initialize instance variables from request and create an Upload handler

Parameters
WebRequest$requestThe request to extract variables from
SFUploadWindow::processUpload ( )
protected

Do the upload. Checks are made in SpecialUpload::execute()

SFUploadWindow::processVerificationError (   $details)
protected

Provides output to the user for a result of UploadBase::verifyUpload

Parameters
array$detailsResult of UploadBase::verifyUpload
Exceptions
MWException

Statuses that only require name changing

Statuses that require reuploading

SFUploadWindow::recoverableUploadError (   $message)
protected

Stashes the upload and shows the main upload form.

Note: only errors that can be handled by changing the name or description should be redirected here. It should be assumed that the file itself is sane and has passed UploadBase::verifyFile. This essentially means that UploadBase::VERIFICATION_ERROR and UploadBase::EMPTY_FILE should not be passed here.

Parameters
string$messageHTML message to be passed to mainUploadForm
SFUploadWindow::showUploadForm (   $form)
protected

Show the main upload form.

Parameters
UploadForm$form
SFUploadWindow::showViewDeletedLinks ( )
protected

Shows the "view X deleted revivions link""

SFUploadWindow::unsaveUploadedFile ( )
protected

Remove a temporarily kept file stashed by saveTempUploadedFile(). private

Returns
success
SFUploadWindow::uploadError (   $message)
protected

Show the upload form with error message, but do not stash the file.

Parameters
string$message
SFUploadWindow::uploadWarning (   $warnings)
protected

Stashes the upload, shows the main form, but adds an "continue anyway button"

Parameters
array$warnings
SFUploadWindow::watchCheck ( )
protected

See if we should check the 'watch this page' checkbox on the form based on the user's preferences and whether we're being asked to create a new file or update an existing one.

In the case where 'watch edits' is off but 'watch creations' is on, we'll leave the box unchecked.

Note that the page target can be changed on the form, so our check state can get out of sync.

Member Data Documentation

SFUploadWindow::$mDesiredDestName

User input variables from the "description" section

SFUploadWindow::$mForReUpload

Hidden variables

SFUploadWindow::$mIgnoreWarning

User input variables from the root section

SFUploadWindow::$mInputID

used by Semantic Forms

SFUploadWindow::$mRequest

Misc variables


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