diff options
Diffstat (limited to 'includes/Exif.php')
-rw-r--r-- | includes/Exif.php | 30 |
1 files changed, 17 insertions, 13 deletions
diff --git a/includes/Exif.php b/includes/Exif.php index 0860d5f7..3a06ca1b 100644 --- a/includes/Exif.php +++ b/includes/Exif.php @@ -1,7 +1,6 @@ <?php /** - * @package MediaWiki - * @subpackage Metadata + * @addtogroup Media * * @author Ævar Arnfjörð Bjarmason <avarab@gmail.com> * @copyright Copyright © 2005, Ævar Arnfjörð Bjarmason @@ -22,13 +21,12 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * http://www.gnu.org/copyleft/gpl.html * - * @link http://exif.org/Exif2-2.PDF The Exif 2.2 specification - * @bug 1555, 1947 + * @see http://exif.org/Exif2-2.PDF The Exif 2.2 specification */ /** - * @package MediaWiki - * @subpackage Metadata + * @todo document (e.g. one-sentence class-overview description) + * @addtogroup Media */ class Exif { //@{ @@ -95,9 +93,9 @@ class Exif { var $basename; /** - * The private log to log to + * The private log to log to, e.g. 'exif' */ - var $log = 'exif'; + var $log = false; //@} @@ -106,7 +104,7 @@ class Exif { * * @param $file String: filename. */ - function Exif( $file ) { + function __construct( $file ) { /** * Page numbers here refer to pages in the EXIF 2.2 standard * @@ -563,7 +561,10 @@ class Exif { * @param $fname String: * @param $action Mixed: , default NULL. */ - function debug( $in, $fname, $action = NULL ) { + function debug( $in, $fname, $action = NULL ) { + if ( !$this->log ) { + return; + } $type = gettype( $in ); $class = ucfirst( __CLASS__ ); if ( $type === 'array' ) @@ -588,6 +589,9 @@ class Exif { * @param $io Boolean: Specify whether we're beginning or ending */ function debugFile( $fname, $io ) { + if ( !$this->log ) { + return; + } $class = ucfirst( __CLASS__ ); if ( $io ) { wfDebugLog( $this->log, "$class::$fname: begin processing: '{$this->basename}'\n" ); @@ -599,8 +603,8 @@ class Exif { } /** - * @package MediaWiki - * @subpackage Metadata + * @todo document (e.g. one-sentence class-overview description) + * @addtogroup Media */ class FormatExif { /** @@ -733,7 +737,7 @@ class FormatExif { case 'DateTimeDigitized': if( $val == '0000:00:00 00:00:00' ) { $tags[$tag] = wfMsg('exif-unknowndate'); - } elseif( preg_match( '/^(\d{4}):(\d\d):(\d\d) (\d\d):(\d\d):(\d\d)$/', $val ) ) { + } elseif( preg_match( '/^(?:\d{4}):(?:\d\d):(?:\d\d) (?:\d\d):(?:\d\d):(?:\d\d)$/', $val ) ) { $tags[$tag] = $wgLang->timeanddate( wfTimestamp(TS_MW, $val) ); } break; |