Changeset 7506 for branches/2.1/admin/include/functions_metadata.php
- Timestamp:
- Oct 30, 2010, 10:14:11 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.1/admin/include/functions_metadata.php
r5196 r7506 39 39 if (preg_match('/(\d{4})(\d{2})(\d{2})/', $value, $matches)) 40 40 { 41 $iptc[$pwg_key] = $matches[1].'-'.$matches[2].'-'.$matches[3]; 41 $year = $matches[1]; 42 $month = $matches[2]; 43 $day = $matches[3]; 44 45 if (!checkdate($month, $day, $year)) 46 { 47 // we suppose the year is correct 48 $month = 1; 49 $day = 1; 50 } 51 52 $iptc[$pwg_key] = $year.'-'.$month.'-'.$day; 42 53 } 43 54 }
Note: See TracChangeset
for help on using the changeset viewer.