61 if ( !$this->
getUser()->isRegistered() ) {
62 $this->
dieWithError(
'apierror-mustbeloggedin-uploadstash',
'notloggedin' );
68 $prop = array_fill_keys( $params[
'prop'],
true );
77 if ( !$params[
'filekey'] && $params[
'sessionkey'] ) {
78 $params[
'filekey'] = $params[
'sessionkey'];
82 $stash = $this->repoGroup->getLocalRepo()->getUploadStash( $this->
getUser() );
84 foreach ( $params[
'filekey'] as $filekey ) {
85 $file = $stash->getFile( $filekey );
88 $result->addValue( [
'query', $this->
getModuleName() ],
null, $imageInfo );
89 $result->addIndexedTagName( [
'query', $this->
getModuleName() ], $modulePrefix );
100 'user',
'userid',
'comment',
'parsedcomment',
101 'mediatype',
'archivename',
'uploadwarning',
111 if ( $filter ===
null ) {
114 return parent::getPropertyNames( $filter );
124 if ( $filter ===
null ) {
127 return parent::getPropertyMessages( $filter );
150 'apihelp-query+imageinfo-param-urlwidth',
169 'action=query&prop=stashimageinfo&siifilekey=124sd34rsdf567'
170 =>
'apihelp-query+stashimageinfo-example-simple',
171 'action=query&prop=stashimageinfo&siifilekey=b34edoe3|bceffd4&' .
172 'siiurlwidth=120&siiprop=url'
173 =>
'apihelp-query+stashimageinfo-example-params',
178 return 'https://www.mediawiki.org/wiki/Special:MyLanguage/API:Stashimageinfo';
dieWithError( $msg, $code=null, $data=null, $httpCode=0)
Abort execution with an error.
getModulePrefix()
Get parameter prefix (usually two letters or an empty string).
const PARAM_HELP_MSG_PER_VALUE
((string|array|Message)[]) When PARAM_TYPE is an array, this is an array mapping those values to $msg...
requireAtLeastOneParameter( $params,... $required)
Die if none of a certain set of parameters is set and not false.
getResult()
Get the result object.
extractRequestParams( $options=[])
Using getAllowedParams(), this function makes an array of the values provided by the user,...
const PARAM_HELP_MSG
(string|array|Message) Specify an alternative i18n documentation message for this parameter.
getModuleName()
Get the name of the module being executed by this instance.
dieWithException(Throwable $exception, array $options=[])
Abort execution with an error derived from a throwable.
A query action to get image information and upload history.
mergeThumbParams( $image, $thumbParams, $otherParams)
Validate and merge scale parameters with handler thumb parameters, give error if invalid.
getScale( $params)
From parameters, construct a 'scale' array.
BadFileLookup $badFileLookup
Language $contentLanguage
static getInfo( $file, $prop, $result, $thumbParams=null, $opts=false)
Get result information for an image revision.
A query action to get image information from temporarily stashed files.
getHelpUrls()
Return links to more detailed help pages about the module.
getAllowedParams()
Returns an array of allowed parameters (parameter name) => (default value) or (parameter name) => (ar...
execute()
Evaluates the parameters, performs the requested query, and sets up the result.
static getPropertyMessages( $filter=null)
Returns messages for all possible parameters to siiprop.
static getPropertyNames( $filter=null)
Returns all possible parameters to siiprop.
__construct(ApiQuery $query, $moduleName, RepoGroup $repoGroup, Language $contentLanguage, BadFileLookup $badFileLookup)
getExamplesMessages()
Returns usage examples for this module.
This is the main query class.
Internationalisation code See https://www.mediawiki.org/wiki/Special:MyLanguage/Localisation for more...
Prioritized list of file repositories.
if(PHP_SAPI !='cli-server') if(!isset( $_SERVER['SCRIPT_FILENAME'])) $file
Item class for a filearchive table row.