Public Member Functions | |
| __construct ($request=null) | |
| Constructor : initialise object Get data POSTed through the form and assign them to the object. | |
| execute ($par) | |
| Special page entry point. | |
Static Public Member Functions | |
| static | getInitialPageText ($comment= '', $license= '', $copyStatus= '', $source= '') |
| Get the initial image page text based on a comment and optional file status information. | |
| static | getExistsWarning ($exists) |
| Formats a result of UploadBase::getExistsWarning as HTML This check is static and can be done pre-upload via AJAX. | |
| static | ajaxGetExistsWarning ($filename) |
| Get a list of warnings. | |
| static | ajaxGetLicensePreview ($license) |
| Render a preview of a given license for the AJAX preview on upload. | |
| static | getDupeWarning ($dupes) |
| Construct a warning and a gallery from an array of duplicate files. | |
Public Attributes | |
| $mRequest | |
| Misc variables. | |
| $mSourceType | |
| $mUpload | |
| $mLocalFile | |
| $mUploadClicked | |
| $mDesiredDestName | |
| User input variables from the "description" section. | |
| $mComment | |
| $mLicense | |
| $mIgnoreWarning | |
| User input variables from the root section. | |
| $mWatchThis | |
| $mCopyrightStatus | |
| $mCopyrightSource | |
| $mForReUpload | |
| Hidden variables. | |
| $mCancelUpload | |
| $mTokenOk | |
| $mInputID | |
| used by Semantic Forms | |
| $mDelimiter | |
Protected Member Functions | |
| loadRequest ($request) | |
| Initialize instance variables from request and create an Upload handler. | |
| showUploadForm ($form) | |
| Show the main upload form and optionally add the session key to the output. | |
| getUploadForm ($message= '', $sessionKey= '', $hideIgnoreWarning=false) | |
| Get an UploadForm instance with title and text properly set. | |
| showViewDeletedLinks () | |
| Shows the "view X deleted revivions link"". | |
| recoverableUploadError ($message) | |
| Stashes the upload and shows the main upload form. | |
| uploadWarning ($warnings) | |
| Stashes the upload, shows the main form, but adds an "continue anyway button". | |
| uploadError ($message) | |
| Show the upload form with error message, but do not stash the file. | |
| processUpload () | |
| Do the upload. | |
| watchCheck () | |
| 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. | |
| processVerificationError ($details) | |
| Provides output to the user for a result of UploadBase::verifyUpload. | |
| unsaveUploadedFile () | |
| Remove a temporarily kept file stashed by saveTempUploadedFile(). | |
Definition at line 16 of file SF_UploadWindow.php.
| SFUploadWindowProto::__construct | ( | $ | request = null |
) |
Constructor : initialise object Get data POSTed through the form and assign them to the object.
| WebRequest | $request Data posted. |
Definition at line 22 of file SF_UploadWindow.php.
References loadRequest().
| SFUploadWindowProto::loadRequest | ( | $ | request | ) | [protected] |
Initialize instance variables from request and create an Upload handler.
| WebRequest | $request The request to extract variables from |
Definition at line 62 of file SF_UploadWindow.php.
Referenced by __construct().
| SFUploadWindowProto::execute | ( | $ | par | ) |
Special page entry point.
Definition at line 109 of file SF_UploadWindow.php.
References $wgGroupPermissions, getUploadForm(), processUpload(), showUploadForm(), and unsaveUploadedFile().
| SFUploadWindowProto::showUploadForm | ( | $ | form | ) | [protected] |
Show the main upload form and optionally add the session key to the output.
This hides the source selection.
| string | $message HTML message to be shown at top of form | |
| string | $sessionKey Session key of the stashed upload |
Definition at line 183 of file SF_UploadWindow.php.
References showViewDeletedLinks().
Referenced by execute(), processUpload(), processVerificationError(), recoverableUploadError(), uploadError(), and uploadWarning().
| SFUploadWindowProto::getUploadForm | ( | $ | message = '', |
|
| $ | sessionKey = '', |
|||
| $ | hideIgnoreWarning = false | |||
| ) | [protected] |
Get an UploadForm instance with title and text properly set.
| string | $message HTML string to add to the form | |
| string | $sessionKey Session key in case this is a stashed upload |
Definition at line 198 of file SF_UploadWindow.php.
References watchCheck().
Referenced by execute(), processUpload(), processVerificationError(), recoverableUploadError(), uploadError(), and uploadWarning().
| SFUploadWindowProto::showViewDeletedLinks | ( | ) | [protected] |
Shows the "view X deleted revivions link"".
Definition at line 237 of file SF_UploadWindow.php.
Referenced by showUploadForm().
| SFUploadWindowProto::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.
| string | $message HTML message to be passed to mainUploadForm |
Definition at line 271 of file SF_UploadWindow.php.
References getUploadForm(), and showUploadForm().
Referenced by processVerificationError().
| SFUploadWindowProto::uploadWarning | ( | $ | warnings | ) | [protected] |
Stashes the upload, shows the main form, but adds an "continue anyway button".
| array | $warnings |
Definition at line 285 of file SF_UploadWindow.php.
References getUploadForm(), and showUploadForm().
Referenced by processUpload().
| SFUploadWindowProto::uploadError | ( | $ | message | ) | [protected] |
Show the upload form with error message, but do not stash the file.
| string | $message |
Definition at line 325 of file SF_UploadWindow.php.
References getUploadForm(), and showUploadForm().
Referenced by processUpload(), and processVerificationError().
| SFUploadWindowProto::processUpload | ( | ) | [protected] |
Do the upload.
Checks are made in SpecialUpload::execute()
Definition at line 335 of file SF_UploadWindow.php.
References END, getUploadForm(), processVerificationError(), showUploadForm(), uploadError(), and uploadWarning().
Referenced by execute().
| static SFUploadWindowProto::getInitialPageText | ( | $ | comment = '', |
|
| $ | license = '', |
|||
| $ | copyStatus = '', |
|||
| $ | source = '' | |||
| ) | [static] |
Get the initial image page text based on a comment and optional file status information.
Definition at line 438 of file SF_UploadWindow.php.
| SFUploadWindowProto::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.
Definition at line 472 of file SF_UploadWindow.php.
Referenced by getUploadForm().
| SFUploadWindowProto::processVerificationError | ( | $ | details | ) | [protected] |
Provides output to the user for a result of UploadBase::verifyUpload.
| array | $details Result of UploadBase::verifyUpload |
Statuses that only require name changing
Statuses that require reuploading
Definition at line 496 of file SF_UploadWindow.php.
References getUploadForm(), recoverableUploadError(), showUploadForm(), and uploadError().
Referenced by processUpload().
| SFUploadWindowProto::unsaveUploadedFile | ( | ) | [protected] |
Remove a temporarily kept file stashed by saveTempUploadedFile().
private
Definition at line 555 of file SF_UploadWindow.php.
Referenced by execute().
| static SFUploadWindowProto::getExistsWarning | ( | $ | exists | ) | [static] |
Formats a result of UploadBase::getExistsWarning as HTML This check is static and can be done pre-upload via AJAX.
| array | $exists The result of UploadBase::getExistsWarning |
Definition at line 578 of file SF_UploadWindow.php.
| static SFUploadWindowProto::ajaxGetExistsWarning | ( | $ | filename | ) | [static] |
Get a list of warnings.
| string | local filename, e.g. 'file exists', 'non-descriptive filename' |
Definition at line 634 of file SF_UploadWindow.php.
| static SFUploadWindowProto::ajaxGetLicensePreview | ( | $ | license | ) | [static] |
Render a preview of a given license for the AJAX preview on upload.
| string | $license |
Definition at line 658 of file SF_UploadWindow.php.
| static SFUploadWindowProto::getDupeWarning | ( | $ | dupes | ) | [static] |
Construct a warning and a gallery from an array of duplicate files.
Definition at line 674 of file SF_UploadWindow.php.
| SFUploadWindowProto::$mRequest |
| SFUploadWindowProto::$mSourceType |
Definition at line 32 of file SF_UploadWindow.php.
| SFUploadWindowProto::$mUpload |
Definition at line 33 of file SF_UploadWindow.php.
| SFUploadWindowProto::$mLocalFile |
Definition at line 34 of file SF_UploadWindow.php.
| SFUploadWindowProto::$mUploadClicked |
Definition at line 35 of file SF_UploadWindow.php.
| SFUploadWindowProto::$mDesiredDestName |
User input variables from the "description" section.
Definition at line 38 of file SF_UploadWindow.php.
| SFUploadWindowProto::$mComment |
Definition at line 39 of file SF_UploadWindow.php.
| SFUploadWindowProto::$mLicense |
Definition at line 40 of file SF_UploadWindow.php.
| SFUploadWindowProto::$mIgnoreWarning |
| SFUploadWindowProto::$mWatchThis |
Definition at line 44 of file SF_UploadWindow.php.
| SFUploadWindowProto::$mCopyrightStatus |
Definition at line 45 of file SF_UploadWindow.php.
| SFUploadWindowProto::$mCopyrightSource |
Definition at line 46 of file SF_UploadWindow.php.
| SFUploadWindowProto::$mForReUpload |
| SFUploadWindowProto::$mCancelUpload |
Definition at line 50 of file SF_UploadWindow.php.
| SFUploadWindowProto::$mTokenOk |
Definition at line 51 of file SF_UploadWindow.php.
| SFUploadWindowProto::$mInputID |
| SFUploadWindowProto::$mDelimiter |
Definition at line 55 of file SF_UploadWindow.php.
1.5.6