From 531ee3537559c2a03220b189c17f9c96d73bafc5 Mon Sep 17 00:00:00 2001 From: nikrou Date: Mon, 5 Jul 2010 20:46:55 +0000 Subject: Bug 1762 fixed : Compleet RSS Feed returns notice Remove mysql specific function git-svn-id: http://piwigo.org/svn/trunk@6662 68402e56-0260-453c-a942-63ccdbb3a9ee --- include/functions_notification.inc.php | 25 ++----------------------- 1 file changed, 2 insertions(+), 23 deletions(-) (limited to 'include') diff --git a/include/functions_notification.inc.php b/include/functions_notification.inc.php index eecdf1a5e..ebb713fb6 100644 --- a/include/functions_notification.inc.php +++ b/include/functions_notification.inc.php @@ -607,27 +607,6 @@ function get_html_description_recent_post_date($date_detail) return $description; } -/** - * explodes a MySQL datetime format (2005-07-14 23:01:37) in fields "year", - * "month", "day", "hour", "minute", "second". - * - * @param string mysql datetime format - * @return array - */ -function explode_mysqldt($mysqldt) -{ - $date = array(); - list($date['year'], - $date['month'], - $date['day'], - $date['hour'], - $date['minute'], - $date['second']) - = preg_split('/[-: ]/', $mysqldt); - - return $date; -} - /** * returns title about recently published elements grouped by post date * @param $date_detail: selected date computed by get_recent_post_dates function @@ -637,10 +616,10 @@ function get_title_recent_post_date($date_detail) global $lang; $date = $date_detail['date_available']; - $exploded_date = explode_mysqldt($date); + $exploded_date = strptime($date, '%Y-%m-%d %H:%M:%S'); $title = l10n_dec('%d new image', '%d new images', $date_detail['nb_elements']); - $title .= ' ('.$lang['month'][(int)$exploded_date['month']].' '.$exploded_date['day'].')'; + $title .= ' ('.$lang['month'][(int)$exploded_date['tm_mon']].' '.$exploded_date['tm_mday'].')'; return $title; } -- cgit v1.2.3