Merge "Reduced some master queries by adding flags to Revision functions."
[lhc/web/wiklou.git] / includes / api / ApiQueryImageInfo.php
1 <?php
2 /**
3 *
4 *
5 * Created on July 6, 2007
6 *
7 * Copyright © 2006 Yuri Astrakhan <Firstname><Lastname>@gmail.com
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License along
20 * with this program; if not, write to the Free Software Foundation, Inc.,
21 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
22 * http://www.gnu.org/copyleft/gpl.html
23 *
24 * @file
25 */
26
27 /**
28 * A query action to get image information and upload history.
29 *
30 * @ingroup API
31 */
32 class ApiQueryImageInfo extends ApiQueryBase {
33
34 public function __construct( $query, $moduleName, $prefix = 'ii' ) {
35 // We allow a subclass to override the prefix, to create a related API module.
36 // Some other parts of MediaWiki construct this with a null $prefix, which used to be ignored when this only took two arguments
37 if ( is_null( $prefix ) ) {
38 $prefix = 'ii';
39 }
40 parent::__construct( $query, $moduleName, $prefix );
41 }
42
43 public function execute() {
44 $params = $this->extractRequestParams();
45
46 $prop = array_flip( $params['prop'] );
47
48 $scale = $this->getScale( $params );
49
50 $pageIds = $this->getPageSet()->getAllTitlesByNamespace();
51 if ( !empty( $pageIds[NS_FILE] ) ) {
52 $titles = array_keys( $pageIds[NS_FILE] );
53 asort( $titles ); // Ensure the order is always the same
54
55 $skip = false;
56 if ( !is_null( $params['continue'] ) ) {
57 $skip = true;
58 $cont = explode( '|', $params['continue'] );
59 if ( count( $cont ) != 2 ) {
60 $this->dieUsage( 'Invalid continue param. You should pass the original ' .
61 'value returned by the previous query', '_badcontinue' );
62 }
63 $fromTitle = strval( $cont[0] );
64 $fromTimestamp = $cont[1];
65 // Filter out any titles before $fromTitle
66 foreach ( $titles as $key => $title ) {
67 if ( $title < $fromTitle ) {
68 unset( $titles[$key] );
69 } else {
70 break;
71 }
72 }
73 }
74
75 $result = $this->getResult();
76 $images = RepoGroup::singleton()->findFiles( $titles );
77 foreach ( $images as $img ) {
78 // Skip redirects
79 if ( $img->getOriginalTitle()->isRedirect() ) {
80 continue;
81 }
82
83 $start = $skip ? $fromTimestamp : $params['start'];
84 $pageId = $pageIds[NS_FILE][ $img->getOriginalTitle()->getDBkey() ];
85
86 $fit = $result->addValue(
87 array( 'query', 'pages', intval( $pageId ) ),
88 'imagerepository', $img->getRepoName()
89 );
90 if ( !$fit ) {
91 if ( count( $pageIds[NS_FILE] ) == 1 ) {
92 // The user is screwed. imageinfo can't be solely
93 // responsible for exceeding the limit in this case,
94 // so set a query-continue that just returns the same
95 // thing again. When the violating queries have been
96 // out-continued, the result will get through
97 $this->setContinueEnumParameter( 'start',
98 wfTimestamp( TS_ISO_8601, $img->getTimestamp() ) );
99 } else {
100 $this->setContinueEnumParameter( 'continue',
101 $this->getContinueStr( $img ) );
102 }
103 break;
104 }
105
106 // Check if we can make the requested thumbnail, and get transform parameters.
107 $finalThumbParams = $this->mergeThumbParams( $img, $scale, $params['urlparam'] );
108
109 // Get information about the current version first
110 // Check that the current version is within the start-end boundaries
111 $gotOne = false;
112 if (
113 ( is_null( $start ) || $img->getTimestamp() <= $start ) &&
114 ( is_null( $params['end'] ) || $img->getTimestamp() >= $params['end'] )
115 ) {
116 $gotOne = true;
117
118 $fit = $this->addPageSubItem( $pageId,
119 self::getInfo( $img, $prop, $result,
120 $finalThumbParams, $params['metadataversion'] ) );
121 if ( !$fit ) {
122 if ( count( $pageIds[NS_FILE] ) == 1 ) {
123 // See the 'the user is screwed' comment above
124 $this->setContinueEnumParameter( 'start',
125 wfTimestamp( TS_ISO_8601, $img->getTimestamp() ) );
126 } else {
127 $this->setContinueEnumParameter( 'continue',
128 $this->getContinueStr( $img ) );
129 }
130 break;
131 }
132 }
133
134 // Now get the old revisions
135 // Get one more to facilitate query-continue functionality
136 $count = ( $gotOne ? 1 : 0 );
137 $oldies = $img->getHistory( $params['limit'] - $count + 1, $start, $params['end'] );
138 foreach ( $oldies as $oldie ) {
139 if ( ++$count > $params['limit'] ) {
140 // We've reached the extra one which shows that there are additional pages to be had. Stop here...
141 // Only set a query-continue if there was only one title
142 if ( count( $pageIds[NS_FILE] ) == 1 ) {
143 $this->setContinueEnumParameter( 'start',
144 wfTimestamp( TS_ISO_8601, $oldie->getTimestamp() ) );
145 }
146 break;
147 }
148 $fit = $this->addPageSubItem( $pageId,
149 self::getInfo( $oldie, $prop, $result,
150 $finalThumbParams, $params['metadataversion'] ) );
151 if ( !$fit ) {
152 if ( count( $pageIds[NS_FILE] ) == 1 ) {
153 $this->setContinueEnumParameter( 'start',
154 wfTimestamp( TS_ISO_8601, $oldie->getTimestamp() ) );
155 } else {
156 $this->setContinueEnumParameter( 'continue',
157 $this->getContinueStr( $oldie ) );
158 }
159 break;
160 }
161 }
162 if ( !$fit ) {
163 break;
164 }
165 $skip = false;
166 }
167
168 $data = $this->getResultData();
169 foreach ( $data['query']['pages'] as $pageid => $arr ) {
170 if ( !isset( $arr['imagerepository'] ) ) {
171 $result->addValue(
172 array( 'query', 'pages', $pageid ),
173 'imagerepository', ''
174 );
175 }
176 // The above can't fail because it doesn't increase the result size
177 }
178 }
179 }
180
181 /**
182 * From parameters, construct a 'scale' array
183 * @param $params Array: Parameters passed to api.
184 * @return Array or Null: key-val array of 'width' and 'height', or null
185 */
186 public function getScale( $params ) {
187 $p = $this->getModulePrefix();
188
189 // Height and width.
190 if ( $params['urlheight'] != -1 && $params['urlwidth'] == -1 ) {
191 $this->dieUsage( "{$p}urlheight cannot be used without {$p}urlwidth", "{$p}urlwidth" );
192 }
193
194 if ( $params['urlwidth'] != -1 ) {
195 $scale = array();
196 $scale['width'] = $params['urlwidth'];
197 $scale['height'] = $params['urlheight'];
198 } else {
199 $scale = null;
200 if ( $params['urlparam'] ) {
201 $this->dieUsage( "{$p}urlparam requires {$p}urlwidth", "urlparam_no_width" );
202 }
203 return $scale;
204 }
205
206 return $scale;
207 }
208
209 /** Validate and merge scale parameters with handler thumb parameters, give error if invalid.
210 *
211 * We do this later than getScale, since we need the image
212 * to know which handler, since handlers can make their own parameters.
213 * @param File $image Image that params are for.
214 * @param Array $thumbParams thumbnail parameters from getScale
215 * @param String $otherParams of otherParams (iiurlparam).
216 * @return Array of parameters for transform.
217 */
218 protected function mergeThumbParams ( $image, $thumbParams, $otherParams ) {
219 if ( !$otherParams ) {
220 return $thumbParams;
221 }
222 $p = $this->getModulePrefix();
223
224 $h = $image->getHandler();
225 if ( !$h ) {
226 $this->setWarning( 'Could not create thumbnail because ' .
227 $image->getName() . ' does not have an associated image handler' );
228 return $thumbParams;
229 }
230
231 $paramList = $h->parseParamString( $otherParams );
232 if ( !$paramList ) {
233 // Just set a warning (instead of dieUsage), as in many cases
234 // we could still render the image using width and height parameters,
235 // and this type of thing could happen between different versions of
236 // handlers.
237 $this->setWarning( "Could not parse {$p}urlparam for " . $image->getName()
238 . '. Using only width and height' );
239 return $thumbParams;
240 }
241
242 if ( isset( $paramList['width'] ) ) {
243 if ( intval( $paramList['width'] ) != intval( $thumbParams['width'] ) ) {
244 $this->dieUsage( "{$p}urlparam had width of {$paramList['width']} but "
245 . "{$p}urlwidth was {$thumbParams['width']}", "urlparam_urlwidth_mismatch" );
246 }
247 }
248
249 foreach ( $paramList as $name => $value ) {
250 if ( !$h->validateParam( $name, $value ) ) {
251 $this->dieUsage( "Invalid value for {$p}urlparam ($name=$value)", "urlparam" );
252 }
253 }
254
255 return $thumbParams + $paramList;
256 }
257
258 /**
259 * Get result information for an image revision
260 *
261 * @param $file File object
262 * @param $prop Array of properties to get (in the keys)
263 * @param $result ApiResult object
264 * @param $thumbParams Array containing 'width' and 'height' items, or null
265 * @param $version string Version of image metadata (for things like jpeg which have different versions).
266 * @return Array: result array
267 */
268 static function getInfo( $file, $prop, $result, $thumbParams = null, $version = 'latest' ) {
269 $vals = array();
270 // Timestamp is shown even if the file is revdelete'd in interface
271 // so do same here.
272 if ( isset( $prop['timestamp'] ) ) {
273 $vals['timestamp'] = wfTimestamp( TS_ISO_8601, $file->getTimestamp() );
274 }
275
276 $user = isset( $prop['user'] );
277 $userid = isset( $prop['userid'] );
278
279 if ( $user || $userid ) {
280 if ( $file->isDeleted( File::DELETED_USER ) ) {
281 $vals['userhidden'] = '';
282 } else {
283 if ( $user ) {
284 $vals['user'] = $file->getUser();
285 }
286 if ( $userid ) {
287 $vals['userid'] = $file->getUser( 'id' );
288 }
289 if ( !$file->getUser( 'id' ) ) {
290 $vals['anon'] = '';
291 }
292 }
293 }
294
295 // This is shown even if the file is revdelete'd in interface
296 // so do same here.
297 if ( isset( $prop['size'] ) || isset( $prop['dimensions'] ) ) {
298 $vals['size'] = intval( $file->getSize() );
299 $vals['width'] = intval( $file->getWidth() );
300 $vals['height'] = intval( $file->getHeight() );
301
302 $pageCount = $file->pageCount();
303 if ( $pageCount !== false ) {
304 $vals['pagecount'] = $pageCount;
305 }
306 }
307
308 $pcomment = isset( $prop['parsedcomment'] );
309 $comment = isset( $prop['comment'] );
310
311 if ( $pcomment || $comment ) {
312 if ( $file->isDeleted( File::DELETED_COMMENT ) ) {
313 $vals['commenthidden'] = '';
314 } else {
315 if ( $pcomment ) {
316 $vals['parsedcomment'] = Linker::formatComment(
317 $file->getDescription(), $file->getTitle() );
318 }
319 if ( $comment ) {
320 $vals['comment'] = $file->getDescription();
321 }
322 }
323 }
324
325 $url = isset( $prop['url'] );
326 $sha1 = isset( $prop['sha1'] );
327 $meta = isset( $prop['metadata'] );
328 $mime = isset( $prop['mime'] );
329 $mediatype = isset( $prop['mediatype'] );
330 $archive = isset( $prop['archivename'] );
331 $bitdepth = isset( $prop['bitdepth'] );
332
333 if ( ( $url || $sha1 || $meta || $mime || $mediatype || $archive || $bitdepth )
334 && $file->isDeleted( File::DELETED_FILE ) ) {
335 $vals['filehidden'] = '';
336
337 //Early return, tidier than indenting all following things one level
338 return $vals;
339 }
340
341 if ( $url ) {
342 if ( !is_null( $thumbParams ) ) {
343 $mto = $file->transform( $thumbParams );
344 if ( $mto && !$mto->isError() ) {
345 $vals['thumburl'] = wfExpandUrl( $mto->getUrl(), PROTO_CURRENT );
346
347 // bug 23834 - If the URL's are the same, we haven't resized it, so shouldn't give the wanted
348 // thumbnail sizes for the thumbnail actual size
349 if ( $mto->getUrl() !== $file->getUrl() ) {
350 $vals['thumbwidth'] = intval( $mto->getWidth() );
351 $vals['thumbheight'] = intval( $mto->getHeight() );
352 } else {
353 $vals['thumbwidth'] = intval( $file->getWidth() );
354 $vals['thumbheight'] = intval( $file->getHeight() );
355 }
356
357 if ( isset( $prop['thumbmime'] ) && $file->getHandler() ) {
358 list( $ext, $mime ) = $file->getHandler()->getThumbType(
359 substr( $mto->getPath(), strrpos( $mto->getPath(), '.' ) + 1 ),
360 $file->getMimeType(), $thumbParams );
361 $vals['thumbmime'] = $mime;
362 }
363 } elseif ( $mto && $mto->isError() ) {
364 $vals['thumberror'] = $mto->toText();
365 }
366 }
367 $vals['url'] = wfExpandUrl( $file->getFullURL(), PROTO_CURRENT );
368 $vals['descriptionurl'] = wfExpandUrl( $file->getDescriptionUrl(), PROTO_CURRENT );
369 }
370
371 if ( $sha1 ) {
372 $vals['sha1'] = wfBaseConvert( $file->getSha1(), 36, 16, 40 );
373 }
374
375 if ( $meta ) {
376 $metadata = unserialize( $file->getMetadata() );
377 if ( $version !== 'latest' ) {
378 $metadata = $file->convertMetadataVersion( $metadata, $version );
379 }
380 $vals['metadata'] = $metadata ? self::processMetaData( $metadata, $result ) : null;
381 }
382
383 if ( $mime ) {
384 $vals['mime'] = $file->getMimeType();
385 }
386
387 if ( $mediatype ) {
388 $vals['mediatype'] = $file->getMediaType();
389 }
390
391 if ( $archive && $file->isOld() ) {
392 $vals['archivename'] = $file->getArchiveName();
393 }
394
395 if ( $bitdepth ) {
396 $vals['bitdepth'] = $file->getBitDepth();
397 }
398
399 return $vals;
400 }
401
402 /**
403 *
404 * @param $metadata Array
405 * @param $result ApiResult
406 * @return Array
407 */
408 public static function processMetaData( $metadata, $result ) {
409 $retval = array();
410 if ( is_array( $metadata ) ) {
411 foreach ( $metadata as $key => $value ) {
412 $r = array( 'name' => $key );
413 if ( is_array( $value ) ) {
414 $r['value'] = self::processMetaData( $value, $result );
415 } else {
416 $r['value'] = $value;
417 }
418 $retval[] = $r;
419 }
420 }
421 $result->setIndexedTagName( $retval, 'metadata' );
422 return $retval;
423 }
424
425 public function getCacheMode( $params ) {
426 return 'public';
427 }
428
429 /**
430 * @param $img File
431 * @return string
432 */
433 protected function getContinueStr( $img ) {
434 return $img->getOriginalTitle()->getText() .
435 '|' . $img->getTimestamp();
436 }
437
438 public function getAllowedParams() {
439 return array(
440 'prop' => array(
441 ApiBase::PARAM_ISMULTI => true,
442 ApiBase::PARAM_DFLT => 'timestamp|user',
443 ApiBase::PARAM_TYPE => self::getPropertyNames()
444 ),
445 'limit' => array(
446 ApiBase::PARAM_TYPE => 'limit',
447 ApiBase::PARAM_DFLT => 1,
448 ApiBase::PARAM_MIN => 1,
449 ApiBase::PARAM_MAX => ApiBase::LIMIT_BIG1,
450 ApiBase::PARAM_MAX2 => ApiBase::LIMIT_BIG2
451 ),
452 'start' => array(
453 ApiBase::PARAM_TYPE => 'timestamp'
454 ),
455 'end' => array(
456 ApiBase::PARAM_TYPE => 'timestamp'
457 ),
458 'urlwidth' => array(
459 ApiBase::PARAM_TYPE => 'integer',
460 ApiBase::PARAM_DFLT => -1
461 ),
462 'urlheight' => array(
463 ApiBase::PARAM_TYPE => 'integer',
464 ApiBase::PARAM_DFLT => -1
465 ),
466 'metadataversion' => array(
467 ApiBase::PARAM_TYPE => 'string',
468 ApiBase::PARAM_DFLT => '1',
469 ),
470 'urlparam' => array(
471 ApiBase::PARAM_DFLT => '',
472 ApiBase::PARAM_TYPE => 'string',
473 ),
474 'continue' => null,
475 );
476 }
477
478 /**
479 * Returns all possible parameters to iiprop
480 *
481 * @param array $filter List of properties to filter out
482 *
483 * @return Array
484 */
485 public static function getPropertyNames( $filter = array() ) {
486 return array_diff( array_keys( self::getProperties() ), $filter );
487 }
488
489 /**
490 * Returns array key value pairs of properties and their descriptions
491 *
492 * @return array
493 */
494 private static function getProperties() {
495 return array(
496 'timestamp' => ' timestamp - Adds timestamp for the uploaded version',
497 'user' => ' user - Adds the user who uploaded the image version',
498 'userid' => ' userid - Add the user ID that uploaded the image version',
499 'comment' => ' comment - Comment on the version',
500 'parsedcomment' => ' parsedcomment - Parse the comment on the version',
501 'url' => ' url - Gives URL to the image and the description page',
502 'size' => ' size - Adds the size of the image in bytes and the height, width and page count (if applicable)',
503 'dimensions' => ' dimensions - Alias for size', // For backwards compatibility with Allimages
504 'sha1' => ' sha1 - Adds SHA-1 hash for the image',
505 'mime' => ' mime - Adds MIME type of the image',
506 'thumbmime' => ' thumbmime - Adds MIME type of the image thumbnail (requires url)',
507 'mediatype' => ' mediatype - Adds the media type of the image',
508 'metadata' => ' metadata - Lists EXIF metadata for the version of the image',
509 'archivename' => ' archivename - Adds the file name of the archive version for non-latest versions',
510 'bitdepth' => ' bitdepth - Adds the bit depth of the version',
511 );
512 }
513
514 /**
515 * Returns the descriptions for the properties provided by getPropertyNames()
516 *
517 * @param array $filter List of properties to filter out
518 *
519 * @return array
520 */
521 public static function getPropertyDescriptions( $filter = array() ) {
522 return array_merge(
523 array( 'What image information to get:' ),
524 array_values( array_diff_key( self::getProperties(), array_flip( $filter ) ) )
525 );
526 }
527
528 /**
529 * Return the API documentation for the parameters.
530 * @return Array parameter documentation.
531 */
532 public function getParamDescription() {
533 $p = $this->getModulePrefix();
534 return array(
535 'prop' => self::getPropertyDescriptions(),
536 'urlwidth' => array( "If {$p}prop=url is set, a URL to an image scaled to this width will be returned.",
537 'Only the current version of the image can be scaled' ),
538 'urlheight' => "Similar to {$p}urlwidth. Cannot be used without {$p}urlwidth",
539 'urlparam' => array( "A handler specific parameter string. For example, pdf's ",
540 "might use 'page15-100px'. {$p}urlwidth must be used and be consistent with {$p}urlparam" ),
541 'limit' => 'How many image revisions to return',
542 'start' => 'Timestamp to start listing from',
543 'end' => 'Timestamp to stop listing at',
544 'metadataversion' => array( "Version of metadata to use. if 'latest' is specified, use latest version.",
545 "Defaults to '1' for backwards compatibility" ),
546 'continue' => 'If the query response includes a continue value, use it here to get another page of results'
547 );
548 }
549
550 public static function getResultPropertiesFiltered( $filter = array() ) {
551 $props = array(
552 'timestamp' => array(
553 'timestamp' => 'timestamp'
554 ),
555 'user' => array(
556 'userhidden' => 'boolean',
557 'user' => 'string',
558 'anon' => 'boolean'
559 ),
560 'userid' => array(
561 'userhidden' => 'boolean',
562 'userid' => 'integer',
563 'anon' => 'boolean'
564 ),
565 'size' => array(
566 'size' => 'integer',
567 'width' => 'integer',
568 'height' => 'integer',
569 'pagecount' => array(
570 ApiBase::PROP_TYPE => 'integer',
571 ApiBase::PROP_NULLABLE => true
572 )
573 ),
574 'comment' => array(
575 'commenthidden' => 'boolean',
576 'comment' => array(
577 ApiBase::PROP_TYPE => 'string',
578 ApiBase::PROP_NULLABLE => true
579 )
580 ),
581 'parsedcomment' => array(
582 'commenthidden' => 'boolean',
583 'parsedcomment' => array(
584 ApiBase::PROP_TYPE => 'string',
585 ApiBase::PROP_NULLABLE => true
586 )
587 ),
588 'url' => array(
589 'filehidden' => 'boolean',
590 'thumburl' => array(
591 ApiBase::PROP_TYPE => 'string',
592 ApiBase::PROP_NULLABLE => true
593 ),
594 'thumbwidth' => array(
595 ApiBase::PROP_TYPE => 'integer',
596 ApiBase::PROP_NULLABLE => true
597 ),
598 'thumbheight' => array(
599 ApiBase::PROP_TYPE => 'integer',
600 ApiBase::PROP_NULLABLE => true
601 ),
602 'thumberror' => array(
603 ApiBase::PROP_TYPE => 'string',
604 ApiBase::PROP_NULLABLE => true
605 ),
606 'url' => array(
607 ApiBase::PROP_TYPE => 'string',
608 ApiBase::PROP_NULLABLE => true
609 ),
610 'descriptionurl' => array(
611 ApiBase::PROP_TYPE => 'string',
612 ApiBase::PROP_NULLABLE => true
613 )
614 ),
615 'sha1' => array(
616 'filehidden' => 'boolean',
617 'sha1' => array(
618 ApiBase::PROP_TYPE => 'string',
619 ApiBase::PROP_NULLABLE => true
620 )
621 ),
622 'mime' => array(
623 'filehidden' => 'boolean',
624 'mime' => array(
625 ApiBase::PROP_TYPE => 'string',
626 ApiBase::PROP_NULLABLE => true
627 )
628 ),
629 'mediatype' => array(
630 'filehidden' => 'boolean',
631 'mediatype' => array(
632 ApiBase::PROP_TYPE => 'string',
633 ApiBase::PROP_NULLABLE => true
634 )
635 ),
636 'archivename' => array(
637 'filehidden' => 'boolean',
638 'archivename' => array(
639 ApiBase::PROP_TYPE => 'string',
640 ApiBase::PROP_NULLABLE => true
641 )
642 ),
643 'bitdepth' => array(
644 'filehidden' => 'boolean',
645 'bitdepth' => array(
646 ApiBase::PROP_TYPE => 'integer',
647 ApiBase::PROP_NULLABLE => true
648 )
649 ),
650 );
651 return array_diff_key( $props, array_flip( $filter ) );
652 }
653
654 public function getResultProperties() {
655 return self::getResultPropertiesFiltered();
656 }
657
658 public function getDescription() {
659 return 'Returns image information and upload history';
660 }
661
662 public function getPossibleErrors() {
663 $p = $this->getModulePrefix();
664 return array_merge( parent::getPossibleErrors(), array(
665 array( 'code' => "{$p}urlwidth", 'info' => "{$p}urlheight cannot be used without {$p}urlwidth" ),
666 array( 'code' => 'urlparam', 'info' => "Invalid value for {$p}urlparam" ),
667 array( 'code' => 'urlparam_no_width', 'info' => "{$p}urlparam requires {$p}urlwidth" ),
668 array( 'code' => 'urlparam_urlwidth_mismatch', 'info' => "The width set in {$p}urlparm doesnt't " .
669 "match the one in {$p}urlwidth" ),
670 ) );
671 }
672
673 public function getExamples() {
674 return array(
675 'api.php?action=query&titles=File:Albert%20Einstein%20Head.jpg&prop=imageinfo',
676 'api.php?action=query&titles=File:Test.jpg&prop=imageinfo&iilimit=50&iiend=20071231235959&iiprop=timestamp|user|url',
677 );
678 }
679
680 public function getHelpUrls() {
681 return 'https://www.mediawiki.org/wiki/API:Properties#imageinfo_.2F_ii';
682 }
683
684 public function getVersion() {
685 return __CLASS__ . ': $Id$';
686 }
687 }