Go to the documentation of this file.
37 global $wgEnableAsyncUploads;
48 $request = $this->
getMain()->getRequest();
50 $this->mParams[
'async'] = ( $this->mParams[
'async'] && $wgEnableAsyncUploads );
52 $this->mParams[
'file'] = $request->getFileName(
'file' );
53 $this->mParams[
'chunk'] = $request->getFileName(
'chunk' );
56 if ( !$this->mParams[
'filekey'] && $this->mParams[
'sessionkey'] ) {
57 $this->mParams[
'filekey'] = $this->mParams[
'sessionkey'];
64 } elseif ( !isset( $this->mUpload ) ) {
65 $this->
dieUsage(
'No upload module set',
'nomodule' );
68 $this->
dieUsage( get_class(
$e ) .
": " .
$e->getMessage(),
'stasherror' );
76 $status = $this->mUpload->fetchFile();
77 if ( !$status->isGood() ) {
78 $errors = $status->getErrorsArray();
79 $error = array_shift( $errors[0] );
80 $this->
dieUsage(
'Error fetching file from remote source',
$error, 0, $errors[0] );
84 if ( $this->mParams[
'chunk'] ) {
85 $maxSize = $this->mUpload->getMaxUploadSize();
86 if ( $this->mParams[
'filesize'] > $maxSize ) {
87 $this->
dieUsage(
'The file you submitted was too large',
'file-too-large' );
89 if ( !$this->mUpload->getTitle() ) {
90 $this->
dieUsage(
'Invalid file title supplied',
'internal-error' );
92 } elseif ( $this->mParams[
'async'] && $this->mParams[
'filekey'] ) {
95 wfDebug( __METHOD__ .
" about to verify\n" );
102 if ( !$this->mParams[
'stash'] ) {
103 $permErrors = $this->mUpload->verifyTitlePermissions(
$user );
104 if ( $permErrors !==
true ) {
112 if (
$result[
'result'] ===
'Success' ) {
116 $this->
dieUsage( get_class(
$e ) .
": " .
$e->getMessage(),
'stasherror' );
122 $this->mUpload->cleanupTempFile();
131 if ( $warnings && !$this->mParams[
'ignorewarnings'] ) {
134 } elseif ( $this->mParams[
'chunk'] ) {
137 } elseif ( $this->mParams[
'stash'] ) {
160 if ( $warnings && count( $warnings ) > 0 ) {
161 $result[
'warnings'] = $warnings;
164 $this->
dieUsage( $e->getMessage(),
'stashfailed' );
178 $result[
'warnings'] = $warnings;
185 $result[
'warnings'][
'stashfailed'] =
$e->getMessage();
199 $result[
'result'] =
'Continue';
200 if ( $warnings && count( $warnings ) > 0 ) {
201 $result[
'warnings'] = $warnings;
203 $request = $this->
getMain()->getRequest();
204 $chunkPath = $request->getFileTempname(
'chunk' );
205 $chunkSize = $request->getUpload(
'chunk' )->getSize();
206 if ( $this->mParams[
'offset'] == 0 ) {
211 $this->
dieUsage( $e->getMessage(),
'stashfailed' );
214 $filekey = $this->mParams[
'filekey'];
216 $status = $this->mUpload->addChunk(
217 $chunkPath, $chunkSize, $this->mParams[
'offset'] );
218 if ( !$status->isGood() ) {
219 $this->
dieUsage( $status->getWikiText(),
'stashfailed' );
226 if ( $this->mParams[
'offset'] + $chunkSize == $this->mParams[
'filesize'] ) {
227 if ( $this->mParams[
'async'] ) {
229 if ( $progress && $progress[
'result'] ===
'Poll' ) {
230 $this->
dieUsage(
"Chunk assembly already in progress.",
'stashfailed' );
234 array(
'result' =>
'Poll',
240 'filename' => $this->mParams[
'filename'],
241 'filekey' => $filekey,
250 "Failed to start AssembleUploadChunks.php",
'stashfailed' );
253 $status = $this->mUpload->concatenateChunks();
254 if ( !$status->isGood() ) {
255 $this->
dieUsage( $status->getWikiText(),
'stashfailed' );
262 $this->mUpload->stash->removeFile( $filekey );
263 $filekey = $this->mUpload->getLocalFile()->getFileKey();
269 $result[
'offset'] = $this->mParams[
'offset'] + $chunkSize;
282 $stashFile = $this->mUpload->stashFile();
287 $fileKey = $stashFile->getFileKey();
289 $message =
'Stashing temporary file failed: ' . get_class(
$e ) .
' ' .
$e->getMessage();
290 wfDebug( __METHOD__ .
' ' . $message .
"\n" );
309 $data[
'sessionkey'] = $data[
'filekey'];
311 $data[
'stashfailed'] =
$e->getMessage();
313 $data[
'invalidparameter'] = $parameter;
316 $this->
dieUsage( $parsed[
'info'], $parsed[
'code'], 0, $data );
327 $request = $this->
getMain()->getRequest();
330 if ( !$this->mParams[
'chunk'] ) {
332 'filekey',
'file',
'url',
'statuskey' );
336 if ( $this->mParams[
'filekey'] && $this->mParams[
'checkstatus'] ) {
339 $this->
dieUsage(
'No result in status data',
'missingresult' );
340 } elseif ( !$progress[
'status']->isGood() ) {
341 $this->
dieUsage( $progress[
'status']->getWikiText(),
'stashfailed' );
343 if ( isset( $progress[
'status']->value[
'verification'] ) ) {
346 unset( $progress[
'status'] );
352 if ( $this->mParams[
'statuskey'] ) {
357 if ( !isset( $sessionData[
'result'] ) ) {
358 $this->
dieUsage(
'No result in session data',
'missingresult' );
360 if ( $sessionData[
'result'] ==
'Warning' ) {
362 $sessionData[
'sessionkey'] = $this->mParams[
'statuskey'];
370 if ( is_null( $this->mParams[
'filename'] ) ) {
374 if ( $this->mParams[
'chunk'] ) {
377 if ( isset( $this->mParams[
'filekey'] ) ) {
379 $this->mUpload->continueChunks(
380 $this->mParams[
'filename'],
381 $this->mParams[
'filekey'],
382 $request->getUpload(
'chunk' )
386 $this->mUpload->initialize(
387 $this->mParams[
'filename'],
388 $request->getUpload(
'chunk' )
391 } elseif ( isset( $this->mParams[
'filekey'] ) ) {
400 $this->mUpload->initialize(
401 $this->mParams[
'filekey'], $this->mParams[
'filename'], !$this->mParams[
'async']
403 } elseif ( isset( $this->mParams[
'file'] ) ) {
405 $this->mUpload->initialize(
406 $this->mParams[
'filename'],
407 $request->getUpload(
'file' )
409 } elseif ( isset( $this->mParams[
'url'] ) ) {
424 if ( $this->mParams[
'asyncdownload'] ) {
427 if ( $this->mParams[
'leavemessage'] && !$this->mParams[
'ignorewarnings'] ) {
428 $this->
dieUsage(
'Using leavemessage without ignorewarnings is not supported',
429 'missing-ignorewarnings' );
432 if ( $this->mParams[
'leavemessage'] ) {
433 $async =
'async-leavemessage';
439 $this->mUpload->
initialize( $this->mParams[
'filename'],
440 $this->mParams[
'url'], $async );
453 $permission = $this->mUpload->isAllowed(
$user );
455 if ( $permission !==
true ) {
456 if ( !
$user->isLoggedIn() ) {
468 $verification = $this->mUpload->verifyUpload();
483 switch ( $verification[
'status'] ) {
490 array(
'filename' => $verification[
'filtered'] ) );
504 $this->
dieUsage(
'The file you submitted was empty',
'empty-file' );
507 $this->
dieUsage(
'The file you submitted was too large',
'file-too-large' );
512 'filetype' => $verification[
'finalExt'],
515 $this->
getResult()->setIndexedTagName( $extradata[
'allowed'],
'ext' );
517 $msg =
"Filetype not permitted: ";
518 if ( isset( $verification[
'blacklistedExt'] ) ) {
519 $msg .= join(
', ', $verification[
'blacklistedExt'] );
520 $extradata[
'blacklisted'] = array_values( $verification[
'blacklistedExt'] );
521 $this->
getResult()->setIndexedTagName( $extradata[
'blacklisted'],
'ext' );
523 $msg .= $verification[
'finalExt'];
525 $this->
dieUsage( $msg,
'filetype-banned', 0, $extradata );
528 $this->
getResult()->setIndexedTagName( $verification[
'details'],
'detail' );
529 $this->
dieUsage(
'This file did not pass file verification',
'verification-error',
530 0,
array(
'details' => $verification[
'details'] ) );
533 $this->
dieUsage(
"The modification you tried to make was aborted by an extension hook",
534 'hookaborted', 0,
array(
'error' => $verification[
'error'] ) );
537 $this->
dieUsage(
'An unknown error occurred',
'unknown-error',
538 0,
array(
'code' => $verification[
'status'] ) );
551 $warnings = $this->mUpload->checkWarnings();
560 $result->setIndexedTagName( $warnings,
'warning' );
562 if ( isset( $warnings[
'duplicate'] ) ) {
564 foreach ( $warnings[
'duplicate']
as $dupe ) {
565 $dupes[] = $dupe->getName();
567 $result->setIndexedTagName( $dupes,
'duplicate' );
568 $warnings[
'duplicate'] = $dupes;
571 if ( isset( $warnings[
'exists'] ) ) {
572 $warning = $warnings[
'exists'];
573 unset( $warnings[
'exists'] );
574 $localFile = isset( $warning[
'normalizedFile'] )
575 ? $warning[
'normalizedFile']
577 $warnings[$warning[
'warning']] = $localFile->getName();
593 if ( is_null( $this->mParams[
'text'] ) ) {
594 $this->mParams[
'text'] = $this->mParams[
'comment'];
598 $file = $this->mUpload->getLocalFile();
605 $this->mParams[
'watchlist'],
$file->getTitle(),
'watchdefault'
607 if ( !$watch && $this->mParams[
'watchlist'] ==
'preferences' && !
$file->exists() ) {
609 $this->mParams[
'watchlist'],
$file->getTitle(),
'watchcreations'
614 if ( $this->mParams[
'watch'] ) {
619 if ( $this->mParams[
'async'] ) {
621 if ( $progress && $progress[
'result'] ===
'Poll' ) {
622 $this->
dieUsage(
"Upload from stash already in progress.",
'publishfailed' );
625 $this->mParams[
'filekey'],
631 'filename' => $this->mParams[
'filename'],
632 'filekey' => $this->mParams[
'filekey'],
633 'comment' => $this->mParams[
'comment'],
634 'text' => $this->mParams[
'text'],
644 "Failed to start PublishStashedFile.php",
'publishfailed' );
648 $status = $this->mUpload->performUpload( $this->mParams[
'comment'],
649 $this->mParams[
'text'], $watch, $this->
getUser() );
651 if ( !$status->isGood() ) {
652 $error = $status->getErrorsArray();
654 if ( count(
$error ) == 1 &&
$error[0][0] ==
'async' ) {
658 'result' =>
'Queued',
659 'statuskey' =>
$error[0][1],
664 $this->
dieUsage(
'An internal error occurred',
'internal-error', 0,
$error );
670 if ( $warnings && count( $warnings ) > 0 ) {
671 $result[
'warnings'] = $warnings;
681 global $wgAllowAsyncCopyUploads;
682 if ( !$wgAllowAsyncCopyUploads ) {
683 $this->
dieUsage(
'Asynchronous copy uploads disabled',
'asynccopyuploaddisabled' );
712 'watchlist' =>
array(
720 'ignorewarnings' =>
false,
726 'sessionkey' =>
array(
739 'asyncdownload' =>
false,
740 'leavemessage' =>
false,
742 'checkstatus' =>
false,
750 'filename' =>
'Target filename',
751 'token' =>
'Edit token. You can get one of these through prop=info',
752 'comment' =>
'Upload comment. Also used as the initial page text for new ' .
753 'files if "text" is not specified',
754 'text' =>
'Initial page text for new files',
755 'watch' =>
'Watch the page',
756 'watchlist' =>
'Unconditionally add or remove the page from your watchlist, ' .
757 'use preferences or do not change watch',
758 'ignorewarnings' =>
'Ignore any warnings',
759 'file' =>
'File contents',
760 'url' =>
'URL to fetch the file from',
761 'filekey' =>
'Key that identifies a previous upload that was stashed temporarily.',
762 'sessionkey' =>
'Same as filekey, maintained for backward compatibility.',
763 'stash' =>
'If set, the server will not add the file to the repository ' .
764 'and stash it temporarily.',
766 'chunk' =>
'Chunk contents',
767 'offset' =>
'Offset of chunk in bytes',
768 'filesize' =>
'Filesize of entire upload',
770 'async' =>
'Make potentially large file operations asynchronous when possible',
771 'asyncdownload' =>
'Make fetching a URL asynchronous',
772 'leavemessage' =>
'If asyncdownload is used, leave a message on the user talk page if finished',
773 'statuskey' =>
'Fetch the upload status for this file key (upload by URL)',
774 'checkstatus' =>
'Only fetch the upload status for the given file key',
795 'sessionkey' =>
array(
803 'statuskey' =>
array(
817 'Upload a file, or get the status of pending uploads. Several methods are available:',
818 ' * Upload file contents directly, using the "file" parameter',
819 ' * Have the MediaWiki server fetch a file from a URL, using the "url" parameter',
820 ' * Complete an earlier upload that failed due to warnings, using the "filekey" parameter',
821 'Note that the HTTP POST must be done as a file upload (i.e. using multipart/form-data) when',
822 'sending the "file". Also you must get and send an edit token before doing any upload stuff.'
827 return array_merge( parent::getPossibleErrors(),
830 array(
'uploaddisabled' ),
831 array(
'invalid-file-key' ),
832 array(
'uploaddisabled' ),
833 array(
'mustbeloggedin',
'upload' ),
834 array(
'badaccess-groups' ),
835 array(
'code' =>
'fetchfileerror',
'info' =>
'' ),
836 array(
'code' =>
'nomodule',
'info' =>
'No upload module set' ),
837 array(
'code' =>
'empty-file',
'info' =>
'The file you submitted was empty' ),
838 array(
'code' =>
'filetype-missing',
'info' =>
'The file is missing an extension' ),
839 array(
'code' =>
'filename-tooshort',
'info' =>
'The filename is too short' ),
840 array(
'code' =>
'overwrite',
'info' =>
'Overwriting an existing file is not allowed' ),
841 array(
'code' =>
'stashfailed',
'info' =>
'Stashing temporary file failed' ),
842 array(
'code' =>
'publishfailed',
'info' =>
'Publishing of stashed file failed' ),
843 array(
'code' =>
'internal-error',
'info' =>
'An internal error occurred' ),
844 array(
'code' =>
'asynccopyuploaddisabled',
'info' =>
'Asynchronous copy uploads disabled' ),
845 array(
'code' =>
'stasherror',
'info' =>
'An upload stash error occurred' ),
846 array(
'fileexists-forbidden' ),
847 array(
'fileexists-shared-forbidden' ),
862 'api.php?action=upload&filename=Wiki.png' .
863 '&url=http%3A//upload.wikimedia.org/wikipedia/en/b/bc/Wiki.png'
864 =>
'Upload from a URL',
865 'api.php?action=upload&filename=Wiki.png&filekey=filekey&ignorewarnings=1'
866 =>
'Complete an upload that failed due to warnings',
871 return 'https://www.mediawiki.org/wiki/API:Upload';
getChunkResult( $warnings)
Get the result of a chunk upload.
selectUploadModule()
Select an upload module and set it to mUpload.
static & makeTitle( $ns, $title, $fragment='', $interwiki='')
Create a new Title from a namespace index and a DB key.
The index of the header message $result[1]=The index of the body text message $result[2 through n]=Parameters passed to body text message. Please note the header message cannot receive/use parameters. 'ImportHandleLogItemXMLTag':When parsing a XML tag in a log item. $reader:XMLReader object $logInfo:Array of information Return false to stop further processing of the tag 'ImportHandlePageXMLTag':When parsing a XML tag in a page. $reader:XMLReader object $pageInfo:Array of information Return false to stop further processing of the tag 'ImportHandleRevisionXMLTag':When parsing a XML tag in a page revision. $reader:XMLReader object $pageInfo:Array of page information $revisionInfo:Array of revision information Return false to stop further processing of the tag 'ImportHandleToplevelXMLTag':When parsing a top level XML tag. $reader:XMLReader object Return false to stop further processing of the tag 'ImportHandleUploadXMLTag':When parsing a XML tag in a file upload. $reader:XMLReader object $revisionInfo:Array of information Return false to stop further processing of the tag 'InfoAction':When building information to display on the action=info page. $context:IContextSource object & $pageInfo:Array of information 'InitializeArticleMaybeRedirect':MediaWiki check to see if title is a redirect. $title:Title object for the current page $request:WebRequest $ignoreRedirect:boolean to skip redirect check $target:Title/string of redirect target $article:Article object 'InterwikiLoadPrefix':When resolving if a given prefix is an interwiki or not. Return true without providing an interwiki to continue interwiki search. $prefix:interwiki prefix we are looking for. & $iwData:output array describing the interwiki with keys iw_url, iw_local, iw_trans and optionally iw_api and iw_wikiid. 'InternalParseBeforeSanitize':during Parser 's internalParse method just before the parser removes unwanted/dangerous HTML tags and after nowiki/noinclude/includeonly/onlyinclude and other processings. Ideal for syntax-extensions after template/parser function execution which respect nowiki and HTML-comments. & $parser:Parser object & $text:string containing partially parsed text & $stripState:Parser 's internal StripState object 'InternalParseBeforeLinks':during Parser 's internalParse method before links but after nowiki/noinclude/includeonly/onlyinclude and other processings. & $parser:Parser object & $text:string containing partially parsed text & $stripState:Parser 's internal StripState object 'InvalidateEmailComplete':Called after a user 's email has been invalidated successfully. $user:user(object) whose email is being invalidated 'IRCLineURL':When constructing the URL to use in an IRC notification. Callee may modify $url and $query, URL will be constructed as $url . $query & $url:URL to index.php & $query:Query string $rc:RecentChange object that triggered url generation 'IsFileCacheable':Override the result of Article::isFileCacheable()(if true) $article:article(object) being checked 'IsTrustedProxy':Override the result of wfIsTrustedProxy() $ip:IP being check $result:Change this value to override the result of wfIsTrustedProxy() 'IsUploadAllowedFromUrl':Override the result of UploadFromUrl::isAllowedUrl() $url:URL used to upload from & $allowed:Boolean indicating if uploading is allowed for given URL 'isValidEmailAddr':Override the result of User::isValidEmailAddr(), for instance to return false if the domain name doesn 't match your organization. $addr:The e-mail address entered by the user & $result:Set this and return false to override the internal checks 'isValidPassword':Override the result of User::isValidPassword() $password:The password entered by the user & $result:Set this and return false to override the internal checks $user:User the password is being validated for 'Language::getMessagesFileName':$code:The language code or the language we 're looking for a messages file for & $file:The messages file path, you can override this to change the location. 'LanguageGetNamespaces':Provide custom ordering for namespaces or remove namespaces. Do not use this hook to add namespaces. Use CanonicalNamespaces for that. & $namespaces:Array of namespaces indexed by their numbers 'LanguageGetMagic':DEPRECATED, use $magicWords in a file listed in $wgExtensionMessagesFiles instead. Use this to define synonyms of magic words depending of the language $magicExtensions:associative array of magic words synonyms $lang:language code(string) 'LanguageGetSpecialPageAliases':DEPRECATED, use $specialPageAliases in a file listed in $wgExtensionMessagesFiles instead. Use to define aliases of special pages names depending of the language $specialPageAliases:associative array of magic words synonyms $lang:language code(string) 'LanguageGetTranslatedLanguageNames':Provide translated language names. & $names:array of language code=> language name $code language of the preferred translations 'LanguageLinks':Manipulate a page 's language links. This is called in various places to allow extensions to define the effective language links for a page. $title:The page 's Title. & $links:Associative array mapping language codes to prefixed links of the form "language:title". & $linkFlags:Associative array mapping prefixed links to arrays of flags. Currently unused, but planned to provide support for marking individual language links in the UI, e.g. for featured articles. 'LinkBegin':Used when generating internal and interwiki links in Linker::link(), before processing starts. Return false to skip default processing and return $ret. See documentation for Linker::link() for details on the expected meanings of parameters. $skin:the Skin object $target:the Title that the link is pointing to & $html:the contents that the< a > tag should have(raw HTML) $result
getContext()
Get the RequestContext object.
isWriteMode()
Indicates whether this module requires write mode.
skin txt MediaWiki includes four core it has been set as the default in MediaWiki since the replacing Monobook it had been been the default skin since before being replaced by Vector largely rewritten in while keeping its appearance Several legacy skins were removed in the as the burden of supporting them became too heavy to bear Those in etc for skin dependent CSS etc for skin dependent JavaScript These can also be customised on a per user by etc This feature has led to a wide variety of user styles becoming that gallery is a good place to ending in php
getStashResult( $warnings)
Get Stash Result, throws an exception if the file could not be stashed.
const MIN_LENGTH_PARTNAME
parseMsg( $error)
Return the error message related to a certain array.
getPossibleErrors()
Returns a list of all possible errors returned by the module.
verifyUpload()
Performs file verification, dies on error.
dieUsageMsg( $error)
Output the error message related to a certain array.
static isEnabled()
Returns true if uploads are enabled.
getResult()
Get the result object.
getWarningsResult( $warnings)
Get Warnings Result.
static newGood( $value=null)
Factory function for good results.
execute()
Evaluates the parameters, performs the requested query, and sets up the result.
getExamples()
Returns usage examples for this module.
getApiWarnings()
Check warnings.
getAllowedParams()
Returns an array of allowed parameters (parameter name) => (default value) or (parameter name) => (ar...
Implements uploading from previously stored file.
getTokenSalt()
Returns the token salt if there is one, '' if the module doesn't require a salt, else false if the mo...
getUser()
Get the User object.
static getSessionStatus( $statusKey)
Get the current status of a chunked upload (used for polling).
This abstract class implements many basic API functions, and is the base of all API classes.
static & getSessionData( $key)
Upload a file from the upload stash into the local file repo.
initialize( $name, $url, $async=false)
Entry point for API upload.
Implements uploading from a HTTP resource.
dieRecoverableError( $error, $parameter, $data=array())
Throw an error that the user can recover from by providing a better value for $parameter.
static isEnabled()
Checks if the upload from URL feature is enabled.
const WINDOWS_NONASCII_FILENAME
getContextResult()
Get an upload result based on upload context.
the array() calling protocol came about after MediaWiki 1.4rc1.
List of Api Query prop modules.
when a variable name is used in a it is silently declared as a new masking the global
if(! $wgHtml5Version && $wgAllowRdfaAttributes) $wgFileExtensions
getRequireOnlyOneParameterErrorMessages( $params)
Generates the possible errors requireOnlyOneParameter() can die with.
getParamDescription()
Returns an array of parameter descriptions.
getWatchlistValue( $watchlist, $titleObj, $userOption=null)
Return true if we're to watch the page, false if not, null if no change.
needsToken()
Returns whether this module requires a token to execute It is used to show possible errors in action=...
wfDebug( $text, $dest='all')
Sends a line to the debug log if enabled or, optionally, to a comment in output.
extractRequestParams( $parseLimit=true)
Using getAllowedParams(), this function makes an array of the values provided by the user,...
static isAllowedUrl( $url)
Checks whether the URL is not allowed.
getResultProperties()
Returns possible properties in the result, grouped by the value of the prop parameter that shows them...
dieUsage( $description, $errorCode, $httpRespCode=0, $extradata=null)
Throw a UsageException, which will (if uncaught) call the main module's error handler and die with an...
Assemble the segments of a chunked upload.
requireOnlyOneParameter( $params)
Die if none or more than one of a certain set of parameters is set and not false.
performStash()
Stash the file and return the file key Also re-raises exceptions with slightly more informative messa...
mustBePosted()
Indicates whether this module must be called with a POST request.
performUpload( $warnings)
Perform the actual upload.
static isAllowedHost( $url)
Checks whether the URL is for an allowed host The domains in the whitelist can include wildcard chara...
please add to it if you re going to add events to the MediaWiki code where normally authentication against an external auth plugin would be creating a account $user
if(PHP_SAPI !='cli') $file
static setSessionStatus( $statusKey, $value)
Set the current status of a chunked upload (used for polling).
exportSession()
Export the resolved user IP, HTTP headers, user ID, and session ID.
static singleton( $wiki=false)
checkPermissions( $user)
Checks that the user has permissions to perform this upload.
This document is intended to provide useful advice for parties seeking to redistribute MediaWiki to end users It s targeted particularly at maintainers for Linux since it s been observed that distribution packages of MediaWiki often break We ve consistently had to recommend that users seeking support use official tarballs instead of their distribution s and this often solves whatever problem the user is having It would be nice if this could such as
getModuleName()
Get the name of the module being executed by this instance.
getMain()
Get the main module.
checkAsyncDownloadEnabled()
Checks if asynchronous copy uploads are enabled and throws an error if they are not.
Implements uploading from chunks.
transformWarnings( $warnings)
usually copyright or history_copyright This message must be in HTML not wikitext $subpages will be ignored and the rest of subPageSubtitle() will run. 'SkinTemplateBuildNavUrlsNav_urlsAfterPermalink' whether MediaWiki currently thinks this is a CSS JS page Hooks may change this value to override the return value of Title::isCssOrJsPage(). 'TitleIsAlwaysKnown' whether MediaWiki currently thinks this page is known isMovable() always returns false. $title whether MediaWiki currently thinks this page is movable Hooks may change this value to override the return value of Title::isMovable(). 'TitleIsWikitextPage' whether MediaWiki currently thinks this is a wikitext page Hooks may change this value to override the return value of Title::isWikitextPage() 'TitleMove' use UploadVerification and UploadVerifyFile instead where the first element is the message key and the remaining elements are used as parameters to the message based on mime etc Preferred in most cases over UploadVerification object with all info about the upload string as detected by MediaWiki Handlers will typically only apply for specific mime types object & $error
Implements regular file uploads.
getDescription()
Returns the description string for this module.
checkVerification(array $verification)
Performs file verification, dies on error.