Index: trunk/phase3/includes/media/IPTC.php |
— | — | @@ -401,7 +401,6 @@ |
402 | 402 | * @param $charset String: The charset |
403 | 403 | */ |
404 | 404 | private static function convIPTC ( $data, $charset ) { |
405 | | - global $wgLang; |
406 | 405 | if ( is_array( $data ) ) { |
407 | 406 | foreach ($data as &$val) { |
408 | 407 | $val = self::convIPTCHelper( $val, $charset ); |
Index: trunk/phase3/includes/media/GIFMetadataExtractor.php |
— | — | @@ -114,8 +114,6 @@ |
115 | 115 | } |
116 | 116 | } elseif ($extension_code == 0xFE) { |
117 | 117 | // Comment block(s). |
118 | | - $data = ''; |
119 | | - |
120 | 118 | $data = self::readBlock( $fh ); |
121 | 119 | if ( $data === "" ) { |
122 | 120 | throw new Exception( 'Read error, zero-length comment block' ); |
Index: trunk/phase3/includes/media/BitmapMetadataHandler.php |
— | — | @@ -114,7 +114,7 @@ |
115 | 115 | $showXMP = function_exists( 'xml_parser_create_ns' ); |
116 | 116 | $meta = new self(); |
117 | 117 | $meta->getExif( $filename ); |
118 | | - $seg = Array(); |
| 118 | + |
119 | 119 | $seg = JpegMetadataExtractor::segmentSplitter( $filename ); |
120 | 120 | if ( isset( $seg['COM'] ) && isset( $seg['COM'][0] ) ) { |
121 | 121 | $meta->addMetadata( Array( 'JPEGFileComment' => $seg['COM'] ), 'native' ); |
Index: trunk/phase3/includes/media/Bitmap.php |
— | — | @@ -682,7 +682,7 @@ |
683 | 683 | * @deprecated |
684 | 684 | */ |
685 | 685 | function getMetadata( $image, $filename ) { |
686 | | - wfDeprected( __METHOD__ ); |
| 686 | + wfDeprecated( __METHOD__ ); |
687 | 687 | global $wgShowEXIF; |
688 | 688 | if ( $wgShowEXIF && file_exists( $filename ) ) { |
689 | 689 | $exif = new Exif( $filename ); |
Index: trunk/phase3/includes/media/Generic.php |
— | — | @@ -125,10 +125,12 @@ |
126 | 126 | */ |
127 | 127 | function convertMetadataVersion( $metadata, $version = 1 ) { |
128 | 128 | if ( !is_array( $metadata ) ) { |
| 129 | + |
129 | 130 | //unserialize to keep return parameter consistent. |
130 | 131 | wfSuppressWarnings(); |
131 | | - return unserialize( $metadata ); |
| 132 | + $ret = unserialize( $metadata ); |
132 | 133 | wfRestoreWarnings(); |
| 134 | + return $ret; |
133 | 135 | } |
134 | 136 | return $metadata; |
135 | 137 | } |
Index: trunk/phase3/includes/media/PNGMetadataExtractor.php |
— | — | @@ -53,8 +53,6 @@ |
54 | 54 | /* Other potentially useful things - Document */ |
55 | 55 | ); |
56 | 56 | |
57 | | - $showXMP = function_exists( 'xml_parser_create_ns' ); |
58 | | - |
59 | 57 | $frameCount = 0; |
60 | 58 | $loopCount = 1; |
61 | 59 | $text = array(); |
— | — | @@ -203,8 +201,6 @@ |
204 | 202 | |
205 | 203 | } elseif ( $chunk_type == 'tEXt' ) { |
206 | 204 | $buf = self::read( $fh, $chunk_size ); |
207 | | - $keyword = ''; |
208 | | - $content = ''; |
209 | 205 | |
210 | 206 | list( $keyword, $content ) = explode( "\x00", $buf, 2 ); |
211 | 207 | if ( $keyword === '' || $content === '' ) { |
— | — | @@ -233,8 +229,6 @@ |
234 | 230 | } elseif ( $chunk_type == 'zTXt' ) { |
235 | 231 | if ( function_exists( 'gzuncompress' ) ) { |
236 | 232 | $buf = self::read( $fh, $chunk_size ); |
237 | | - $keyword = ''; |
238 | | - $postKeyword = ''; |
239 | 233 | |
240 | 234 | list( $keyword, $postKeyword ) = explode( "\x00", $buf, 2 ); |
241 | 235 | if ( $keyword === '' || $postKeyword === '' ) { |
Index: trunk/phase3/includes/media/JpegMetadataExtractor.php |
— | — | @@ -142,11 +142,6 @@ |
143 | 143 | |
144 | 144 | // the +12 is the length of an empty item. |
145 | 145 | while ( $offset + 12 <= $appLen ) { |
146 | | - $valid = true; |
147 | | - $id = false; |
148 | | - $lenName = false; |
149 | | - $lenData = false; |
150 | | - |
151 | 146 | if ( substr( $app13, $offset, 4 ) !== '8BIM' ) { |
152 | 147 | // its supposed to be 8BIM |
153 | 148 | // but apparently sometimes isn't esp. in |