aboutsummaryrefslogtreecommitdiffstats
path: root/include/functions_notification.inc.php
diff options
context:
space:
mode:
authornikrou <nikrou@piwigo.org>2010-07-05 20:54:10 +0000
committernikrou <nikrou@piwigo.org>2010-07-05 20:54:10 +0000
commit52c568327c190455bce75a9b9f6317d659ef8e6c (patch)
treee3e888c5ee4f6f8e5ede92b02c823c73431ade6b /include/functions_notification.inc.php
parent6b8e08936c40867aa41710f4625f6e95a4c424cf (diff)
Bug 1762 fixed : Compleet RSS Feed returns notice
Remove mysql specific function Merge from trunk git-svn-id: http://piwigo.org/svn/branches/2.1@6663 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r--include/functions_notification.inc.php25
1 files changed, 2 insertions, 23 deletions
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
@@ -608,27 +608,6 @@ function get_html_description_recent_post_date($date_detail)
}
/**
- * 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;
}