Changeset 2856

Show
Ignore:
Timestamp:
11/09/08 22:44:44 (5 years ago)
Author:
rub
Message:

Resolved issue 0000900: format_date function doesn't work when time is omitted with 'mysql_datetime' type

Continue correction of grum

Location:
trunk/include
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/include/category_default.inc.php

    r2853 r2856  
    118118      'FILE_POSTED' => format_date($row['date_available'], 'mysql_datetime'), 
    119119      'FILE_CREATED' => (empty($row['date_creation'])) ?  
    120         '-': format_date($row['date_creation'], 'us'), 
     120        '-': format_date($row['date_creation'], 'mysql_date'), 
    121121      'FILE_DESC' => (empty($row['comment'])) ? '-' : $row['comment'], 
    122122      'FILE_AUTHOR' => (empty($row['author'])) ? '-' : $row['author'], 
     
    126126      'FILE_HEIGHT' => (empty($row['height'])) ? '-' : $row['height'], 
    127127      'FILE_METADATE' => (empty($row['date_metadata_update'])) ?  
    128         '-': format_date($row['date_metadata_update'], 'us'), 
     128        '-': format_date($row['date_metadata_update'], 'mysql_date'), 
    129129      'FILE_RATE' => (empty($row['rate'])) ? '-' : $row['rate'],  
    130130      'FILE_HAS_HD' => ($row['has_high'] and $user['enabled_high']=='true') ?  
  • trunk/include/functions.inc.php

    r2790 r2856  
    602602      break; 
    603603    } 
     604    case 'mysql_date' : 
     605    { 
     606      preg_match('/^(\d{4})-(\d{2})-(\d{2})$/', 
     607                 $date, $out); 
     608      list($year,$month,$day) = 
     609        array($out[1],$out[2],$out[3]); 
     610      break; 
     611    } 
    604612  } 
    605613  $formated_date = '';