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

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

PFUploadWindow::__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 PFUploadWindow::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 PFUploadWindow::ajaxGetLicensePreview (   $license)
static

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

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

Special page entry point

static PFUploadWindow::getDupeWarning (   $dupes)
static

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

static PFUploadWindow::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 PFUploadWindow::getInitialPageText (   $comment = '',
  $license = '',
  $copyStatus = '',
  $source = '' 
)
static

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

PFUploadWindow::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
PFUploadWindow::loadRequest (   $request)
protected

Initialize instance variables from request and create an Upload handler

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

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

PFUploadWindow::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

PFUploadWindow::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
PFUploadWindow::showUploadForm (   $form)
protected

Show the main upload form.

Parameters
UploadForm$form
PFUploadWindow::showViewDeletedLinks ( )
protected

Shows the "view X deleted revivions link""

PFUploadWindow::unsaveUploadedFile ( )
protected

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

Returns
success
PFUploadWindow::uploadError (   $message)
protected

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

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

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

Parameters
array$warnings
PFUploadWindow::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

PFUploadWindow::$mDesiredDestName

User input variables from the "description" section

PFUploadWindow::$mForReUpload

Hidden variables

PFUploadWindow::$mIgnoreWarning

User input variables from the root section

PFUploadWindow::$mInputID

used by Page Forms

PFUploadWindow::$mRequest

Misc variables


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