|
| $mTextTop |
|
| $mTextAfterSummary |
|
◆ __construct()
PFUploadWindow::__construct |
( |
|
$request = null | ) |
|
Constructor : initialise object Get data POSTed through the form and assign them to the object
- Parameters
-
WebRequest | null | $request | Data posted. |
◆ ajaxGetExistsWarning()
static PFUploadWindow::ajaxGetExistsWarning |
( |
|
$filename | ) |
|
|
static |
Get a list of warnings
- Parameters
-
string | $filename | local filename, e.g. 'file exists', 'non-descriptive filename' |
- Returns
- array list of warning messages
◆ ajaxGetLicensePreview()
static PFUploadWindow::ajaxGetLicensePreview |
( |
|
$license | ) |
|
|
static |
Render a preview of a given license for the AJAX preview on upload
- Parameters
-
- Returns
- string
◆ execute()
PFUploadWindow::execute |
( |
|
$par | ) |
|
Special page entry point
- Parameters
-
◆ getDupeWarning()
static PFUploadWindow::getDupeWarning |
( |
|
$dupes | ) |
|
|
static |
Construct a warning and a gallery from an array of duplicate files.
- Parameters
-
- Returns
- string
◆ getExistsWarning()
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 | $exists | The 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.
◆ getInitialPageText()
static PFUploadWindow::getInitialPageText |
( |
|
$comment = '' , |
|
|
|
$license = '' , |
|
|
|
$copyStatus = '' , |
|
|
|
$source = '' |
|
) |
| |
|
static |
Get the initial image page text based on a comment and optional file status information
- Parameters
-
string | $comment | |
string | $license | |
string | $copyStatus | |
string | $source | |
- Returns
- string
◆ getUploadForm()
PFUploadWindow::getUploadForm |
( |
|
$message = '' , |
|
|
|
$sessionKey = '' , |
|
|
|
$hideIgnoreWarning = false |
|
) |
| |
|
protected |
Get an UploadForm instance with title and text properly set.
- Parameters
-
string | $message | HTML string to add to the form |
string | $sessionKey | Session key in case this is a stashed upload |
bool | $hideIgnoreWarning | |
- Returns
- UploadForm
◆ loadRequest()
PFUploadWindow::loadRequest |
( |
|
$request | ) |
|
|
protected |
Initialize instance variables from request and create an Upload handler
- Parameters
-
WebRequest | $request | The request to extract variables from |
◆ processUpload()
PFUploadWindow::processUpload |
( |
| ) |
|
|
protected |
Do the upload. Checks are made in SpecialUpload::execute()
- Returns
- array|bool
◆ processVerificationError()
PFUploadWindow::processVerificationError |
( |
|
$details | ) |
|
|
protected |
Provides output to the user for a result of UploadBase::verifyUpload
- Parameters
-
array | $details | Result of UploadBase::verifyUpload |
- Exceptions
-
Statuses that only require name changing
Statuses that require reuploading
◆ recoverableUploadError()
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 | $message | HTML message to be passed to mainUploadForm |
◆ showUploadForm()
PFUploadWindow::showUploadForm |
( |
|
$form | ) |
|
|
protected |
Show the main upload form.
- Parameters
-
◆ showViewDeletedLinks()
PFUploadWindow::showViewDeletedLinks |
( |
| ) |
|
|
protected |
Shows the "view X deleted revivions link""
◆ unsaveUploadedFile()
PFUploadWindow::unsaveUploadedFile |
( |
| ) |
|
|
protected |
Remove a temporarily kept file stashed by saveTempUploadedFile(). private
- Returns
- success
◆ uploadError()
PFUploadWindow::uploadError |
( |
|
$message | ) |
|
|
protected |
Show the upload form with error message, but do not stash the file.
- Parameters
-
◆ uploadWarning()
PFUploadWindow::uploadWarning |
( |
|
$warnings | ) |
|
|
protected |
Stashes the upload, shows the main form, but adds an "continue anyway button"
- Parameters
-
◆ watchCheck()
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.
- Returns
- bool
◆ $mDesiredDestName
PFUploadWindow::$mDesiredDestName |
User input variables from the "description" section
◆ $mForReUpload
PFUploadWindow::$mForReUpload |
◆ $mIgnoreWarning
PFUploadWindow::$mIgnoreWarning |
User input variables from the root section
◆ $mInputID
PFUploadWindow::$mInputID |
◆ $mRequest
PFUploadWindow::$mRequest |
The documentation for this class was generated from the following file: