r51945 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r51944‎ | r51945 | r51946 >
Date:01:18, 16 June 2009
Author:tstarling
Status:deferred
Tags:
Comment:
Fix fatal error in File_Ogg_Theora constructor (at least in PHP 5.3) due to the lack of a File_Ogg_Media::File_Ogg_Media() function. Use parent::__construct() instead. Standardize on PHP 5 style __construct() generally.
Modified paths:
  • /trunk/extensions/OggHandler/PEAR/File_Ogg/File/Ogg.php (modified) (history)
  • /trunk/extensions/OggHandler/PEAR/File_Ogg/File/Ogg/Bitstream.php (modified) (history)
  • /trunk/extensions/OggHandler/PEAR/File_Ogg/File/Ogg/Flac.php (modified) (history)
  • /trunk/extensions/OggHandler/PEAR/File_Ogg/File/Ogg/Media.php (modified) (history)
  • /trunk/extensions/OggHandler/PEAR/File_Ogg/File/Ogg/Speex.php (modified) (history)
  • /trunk/extensions/OggHandler/PEAR/File_Ogg/File/Ogg/Theora.php (modified) (history)
  • /trunk/extensions/OggHandler/PEAR/File_Ogg/File/Ogg/Vorbis.php (modified) (history)

Diff [purge]

Index: trunk/extensions/OggHandler/PEAR/File_Ogg/File/Ogg.php
@@ -175,7 +175,7 @@
176176 * @access public
177177 * @param string $fileLocation The path of the file to be examined.
178178 */
179 - function File_Ogg($fileLocation)
 179+ function __construct($fileLocation)
180180 {
181181 clearstatcache();
182182 if (! file_exists($fileLocation)) {
Index: trunk/extensions/OggHandler/PEAR/File_Ogg/File/Ogg/Bitstream.php
@@ -72,7 +72,7 @@
7373 * @param pointer $filePointer File pointer for the current physical stream.
7474 * @access private
7575 */
76 - function File_Ogg_Bitstream($streamSerial, $streamData, $filePointer)
 76+ function __construct($streamSerial, $streamData, $filePointer)
7777 {
7878 $this->_streamSerial = $streamSerial;
7979 $this->_streamList = $streamData;
Index: trunk/extensions/OggHandler/PEAR/File_Ogg/File/Ogg/Media.php
@@ -51,10 +51,6 @@
5252
5353 /* Start offset of the stream in seconds */
5454 var $_startOffset = 0;
55 - /*function File_Ogg_Media($streamSerial, $streamData, $filePointer)
56 - {
57 - File_Ogg_Bitstream::File_Ogg_Bitstream($streamSerial, $streamData, $filePointer);
58 - }*/
5955
6056 /**
6157 * Get a short string describing the type of the stream
Index: trunk/extensions/OggHandler/PEAR/File_Ogg/File/Ogg/Theora.php
@@ -44,9 +44,9 @@
4545 /**
4646 * @access private
4747 */
48 - function File_Ogg_Theora($streamSerial, $streamData, $filePointer)
 48+ function __construct($streamSerial, $streamData, $filePointer)
4949 {
50 - File_Ogg_Media::File_Ogg_Media($streamSerial, $streamData, $filePointer);
 50+ parent::__construct($streamSerial, $streamData, $filePointer);
5151 $this->_decodeIdentificationHeader();
5252 $this->_decodeCommentsHeader();
5353 $endSec = $this->getSecondsFromGranulePos( $this->_lastGranulePos );
Index: trunk/extensions/OggHandler/PEAR/File_Ogg/File/Ogg/Speex.php
@@ -38,7 +38,7 @@
3939 /**
4040 * @access private
4141 */
42 - function File_Ogg_Speex($streamSerial, $streamData, $filePointer)
 42+ function __construct($streamSerial, $streamData, $filePointer)
4343 {
4444 parent::__construct($streamSerial, $streamData, $filePointer);
4545 $this->_decodeHeader();
Index: trunk/extensions/OggHandler/PEAR/File_Ogg/File/Ogg/Vorbis.php
@@ -166,9 +166,9 @@
167167 * @param pointer $filePointer File pointer for the current physical stream.
168168 * @access private
169169 */
170 - function File_Ogg_Vorbis($streamSerial, $streamData, $filePointer)
 170+ function __construct($streamSerial, $streamData, $filePointer)
171171 {
172 - File_Ogg_Bitstream::File_Ogg_Bitstream($streamSerial, $streamData, $filePointer);
 172+ parent::__construct($streamSerial, $streamData, $filePointer);
173173 $this->_decodeIdentificationHeader();
174174 $this->_decodeCommentsHeader(OGG_VORBIS_COMMENTS_HEADER, OGG_VORBIS_COMMENTS_PAGE_OFFSET);
175175 $endSec = (( '0x' . substr( $this->_lastGranulePos, 0, 8 ) ) * pow(2, 32)
Index: trunk/extensions/OggHandler/PEAR/File_Ogg/File/Ogg/Flac.php
@@ -38,7 +38,7 @@
3939 /**
4040 * @access private
4141 */
42 - function File_Ogg_Flac($streamSerial, $streamData, $filePointer)
 42+ function __construct($streamSerial, $streamData, $filePointer)
4343 {
4444 parent::__construct($streamSerial, $streamData, $filePointer);
4545 $this->_decodeHeader();

Status & tagging log