Index: trunk/phase3/includes/Exif.php |
— | — | @@ -81,14 +81,28 @@ |
82 | 82 | var $mFormattedExifData; |
83 | 83 | |
84 | 84 | /**#@-*/ |
| 85 | + |
| 86 | + /**#@+ |
| 87 | + * @var string |
| 88 | + * @access private |
| 89 | + */ |
| 90 | + |
| 91 | + /** |
| 92 | + * The file being processed |
| 93 | + */ |
| 94 | + var $file; |
85 | 95 | |
86 | 96 | /** |
| 97 | + * The basename of the file being processed |
| 98 | + */ |
| 99 | + var $basename; |
| 100 | + |
| 101 | + /** |
87 | 102 | * The private log to log to |
88 | | - * |
89 | | - * @var string |
90 | | - * @access private |
91 | 103 | */ |
92 | 104 | var $log = 'exif'; |
| 105 | + |
| 106 | + /**#@-*/ |
93 | 107 | |
94 | 108 | /** |
95 | 109 | * Constructor |
— | — | @@ -281,13 +295,14 @@ |
282 | 296 | ), |
283 | 297 | ); |
284 | 298 | |
285 | | - $basename = basename( $file ); |
| 299 | + $this->file = $file; |
| 300 | + $this->basename = basename( $this->file ); |
286 | 301 | |
287 | 302 | $this->makeFlatExifTags(); |
288 | 303 | |
289 | | - $this->debugFile( $basename, __FUNCTION__, true ); |
| 304 | + $this->debugFile( $this->basename, __FUNCTION__, true ); |
290 | 305 | wfSuppressWarnings(); |
291 | | - $data = exif_read_data( $file ); |
| 306 | + $data = exif_read_data( $this->file ); |
292 | 307 | wfRestoreWarnings(); |
293 | 308 | /** |
294 | 309 | * exif_read_data() will return false on invalid input, such as |
— | — | @@ -299,7 +314,7 @@ |
300 | 315 | $this->makeFilteredData(); |
301 | 316 | $this->makeFormattedData(); |
302 | 317 | |
303 | | - $this->debugFile( $basename, __FUNCTION__, false ); |
| 318 | + $this->debugFile( __FUNCTION__, false ); |
304 | 319 | } |
305 | 320 | |
306 | 321 | /**#@+ |
— | — | @@ -567,12 +582,12 @@ |
568 | 583 | * @paran string $fname The name of the function calling this function |
569 | 584 | * @param bool $bool $io Specify whether we're beginning or ending |
570 | 585 | */ |
571 | | - function debugFile( $basename, $fname, $io ) { |
| 586 | + function debugFile( $fname, $io ) { |
572 | 587 | $class = ucfirst( __CLASS__ ); |
573 | 588 | if ( $io ) |
574 | | - wfDebugLog( $this->log, "$class::$fname: begin processing: '$basename'\n" ); |
| 589 | + wfDebugLog( $this->log, "$class::$fname: begin processing: '{$this->basename}'\n" ); |
575 | 590 | else |
576 | | - wfDebugLog( $this->log, "$class::$fname: end processing: '$basename'\n" ); |
| 591 | + wfDebugLog( $this->log, "$class::$fname: end processing: '{$this->basename}'\n" ); |
577 | 592 | } |
578 | 593 | |
579 | 594 | } |
— | — | @@ -999,9 +1014,11 @@ |
1000 | 1015 | * @return string A wfMsg of "exif-$tag-$val" in lower case |
1001 | 1016 | */ |
1002 | 1017 | function msg( $tag, $val, $arg = null ) { |
| 1018 | + global $wgContLang; |
| 1019 | + |
1003 | 1020 | if ($val === '') |
1004 | 1021 | $val = 'value'; |
1005 | | - return wfMsg( strtolower( "exif-$tag-$val" ), $arg ); |
| 1022 | + return wfMsg( $wgContLang->lc( "exif-$tag-$val" ), $arg ); |
1006 | 1023 | } |
1007 | 1024 | |
1008 | 1025 | /** |