43 if ( !$this->
getUser()->isRegistered() ) {
44 $this->
dieWithError(
'apierror-mustbeloggedin-uploadstash',
'notloggedin' );
50 $prop = array_fill_keys( $params[
'prop'],
true );
59 if ( !$params[
'filekey'] && $params[
'sessionkey'] ) {
60 $params[
'filekey'] = $params[
'sessionkey'];
64 $stash = $this->repoGroup->getLocalRepo()->getUploadStash( $this->
getUser() );
66 foreach ( $params[
'filekey'] as $filekey ) {
67 $file = $stash->getFile( $filekey );
68 $finalThumbParam = $this->
mergeThumbParams( $file, $scale, $params[
'urlparam'] );
70 $result->addValue( [
'query', $this->
getModuleName() ],
null, $imageInfo );
71 $result->addIndexedTagName( [
'query', $this->
getModuleName() ], $modulePrefix );
81 private const PROPERTY_FILTER = [
82 'user',
'userid',
'comment',
'parsedcomment',
83 'mediatype',
'archivename',
'uploadwarning',
93 return parent::getPropertyNames( $filter ?? self::PROPERTY_FILTER );
103 return parent::getPropertyMessages( $filter ?? self::PROPERTY_FILTER );
110 ParamValidator::PARAM_ISMULTI =>
true,
113 ParamValidator::PARAM_ISMULTI =>
true,
114 ParamValidator::PARAM_DEPRECATED =>
true,
117 ParamValidator::PARAM_ISMULTI =>
true,
118 ParamValidator::PARAM_DEFAULT =>
'timestamp|url',
124 ParamValidator::PARAM_TYPE =>
'integer',
125 ParamValidator::PARAM_DEFAULT => -1,
127 'apihelp-query+imageinfo-param-urlwidth',
132 ParamValidator::PARAM_TYPE =>
'integer',
133 ParamValidator::PARAM_DEFAULT => -1,
137 ParamValidator::PARAM_TYPE =>
'string',
138 ParamValidator::PARAM_DEFAULT =>
'',
147 'action=query&prop=stashimageinfo&siifilekey=124sd34rsdf567'
148 =>
'apihelp-query+stashimageinfo-example-simple',
149 'action=query&prop=stashimageinfo&siifilekey=b34edoe3|bceffd4&' .
150 'siiurlwidth=120&siiprop=url'
151 =>
'apihelp-query+stashimageinfo-example-params',
157 return 'https://www.mediawiki.org/wiki/Special:MyLanguage/API:Stashimageinfo';
162class_alias( ApiQueryStashImageInfo::class,
'ApiQueryStashImageInfo' );