[ Index ] |
PHP Cross Reference of MediaWiki-1.24.0 |
[Source view] [Print] [Project Stats]
Implements Special:Upload This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
File Size: | 1213 lines (38 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
SpecialUpload:: (19 methods):
__construct()
loadRequest()
userCanExecute()
execute()
showUploadForm()
getUploadForm()
showViewDeletedLinks()
showRecoverableUploadError()
showUploadWarning()
showUploadError()
processUpload()
getInitialPageText()
getWatchCheck()
processVerificationError()
unsaveUploadedFile()
getExistsWarning()
getDupeWarning()
getGroupName()
rotationEnabled()
UploadForm:: (8 methods):
__construct()
getSourceSection()
getExtensionsMessage()
getDescriptionSection()
getOptionsSection()
show()
addUploadJS()
trySubmit()
UploadSourceField:: (2 methods):
getLabelHtml()
getSize()
Class: SpecialUpload - X-Ref
Form for handling uploads and special page.__construct( $request = null ) X-Ref |
Constructor : initialise object Get data POSTed through the form and assign them to the object param: WebRequest $request Data posted. |
loadRequest() X-Ref |
Initialize instance variables from request and create an Upload handler |
userCanExecute( User $user ) X-Ref |
This page can be shown if uploading is enabled. Handle permission checking elsewhere in order to be able to show custom error messages. param: User $user return: bool |
execute( $par ) X-Ref |
Special page entry point param: string $par |
showUploadForm( $form ) X-Ref |
Show the main upload form param: HTMLForm|string $form An HTMLForm instance or HTML string to show |
getUploadForm( $message = '', $sessionKey = '', $hideIgnoreWarning = false ) X-Ref |
Get an UploadForm instance with title and text properly set. param: string $message HTML string to add to the form param: string $sessionKey Session key in case this is a stashed upload param: bool $hideIgnoreWarning Whether to hide "ignore warning" check box return: UploadForm |
showViewDeletedLinks() X-Ref |
Shows the "view X deleted revivions link"" |
showRecoverableUploadError( $message ) X-Ref |
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. param: string $message HTML message to be passed to mainUploadForm |
showUploadWarning( $warnings ) X-Ref |
Stashes the upload, shows the main form, but adds a "continue anyway button". Also checks whether there are actually warnings to display. param: array $warnings return: bool True if warnings were displayed, false if there are no |
showUploadError( $message ) X-Ref |
Show the upload form with error message, but do not stash the file. param: string $message HTML string |
processUpload() X-Ref |
Do the upload. Checks are made in SpecialUpload::execute() |
getInitialPageText( $comment = '', $license = '',$copyStatus = '', $source = '') X-Ref |
Get the initial image page text based on a comment and optional file status information param: string $comment param: string $license param: string $copyStatus param: string $source return: string |
getWatchCheck() X-Ref |
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. return: bool|string |
processVerificationError( $details ) X-Ref |
Provides output to the user for a result of UploadBase::verifyUpload param: array $details Result of UploadBase::verifyUpload |
unsaveUploadedFile() X-Ref |
Remove a temporarily kept file stashed by saveTempUploadedFile(). return: bool Success |
getExistsWarning( $exists ) X-Ref |
Formats a result of UploadBase::getExistsWarning as HTML This check is static and can be done pre-upload via AJAX param: array $exists The result of UploadBase::getExistsWarning return: string Empty string if there is no warning or an HTML fragment |
getDupeWarning( $dupes ) X-Ref |
Construct a warning and a gallery from an array of duplicate files. param: array $dupes return: string |
getGroupName() X-Ref |
No description |
rotationEnabled() X-Ref |
Should we rotate images in the preview on Special:Upload. This controls js: mw.config.get( 'wgFileCanRotate' ) |
Class: UploadForm - X-Ref
Sub class of HTMLForm that provides the form section of SpecialUpload__construct( array $options = array() X-Ref |
No description |
getSourceSection() X-Ref |
Get the descriptor of the fieldset that contains the file source selection. The section is 'source' return: array Descriptor array |
getExtensionsMessage() X-Ref |
Get the messages indicating which extensions are preferred and prohibitted. return: string HTML string containing the message |
getDescriptionSection() X-Ref |
Get the descriptor of the fieldset that contains the file description input. The section is 'description' return: array Descriptor array |
getOptionsSection() X-Ref |
Get the descriptor of the fieldset that contains the upload options, such as "watch this file". The section is 'options' return: array Descriptor array |
show() X-Ref |
Add the upload JS and show the form. |
addUploadJS() X-Ref |
Add upload JS to the OutputPage |
trySubmit() X-Ref |
Empty function; submission is handled elsewhere. return: bool False |
Class: UploadSourceField - X-Ref
A form field that contains a radio box in the labelgetLabelHtml( $cellAttributes = array() X-Ref |
param: array $cellAttributes return: string |
getSize() X-Ref |
return: int |
Generated: Fri Nov 28 14:03:12 2014 | Cross-referenced by PHPXref 0.7.1 |