From b266d3b3b4ce9be2d26f0b9fe07915b5453e0f6d Mon Sep 17 00:00:00 2001 From: Garvin Hicking Date: Sat, 12 Sep 2009 11:18:28 +0000 Subject: [PATCH] * PostgreSQL compatibility for the printArchives() function to gather only unique timestamps (cite) --- docs/NEWS | 5 ++++- include/functions_entries.inc.php | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/docs/NEWS b/docs/NEWS index 4f0a372e..cdb24f82 100644 --- a/docs/NEWS +++ b/docs/NEWS @@ -10,7 +10,10 @@ Version 1.5 () * Allow to define sort order for search-results (garvinhicking) * More PHP 5.3.0 compat (split(), ereg(), ereg_replace()). - + + * PostgreSQL compatibility for the printArchives() function to + gather only unique timestamps (cite) + -- beta1 release * PHP 5.3.0 compatibility without E_WARNING triggers (garvinhicking) diff --git a/include/functions_entries.inc.php b/include/functions_entries.inc.php index 462e6a44..df597657 100644 --- a/include/functions_entries.inc.php +++ b/include/functions_entries.inc.php @@ -1599,7 +1599,7 @@ function serendipity_printArchives() { . (!serendipity_db_bool($serendipity['showFutureEntries']) ? " AND timestamp <= " . serendipity_db_time() : '') . (!empty($cat_sql) ? ' AND ' . $cat_sql : '') . (!empty($serendipity['GET']['viewAuthor']) ? ' AND e.authorid = ' . (int)$serendipity['GET']['viewAuthor'] : '') - . (!empty($cat_sql) ? " GROUP BY e.id" : ''); + . (!empty($cat_sql) ? " GROUP BY e.id, e.timestamp" : ''); $entries =& serendipity_db_query($q, false, 'assoc'); $group = array();