r87925 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r87924‎ | r87925 | r87926 >
Date:19:56, 12 May 2011
Author:hartman
Status:deferred
Tags:
Comment:
Forwardport r75680 and r81950 from OggHandler to TimedMediaHandler
Modified paths:
  • /trunk/extensions/TimedMediaHandler/handlers/OggHandler/OggHandler.php (modified) (history)

Diff [purge]

Index: trunk/extensions/TimedMediaHandler/handlers/OggHandler/OggHandler.php
@@ -14,7 +14,7 @@
1515 try {
1616 $f = new File_Ogg( $path );
1717 $streams = array();
18 - foreach ( $f->listStreams() as $streamType => $streamIDs ) {
 18+ foreach ( $f->listStreams() as $streamIDs ) {
1919 foreach ( $streamIDs as $streamID ) {
2020 $stream = $f->getStream( $streamID );
2121 $streams[$streamID] = array(
@@ -88,15 +88,15 @@
8989 }
9090
9191 function getStreamTypes( $file ) {
92 - $streamTypes = '';
 92+ $streamTypes = array();
9393 $metadata = $this->unpackMetadata( $file->getMetadata() );
9494 if ( !$metadata || isset( $metadata['error'] ) ) {
9595 return false;
9696 }
9797 foreach ( $metadata['streams'] as $stream ) {
98 - $streamTypes[$stream['type']] = true;
 98+ $streamTypes[] = $stream['type'];
9999 }
100 - return array_keys( $streamTypes );
 100+ return $streamTypes;
101101 }
102102
103103 function getOffset( $file ){

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r75680Another big cull on unused variables and suchreedy21:55, 29 October 2010
r81950Fix getStreamTypes(): initialized to a string but used as an array. Also remo...demon10:01, 11 February 2011

Status & tagging log