From: Chad Horohoe Date: Wed, 18 Feb 2009 23:21:51 +0000 (+0000) Subject: Fix regression in ForeignAPIRepo because somebody changed how the API returned data :) X-Git-Tag: 1.31.0-rc.0~42794 X-Git-Url: https://git.cyclocoop.org/%27.WWW_URL.%27admin/?a=commitdiff_plain;h=737cfc633ae1ebff58b9d64983bb95d8c4321c35;p=lhc%2Fweb%2Fwiklou.git Fix regression in ForeignAPIRepo because somebody changed how the API returned data :) --- diff --git a/includes/filerepo/ForeignAPIFile.php b/includes/filerepo/ForeignAPIFile.php index bcea32c817..0a29367618 100644 --- a/includes/filerepo/ForeignAPIFile.php +++ b/includes/filerepo/ForeignAPIFile.php @@ -59,7 +59,14 @@ class ForeignAPIFile extends File { } public function getMetadata() { - return serialize( (array)@$this->mInfo['metadata'] ); + if ( isset( $this->mInfo['metadata'] ) ) { + $ret = array(); + foreach( $this->mInfo['metadata'] as $meta ) { + $ret[ $meta['name'] ] = $meta['value']; + } + return serialize( $ret ); + } + return null; } public function getSize() {