Make the PROTO_ parameter to wfExpandUrl() explicit in all calls. There are now no...
[lhc/web/wiklou.git] / includes / api / ApiQueryImageInfo.php
index a1fa7ac..03e11b7 100644 (file)
@@ -348,7 +348,7 @@ class ApiQueryImageInfo extends ApiQueryBase {
                        if ( !is_null( $thumbParams ) ) {
                                $mto = $file->transform( $thumbParams );
                                if ( $mto && !$mto->isError() ) {
-                                       $vals['thumburl'] = wfExpandUrl( $mto->getUrl() );
+                                       $vals['thumburl'] = wfExpandUrl( $mto->getUrl(), PROTO_CURRENT );
 
                                        // bug 23834 - If the URL's are the same, we haven't resized it, so shouldn't give the wanted
                                        // thumbnail sizes for the thumbnail actual size
@@ -370,8 +370,8 @@ class ApiQueryImageInfo extends ApiQueryBase {
                                        $vals['thumberror'] = $mto->toText();
                                }
                        }
-                       $vals['url'] = wfExpandUrl( $file->getFullURL() );
-                       $vals['descriptionurl'] = wfExpandUrl( $file->getDescriptionUrl() );
+                       $vals['url'] = wfExpandUrl( $file->getFullURL(), PROTO_CURRENT );
+                       $vals['descriptionurl'] = wfExpandUrl( $file->getDescriptionUrl(), PROTO_CURRENT );
                }
 
                if ( $sha1 ) {
@@ -568,13 +568,17 @@ class ApiQueryImageInfo extends ApiQueryBase {
                ) );
        }
 
-       protected function getExamples() {
+       public function getExamples() {
                return array(
                        'api.php?action=query&titles=File:Albert%20Einstein%20Head.jpg&prop=imageinfo',
                        'api.php?action=query&titles=File:Test.jpg&prop=imageinfo&iilimit=50&iiend=20071231235959&iiprop=timestamp|user|url',
                );
        }
 
+       public function getHelpUrls() {
+               return 'http://www.mediawiki.org/wiki/API:Properties#imageinfo_.2F_ii';
+       }
+
        public function getVersion() {
                return __CLASS__ . ': $Id$';
        }