Merge "Add method parameter type documentation"
[lhc/web/wiklou.git] / includes / filerepo / ForeignAPIRepo.php
index 6b0bc3a..02d83bb 100644 (file)
@@ -80,6 +80,14 @@ class ForeignAPIRepo extends FileRepo {
                }
        }
 
+       /**
+        * @return string
+        * @since 1.22
+        */
+       function getApiUrl() {
+               return $this->mApiBase;
+       }
+
        /**
         * Per docs in FileRepo, this needs to return false if we don't support versioned
         * files. Well, we don't.
@@ -265,7 +273,7 @@ class ForeignAPIRepo extends FileRepo {
                ) );
                $info = $this->getImageInfo( $data );
 
-               if( $data && $info && isset( $info['thumberror'] ) ) {
+               if ( $data && $info && isset( $info['thumberror'] ) ) {
                        wfDebug( __METHOD__ . " got remote thumb error " . $info['thumberror'] . "\n" );
                        return new MediaTransformError(
                                'thumbnail_error_remote',
@@ -416,6 +424,18 @@ class ForeignAPIRepo extends FileRepo {
                return Http::userAgent() . " ForeignAPIRepo/" . self::VERSION;
        }
 
+       /**
+        * Get information about the repo - overrides/extends the parent
+        * class's information.
+        * @return array
+        * @since 1.22
+        */
+       function getInfo() {
+               $info = parent::getInfo();
+               $info['apiurl'] = $this->getApiUrl();
+               return $info;
+       }
+
        /**
         * Like a Http:get request, but with custom User-Agent.
         * @see Http:get