Get the real canonical name for NS_IMAGE, don't assume it will be Image: forever.
authorChad Horohoe <demon@users.mediawiki.org>
Thu, 20 Nov 2008 23:43:32 +0000 (23:43 +0000)
committerChad Horohoe <demon@users.mediawiki.org>
Thu, 20 Nov 2008 23:43:32 +0000 (23:43 +0000)
includes/filerepo/ForeignAPIRepo.php

index a6773e1..42085a7 100644 (file)
@@ -94,7 +94,7 @@ class ForeignAPIRepo extends FileRepo {
        
        function getImageInfo( $title, $time = false ) {
                return $this->queryImage( array(
-                       'titles' => 'Image:' . $title->getText(),
+                       'titles' => MWNamespace::getCanonicalName( NS_IMAGE ) . ':' . $title->getText(),
                        'iiprop' => 'timestamp|user|comment|url|size|sha1|metadata|mime' ) );
        }