Merge "mw.loader: Guard localStorage access with try/catch in mw.store.clear()"
[lhc/web/wiklou.git] / includes / filerepo / ForeignAPIRepo.php
index debdeb5..d7241e9 100644 (file)
@@ -50,7 +50,6 @@ class ForeignAPIRepo extends FileRepo {
         */
        protected static $imageInfoProps = array(
                'url',
-               'thumbnail',
                'timestamp',
        );
 
@@ -218,7 +217,11 @@ class ForeignAPIRepo extends FileRepo {
                if ( $data && isset( $data['query']['pages'] ) ) {
                        foreach ( $data['query']['pages'] as $info ) {
                                if ( isset( $info['imageinfo'][0] ) ) {
-                                       return $info['imageinfo'][0];
+                                       $return = $info['imageinfo'][0];
+                                       if ( isset( $info['pageid'] ) ) {
+                                               $return['pageid'] = $info['pageid'];
+                                       }
+                                       return $return;
                                }
                        }
                }