r47473 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r47472‎ | r47473 | r47474 >
Date:23:21, 18 February 2009
Author:demon
Status:resolved (Comments)
Tags:
Comment:
Fix regression in ForeignAPIRepo because somebody changed how the API returned data :)
Modified paths:
  • /trunk/phase3/includes/filerepo/ForeignAPIFile.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/filerepo/ForeignAPIFile.php
@@ -59,7 +59,14 @@
6060 }
6161
6262 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;
6471 }
6572
6673 public function getSize() {

Follow-up revisions

RevisionCommit summaryAuthorDate
r50215Fix up r47473: descend into subarrays in ForeignAPIFile::getMetadata()catrope09:47, 5 May 2009

Comments

#Comment by Brion VIBBER (talk | contribs)   22:49, 3 March 2009

This needs to dive into sub-arrays; Ogg media metadata has multiple levels, and not transferring the info correctly confuses the ogg handler.

example query

#Comment by Catrope (talk | contribs)   09:48, 5 May 2009

Done in r50215

Status & tagging log