From 041a199e0d8928d6f8882a4c8b4c2e238ad79b21 Mon Sep 17 00:00:00 2001 From: Julian Prud'homme Date: Thu, 19 Apr 2007 14:00:32 +0200 Subject: [PATCH] [svn r12063] Fix a bug with last connection date --- main/inc/lib/tracking.lib.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/main/inc/lib/tracking.lib.php b/main/inc/lib/tracking.lib.php index 6186362e5a..0e865efb0e 100644 --- a/main/inc/lib/tracking.lib.php +++ b/main/inc/lib/tracking.lib.php @@ -120,10 +120,12 @@ class Tracking { else{ $timestamp=strtotime($last_login_date); $currentTimestamp=mktime(); - + + echo $currentTimestamp-$timestamp.'
'; + //If the last connection is > than 7 days, the text is red //345600 = 7 days in seconds - if($currentTimestamp-$timestamp>345600){ + if($currentTimestamp-$timestamp>604800){ return ''.format_locale_date(get_lang('DateFormatLongWithoutDay'),strtotime($last_login_date)).''; } else{ @@ -152,7 +154,7 @@ class Tracking { $currentTimestamp=mktime(); //If the last connection is > than 7 days, the text is red //345600 = 7 days in seconds - if($currentTimestamp-$timestamp>345600){ + if($currentTimestamp-$timestamp>604800){ return ''.format_locale_date(get_lang('DateFormatLongWithoutDay'),strtotime($last_login_date)).''; } else{