[svn r12063] Fix a bug with last connection date

skala
Julian Prud'homme 19 years ago
parent 65e98f87a8
commit 041a199e0d
  1. 6
      main/inc/lib/tracking.lib.php

@ -121,9 +121,11 @@ class Tracking {
$timestamp=strtotime($last_login_date); $timestamp=strtotime($last_login_date);
$currentTimestamp=mktime(); $currentTimestamp=mktime();
echo $currentTimestamp-$timestamp.'<br>';
//If the last connection is > than 7 days, the text is red //If the last connection is > than 7 days, the text is red
//345600 = 7 days in seconds //345600 = 7 days in seconds
if($currentTimestamp-$timestamp>345600){ if($currentTimestamp-$timestamp>604800){
return '<span style="color: #F00;">'.format_locale_date(get_lang('DateFormatLongWithoutDay'),strtotime($last_login_date)).'</span>'; return '<span style="color: #F00;">'.format_locale_date(get_lang('DateFormatLongWithoutDay'),strtotime($last_login_date)).'</span>';
} }
else{ else{
@ -152,7 +154,7 @@ class Tracking {
$currentTimestamp=mktime(); $currentTimestamp=mktime();
//If the last connection is > than 7 days, the text is red //If the last connection is > than 7 days, the text is red
//345600 = 7 days in seconds //345600 = 7 days in seconds
if($currentTimestamp-$timestamp>345600){ if($currentTimestamp-$timestamp>604800){
return '<span style="color: #F00;">'.format_locale_date(get_lang('DateFormatLongWithoutDay'),strtotime($last_login_date)).'</span>'; return '<span style="color: #F00;">'.format_locale_date(get_lang('DateFormatLongWithoutDay'),strtotime($last_login_date)).'</span>';
} }
else{ else{

Loading…
Cancel
Save