Ignore:
Timestamp:
Jul 5, 2010, 10:46:55 PM (14 years ago)
Author:
nikrou
Message:

Bug 1762 fixed : Compleet RSS Feed returns notice
Remove mysql specific function

File:
1 edited

Legend:

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

    r6652 r6662  
    609609
    610610/**
    611  * explodes a MySQL datetime format (2005-07-14 23:01:37) in fields "year",
    612  * "month", "day", "hour", "minute", "second".
    613  *
    614  * @param string mysql datetime format
    615  * @return array
    616  */
    617 function explode_mysqldt($mysqldt)
    618 {
    619   $date = array();
    620   list($date['year'],
    621        $date['month'],
    622        $date['day'],
    623        $date['hour'],
    624        $date['minute'],
    625        $date['second'])
    626     = preg_split('/[-: ]/', $mysqldt);
    627 
    628   return $date;
    629 }
    630 
    631 /**
    632611 * returns title about recently published elements grouped by post date
    633612 * @param $date_detail: selected date computed by get_recent_post_dates function
     
    638617
    639618  $date = $date_detail['date_available'];
    640   $exploded_date = explode_mysqldt($date);
     619  $exploded_date = strptime($date, '%Y-%m-%d %H:%M:%S');
    641620
    642621  $title = l10n_dec('%d new image', '%d new images', $date_detail['nb_elements']);
    643   $title .= ' ('.$lang['month'][(int)$exploded_date['month']].' '.$exploded_date['day'].')';
     622  $title .= ' ('.$lang['month'][(int)$exploded_date['tm_mon']].' '.$exploded_date['tm_mday'].')';
    644623
    645624  return $title;
Note: See TracChangeset for help on using the changeset viewer.