From 49845a6946a30ca497381e41cd31f46c97f2f3e5 Mon Sep 17 00:00:00 2001 From: Dany De Bontridder Date: Wed, 19 Jan 2011 21:42:21 +0000 Subject: [PATCH] fix when in the preference the exercice is the older one, we cannot see the newer --- html/ajax_history.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/html/ajax_history.php b/html/ajax_history.php index b117521a1..7871dfbc9 100644 --- a/html/ajax_history.php +++ b/html/ajax_history.php @@ -68,7 +68,11 @@ if ( isset($_GET['f_id'])) if (isset($_GET['ex'])) { $limit_periode=$per->get_limit($_GET['ex']); - $array['from_periode']=$limit_periode[0]->first_day(); + if ( $_GET['ex'] < $year) + $array['from_periode']=$limit_periode[0]->first_day(); + else + $array['to_periode']=$limit_periode[1]->last_day(); + } /* @@ -136,7 +140,11 @@ if ( isset($_REQUEST['pcm_val'])) if (isset($_GET['ex'])) { $limit_periode=$per->get_limit($_GET['ex']); - $array['from_periode']=$limit_periode[0]->first_day(); + if ( $_GET['ex'] < $year) + $array['from_periode']=$limit_periode[0]->first_day(); + else + $array['to_periode']=$limit_periode[1]->last_day(); + } /* * Add button to select another year