Index: trunk/phase3/includes/filerepo/ForeignAPIFile.php |
— | — | @@ -59,7 +59,14 @@ |
60 | 60 | } |
61 | 61 | |
62 | 62 | public function getMetadata() { |
63 | | - return serialize( (array)@$this->mInfo['metadata'] ); |
| 63 | + if ( isset( $this->mInfo['metadata'] ) ) { |
| 64 | + $ret = array(); |
| 65 | + foreach( $this->mInfo['metadata'] as $meta ) { |
| 66 | + $ret[ $meta['name'] ] = $meta['value']; |
| 67 | + } |
| 68 | + return serialize( $ret ); |
| 69 | + } |
| 70 | + return null; |
64 | 71 | } |
65 | 72 | |
66 | 73 | public function getSize() { |