aboutsummaryrefslogtreecommitdiffstats
path: root/include/calendar_base.class.php
diff options
context:
space:
mode:
authornikrou <nikrou@piwigo.org>2010-02-03 09:26:32 +0000
committernikrou <nikrou@piwigo.org>2010-02-03 09:26:32 +0000
commite1de0d6fafb4e22e90f9277b9f60baa8943e1228 (patch)
tree32806a8f2cadd8ab7c67c9d0c4118b6f0a0eddd4 /include/calendar_base.class.php
parent7fda6e5af949b66378055571377048af430df0fd (diff)
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
Diffstat (limited to 'include/calendar_base.class.php')
-rw-r--r--include/calendar_base.class.php6
1 files changed, 4 insertions, 2 deletions
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'])<count($this->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];