From e1de0d6fafb4e22e90f9277b9f60baa8943e1228 Mon Sep 17 00:00:00 2001 From: nikrou Date: Wed, 3 Feb 2010 09:26:32 +0000 Subject: Feature 511 : fix problems with calendar functions add pwg_db_concat() function git-svn-id: http://piwigo.org/svn/trunk@4833 68402e56-0260-453c-a942-63ccdbb3a9ee --- include/calendar_base.class.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'include/calendar_base.class.php') diff --git a/include/calendar_base.class.php b/include/calendar_base.class.php index 4424c62f9..ee1fe7bea 100644 --- a/include/calendar_base.class.php +++ b/include/calendar_base.class.php @@ -220,6 +220,7 @@ $this->get_date_where($level).' ;'; $level_items = simple_hash_from_query($query, 'period', 'nb_images'); + $level_items = array_to_int($level_items); if ( count($level_items)==1 and count($page['chronology_date'])calendar_levels)-1) @@ -291,13 +292,14 @@ GROUP BY period'; $current = implode('-', $page['chronology_date'] ); $upper_items = array_from_query( $query, 'period'); + $upper_items = array_to_int($upper_items); - usort($upper_items, 'date_compare'); + usort($upper_items, 'version_compare'); $upper_items_rank = array_flip($upper_items); if ( !isset($upper_items_rank[$current]) ) { array_push($upper_items, $current);// just in case (external link) - usort($upper_items, 'date_compare'); + usort($upper_items, 'version_compare'); $upper_items_rank = array_flip($upper_items); } $current_rank = $upper_items_rank[$current]; -- cgit v1.2.3