Changeset 2857


Ignore:
Timestamp:
Nov 9, 2008, 10:49:46 PM (15 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

merge -c2856 from trunk to branch 2.0
The exact copy of commit log in 2856.

Location:
branches/2.0/include
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/2.0/include/category_default.inc.php

    r2850 r2857  
    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') ?
  • branches/2.0/include/functions.inc.php

    r2789 r2857  
    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 = '';
Note: See TracChangeset for help on using the changeset viewer.