Fix #8417 : Handle EXIF unknown date
This commit is contained in:
parent
1616467427
commit
3a459112d7
3 changed files with 6 additions and 1 deletions
|
|
@ -469,6 +469,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
|
|||
on upgrade.
|
||||
* Recentchanges RSS/Atom feeds now use a separate message for the description
|
||||
to avoid cluttering it with useless wiki formatting
|
||||
* (bug 8417) Handle EXIF unknown dates
|
||||
|
||||
|
||||
== Languages updated ==
|
||||
|
|
|
|||
|
|
@ -731,7 +731,9 @@ class FormatExif {
|
|||
case 'DateTime':
|
||||
case 'DateTimeOriginal':
|
||||
case 'DateTimeDigitized':
|
||||
if( preg_match( '/^(\d{4}):(\d\d):(\d\d) (\d\d):(\d\d):(\d\d)$/', $val ) ) {
|
||||
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 ) ) {
|
||||
$tags[$tag] = $wgLang->timeanddate( wfTimestamp(TS_MW, $val) );
|
||||
}
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -2384,6 +2384,8 @@ is collapsed. Others will be hidden by default.
|
|||
'exif-compression-1' => 'Uncompressed',
|
||||
'exif-compression-6' => 'JPEG',
|
||||
|
||||
'exif-unknowndate' => 'Unknown date',
|
||||
|
||||
'exif-photometricinterpretation-2' => 'RGB',
|
||||
'exif-photometricinterpretation-6' => 'YCbCr',
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue