aboutsummaryrefslogtreecommitdiffstats
path: root/include/calendar_base.class.php
diff options
context:
space:
mode:
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];