(bug 38376) call to undefined method ThumbnailImage::getPath()
[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 $mto->getExtension(), $file->getMimeType(), $thumbParams );
360 $vals['thumbmime'] = $mime;
361 }
362 } elseif ( $mto && $mto->isError() ) {
363 $vals['thumberror'] = $mto->toText();
364 }
365 }
366 $vals['url'] = wfExpandUrl( $file->getFullURL(), PROTO_CURRENT );
367 $vals['descriptionurl'] = wfExpandUrl( $file->getDescriptionUrl(), PROTO_CURRENT );
368 }
369
370 if ( $sha1 ) {
371 $vals['sha1'] = wfBaseConvert( $file->getSha1(), 36, 16, 40 );
372 }
373
374 if ( $meta ) {
375 $metadata = unserialize( $file->getMetadata() );
376 if ( $version !== 'latest' ) {
377 $metadata = $file->convertMetadataVersion( $metadata, $version );
378 }
379 $vals['metadata'] = $metadata ? self::processMetaData( $metadata, $result ) : null;
380 }
381
382 if ( $mime ) {
383 $vals['mime'] = $file->getMimeType();
384 }
385
386 if ( $mediatype ) {
387 $vals['mediatype'] = $file->getMediaType();
388 }
389
390 if ( $archive && $file->isOld() ) {
391 $vals['archivename'] = $file->getArchiveName();
392 }
393
394 if ( $bitdepth ) {
395 $vals['bitdepth'] = $file->getBitDepth();
396 }
397
398 return $vals;
399 }
400
401 /**
402 *
403 * @param $metadata Array
404 * @param $result ApiResult
405 * @return Array
406 */
407 public static function processMetaData( $metadata, $result ) {
408 $retval = array();
409 if ( is_array( $metadata ) ) {
410 foreach ( $metadata as $key => $value ) {
411 $r = array( 'name' => $key );
412 if ( is_array( $value ) ) {
413 $r['value'] = self::processMetaData( $value, $result );
414 } else {
415 $r['value'] = $value;
416 }
417 $retval[] = $r;
418 }
419 }
420 $result->setIndexedTagName( $retval, 'metadata' );
421 return $retval;
422 }
423
424 public function getCacheMode( $params ) {
425 return 'public';
426 }
427
428 /**
429 * @param $img File
430 * @return string
431 */
432 protected function getContinueStr( $img ) {
433 return $img->getOriginalTitle()->getText() .
434 '|' . $img->getTimestamp();
435 }
436
437 public function getAllowedParams() {
438 return array(
439 'prop' => array(
440 ApiBase::PARAM_ISMULTI => true,
441 ApiBase::PARAM_DFLT => 'timestamp|user',
442 ApiBase::PARAM_TYPE => self::getPropertyNames()
443 ),
444 'limit' => array(
445 ApiBase::PARAM_TYPE => 'limit',
446 ApiBase::PARAM_DFLT => 1,
447 ApiBase::PARAM_MIN => 1,
448 ApiBase::PARAM_MAX => ApiBase::LIMIT_BIG1,
449 ApiBase::PARAM_MAX2 => ApiBase::LIMIT_BIG2
450 ),
451 'start' => array(
452 ApiBase::PARAM_TYPE => 'timestamp'
453 ),
454 'end' => array(
455 ApiBase::PARAM_TYPE => 'timestamp'
456 ),
457 'urlwidth' => array(
458 ApiBase::PARAM_TYPE => 'integer',
459 ApiBase::PARAM_DFLT => -1
460 ),
461 'urlheight' => array(
462 ApiBase::PARAM_TYPE => 'integer',
463 ApiBase::PARAM_DFLT => -1
464 ),
465 'metadataversion' => array(
466 ApiBase::PARAM_TYPE => 'string',
467 ApiBase::PARAM_DFLT => '1',
468 ),
469 'urlparam' => array(
470 ApiBase::PARAM_DFLT => '',
471 ApiBase::PARAM_TYPE => 'string',
472 ),
473 'continue' => null,
474 );
475 }
476
477 /**
478 * Returns all possible parameters to iiprop
479 *
480 * @param array $filter List of properties to filter out
481 *
482 * @return Array
483 */
484 public static function getPropertyNames( $filter = array() ) {
485 return array_diff( array_keys( self::getProperties() ), $filter );
486 }
487
488 /**
489 * Returns array key value pairs of properties and their descriptions
490 *
491 * @return array
492 */
493 private static function getProperties() {
494 return array(
495 'timestamp' => ' timestamp - Adds timestamp for the uploaded version',
496 'user' => ' user - Adds the user who uploaded the image version',
497 'userid' => ' userid - Add the user ID that uploaded the image version',
498 'comment' => ' comment - Comment on the version',
499 'parsedcomment' => ' parsedcomment - Parse the comment on the version',
500 'url' => ' url - Gives URL to the image and the description page',
501 'size' => ' size - Adds the size of the image in bytes and the height, width and page count (if applicable)',
502 'dimensions' => ' dimensions - Alias for size', // For backwards compatibility with Allimages
503 'sha1' => ' sha1 - Adds SHA-1 hash for the image',
504 'mime' => ' mime - Adds MIME type of the image',
505 'thumbmime' => ' thumbmime - Adds MIME type of the image thumbnail (requires url)',
506 'mediatype' => ' mediatype - Adds the media type of the image',
507 'metadata' => ' metadata - Lists EXIF metadata for the version of the image',
508 'archivename' => ' archivename - Adds the file name of the archive version for non-latest versions',
509 'bitdepth' => ' bitdepth - Adds the bit depth of the version',
510 );
511 }
512
513 /**
514 * Returns the descriptions for the properties provided by getPropertyNames()
515 *
516 * @param array $filter List of properties to filter out
517 *
518 * @return array
519 */
520 public static function getPropertyDescriptions( $filter = array() ) {
521 return array_merge(
522 array( 'What image information to get:' ),
523 array_values( array_diff_key( self::getProperties(), array_flip( $filter ) ) )
524 );
525 }
526
527 /**
528 * Return the API documentation for the parameters.
529 * @return Array parameter documentation.
530 */
531 public function getParamDescription() {
532 $p = $this->getModulePrefix();
533 return array(
534 'prop' => self::getPropertyDescriptions(),
535 'urlwidth' => array( "If {$p}prop=url is set, a URL to an image scaled to this width will be returned.",
536 'Only the current version of the image can be scaled' ),
537 'urlheight' => "Similar to {$p}urlwidth. Cannot be used without {$p}urlwidth",
538 'urlparam' => array( "A handler specific parameter string. For example, pdf's ",
539 "might use 'page15-100px'. {$p}urlwidth must be used and be consistent with {$p}urlparam" ),
540 'limit' => 'How many image revisions to return',
541 'start' => 'Timestamp to start listing from',
542 'end' => 'Timestamp to stop listing at',
543 'metadataversion' => array( "Version of metadata to use. if 'latest' is specified, use latest version.",
544 "Defaults to '1' for backwards compatibility" ),
545 'continue' => 'If the query response includes a continue value, use it here to get another page of results'
546 );
547 }
548
549 public static function getResultPropertiesFiltered( $filter = array() ) {
550 $props = array(
551 'timestamp' => array(
552 'timestamp' => 'timestamp'
553 ),
554 'user' => array(
555 'userhidden' => 'boolean',
556 'user' => 'string',
557 'anon' => 'boolean'
558 ),
559 'userid' => array(
560 'userhidden' => 'boolean',
561 'userid' => 'integer',
562 'anon' => 'boolean'
563 ),
564 'size' => array(
565 'size' => 'integer',
566 'width' => 'integer',
567 'height' => 'integer',
568 'pagecount' => array(
569 ApiBase::PROP_TYPE => 'integer',
570 ApiBase::PROP_NULLABLE => true
571 )
572 ),
573 'comment' => array(
574 'commenthidden' => 'boolean',
575 'comment' => array(
576 ApiBase::PROP_TYPE => 'string',
577 ApiBase::PROP_NULLABLE => true
578 )
579 ),
580 'parsedcomment' => array(
581 'commenthidden' => 'boolean',
582 'parsedcomment' => array(
583 ApiBase::PROP_TYPE => 'string',
584 ApiBase::PROP_NULLABLE => true
585 )
586 ),
587 'url' => array(
588 'filehidden' => 'boolean',
589 'thumburl' => array(
590 ApiBase::PROP_TYPE => 'string',
591 ApiBase::PROP_NULLABLE => true
592 ),
593 'thumbwidth' => array(
594 ApiBase::PROP_TYPE => 'integer',
595 ApiBase::PROP_NULLABLE => true
596 ),
597 'thumbheight' => array(
598 ApiBase::PROP_TYPE => 'integer',
599 ApiBase::PROP_NULLABLE => true
600 ),
601 'thumberror' => array(
602 ApiBase::PROP_TYPE => 'string',
603 ApiBase::PROP_NULLABLE => true
604 ),
605 'url' => array(
606 ApiBase::PROP_TYPE => 'string',
607 ApiBase::PROP_NULLABLE => true
608 ),
609 'descriptionurl' => array(
610 ApiBase::PROP_TYPE => 'string',
611 ApiBase::PROP_NULLABLE => true
612 )
613 ),
614 'sha1' => array(
615 'filehidden' => 'boolean',
616 'sha1' => array(
617 ApiBase::PROP_TYPE => 'string',
618 ApiBase::PROP_NULLABLE => true
619 )
620 ),
621 'mime' => array(
622 'filehidden' => 'boolean',
623 'mime' => array(
624 ApiBase::PROP_TYPE => 'string',
625 ApiBase::PROP_NULLABLE => true
626 )
627 ),
628 'mediatype' => array(
629 'filehidden' => 'boolean',
630 'mediatype' => array(
631 ApiBase::PROP_TYPE => 'string',
632 ApiBase::PROP_NULLABLE => true
633 )
634 ),
635 'archivename' => array(
636 'filehidden' => 'boolean',
637 'archivename' => array(
638 ApiBase::PROP_TYPE => 'string',
639 ApiBase::PROP_NULLABLE => true
640 )
641 ),
642 'bitdepth' => array(
643 'filehidden' => 'boolean',
644 'bitdepth' => array(
645 ApiBase::PROP_TYPE => 'integer',
646 ApiBase::PROP_NULLABLE => true
647 )
648 ),
649 );
650 return array_diff_key( $props, array_flip( $filter ) );
651 }
652
653 public function getResultProperties() {
654 return self::getResultPropertiesFiltered();
655 }
656
657 public function getDescription() {
658 return 'Returns image information and upload history';
659 }
660
661 public function getPossibleErrors() {
662 $p = $this->getModulePrefix();
663 return array_merge( parent::getPossibleErrors(), array(
664 array( 'code' => "{$p}urlwidth", 'info' => "{$p}urlheight cannot be used without {$p}urlwidth" ),
665 array( 'code' => 'urlparam', 'info' => "Invalid value for {$p}urlparam" ),
666 array( 'code' => 'urlparam_no_width', 'info' => "{$p}urlparam requires {$p}urlwidth" ),
667 array( 'code' => 'urlparam_urlwidth_mismatch', 'info' => "The width set in {$p}urlparm doesnt't " .
668 "match the one in {$p}urlwidth" ),
669 ) );
670 }
671
672 public function getExamples() {
673 return array(
674 'api.php?action=query&titles=File:Albert%20Einstein%20Head.jpg&prop=imageinfo',
675 'api.php?action=query&titles=File:Test.jpg&prop=imageinfo&iilimit=50&iiend=20071231235959&iiprop=timestamp|user|url',
676 );
677 }
678
679 public function getHelpUrls() {
680 return 'https://www.mediawiki.org/wiki/API:Properties#imageinfo_.2F_ii';
681 }
682
683 public function getVersion() {
684 return __CLASS__ . ': $Id$';
685 }
686 }