Changeset 1039
- Timestamp:
- Feb 13, 2006, 10:51:22 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/branch-1_5/include/functions_html.inc.php
r1005 r1039 28 28 function get_icon( $date ) 29 29 { 30 // TODO $page['icon_cache'], for each date, associate the HTML icon 30 31 global $user, $conf, $lang; 31 32 32 if (!preg_match('/\d{4}-\d{2}-\d{2}/', $date)) 33 { 33 if (!preg_match('/^(\d{4})-(\d{2})-(\d{2})/', $date, $matches)) 34 { 35 // date can be empty, no icon to display 34 36 return ''; 35 37 } 36 37 list( $year,$month,$day ) = explode( '-', $date );38 39 list($devnull, $year, $month, $day) = $matches; 38 40 $unixtime = mktime( 0, 0, 0, $month, $day, $year ); 41 42 if ($unixtime === false // PHP 5.1.0 and above 43 or $unixtime === -1) // PHP prior to 5.1.0 44 { 45 return ''; 46 } 39 47 40 48 $diff = time() - $unixtime;
Note: See TracChangeset
for help on using the changeset viewer.