63 $this->repoGroup = $repoGroup;
67 if ( !$this->
getUser()->isRegistered() ) {
68 $this->
dieWithError(
'apierror-mustbeloggedin-uploadstash',
'notloggedin' );
74 $prop = array_fill_keys(
$params[
'prop'],
true );
88 $stash = $this->repoGroup->getLocalRepo()->getUploadStash( $this->
getUser() );
90 foreach (
$params[
'filekey'] as $filekey ) {
91 $file = $stash->getFile( $filekey );
94 $result->addValue( [
'query', $this->
getModuleName() ],
null, $imageInfo );
95 $result->addIndexedTagName( [
'query', $this->
getModuleName() ], $modulePrefix );
105 private const PROPERTY_FILTER = [
106 'user',
'userid',
'comment',
'parsedcomment',
107 'mediatype',
'archivename',
'uploadwarning',
117 return parent::getPropertyNames( $filter ?? self::PROPERTY_FILTER );
127 return parent::getPropertyMessages( $filter ?? self::PROPERTY_FILTER );
133 ParamValidator::PARAM_ISMULTI =>
true,
136 ParamValidator::PARAM_ISMULTI =>
true,
137 ParamValidator::PARAM_DEPRECATED =>
true,
140 ParamValidator::PARAM_ISMULTI =>
true,
141 ParamValidator::PARAM_DEFAULT =>
'timestamp|url',
147 ParamValidator::PARAM_TYPE =>
'integer',
148 ParamValidator::PARAM_DEFAULT => -1,
150 'apihelp-query+imageinfo-param-urlwidth',
155 ParamValidator::PARAM_TYPE =>
'integer',
156 ParamValidator::PARAM_DEFAULT => -1,
160 ParamValidator::PARAM_TYPE =>
'string',
161 ParamValidator::PARAM_DEFAULT =>
'',
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';
183class_alias( ApiQueryStashImageInfo::class,
'ApiQueryStashImageInfo' );
array $params
The job parameters.
Prioritized list of file repositories.