Go to the documentation of this file.
31 parent::__construct( $query, $moduleName,
'sii' );
35 if ( !$this->
getUser()->isLoggedIn() ) {
36 $this->
dieWithError(
'apierror-mustbeloggedin-uploadstash',
'notloggedin' );
42 $prop = array_flip( $params[
'prop'] );
51 if ( !$params[
'filekey'] && $params[
'sessionkey'] ) {
52 $params[
'filekey'] = $params[
'sessionkey'];
58 foreach ( $params[
'filekey'] as $filekey ) {
59 $file = $stash->getFile( $filekey );
62 $result->addValue( [
'query', $this->
getModuleName() ],
null, $imageInfo );
63 $result->addIndexedTagName( [
'query', $this->
getModuleName() ], $modulePrefix );
74 'user',
'userid',
'comment',
'parsedcomment',
75 'mediatype',
'archivename',
'uploadwarning',
88 return parent::getPropertyNames(
$filter );
101 return parent::getPropertyMessages(
$filter );
124 'apihelp-query+imageinfo-param-urlwidth',
143 'action=query&prop=stashimageinfo&siifilekey=124sd34rsdf567'
144 =>
'apihelp-query+stashimageinfo-example-simple',
145 'action=query&prop=stashimageinfo&siifilekey=b34edoe3|bceffd4&' .
146 'siiurlwidth=120&siiprop=url'
147 =>
'apihelp-query+stashimageinfo-example-params',
152 return 'https://www.mediawiki.org/wiki/Special:MyLanguage/API:Stashimageinfo';
A query action to get image information from temporarily stashed files.
static getPropertyNames( $filter=null)
Returns all possible parameters to siiprop.
This is the main query class.
mergeThumbParams( $image, $thumbParams, $otherParams)
Validate and merge scale parameters with handler thumb parameters, give error if invalid.
dieWithError( $msg, $code=null, $data=null, $httpCode=null)
Abort execution with an error.
const PARAM_HELP_MSG
(string|array|Message) Specify an alternative i18n documentation message for this parameter.
getHelpUrls()
Return links to more detailed help pages about the module.
const PARAM_TYPE
(string|string[]) Either an array of allowed value strings, or a string type as described below.
getResult()
Get the result object.
if(PHP_SAPI !='cli-server') if(!isset( $_SERVER['SCRIPT_FILENAME'])) $file
Item class for a filearchive table row.
A query action to get image information and upload history.
static getInfo( $file, $prop, $result, $thumbParams=null, $opts=false)
Get result information for an image revision.
const PARAM_DEPRECATED
(boolean) Is the parameter deprecated (will show a warning)?
dieWithException( $exception, array $options=[])
Abort execution with an error derived from an exception.
extractRequestParams( $options=[])
Using getAllowedParams(), this function makes an array of the values provided by the user,...
__construct(ApiQuery $query, $moduleName)
getModulePrefix()
Get parameter prefix (usually two letters or an empty string).
execute()
Evaluates the parameters, performs the requested query, and sets up the result.
requireAtLeastOneParameter( $params, $required)
Die if none of a certain set of parameters is set and not false.
static getPropertyMessages( $filter=null)
Returns messages for all possible parameters to siiprop.
getExamplesMessages()
Returns usage examples for this module.
const PARAM_DFLT
(null|boolean|integer|string) Default value of the parameter.
getAllowedParams()
Returns an array of allowed parameters (parameter name) => (default value) or (parameter name) => (ar...
getModuleName()
Get the name of the module being executed by this instance.
const PARAM_ISMULTI
(boolean) Accept multiple pipe-separated values for this parameter (e.g.
getScale( $params)
From parameters, construct a 'scale' array.
const PARAM_HELP_MSG_PER_VALUE
((string|array|Message)[]) When PARAM_TYPE is an array, this is an array mapping those values to $msg...