-
-
Notifications
You must be signed in to change notification settings - Fork 211
Closed
Labels
type: bugA problem that should not be happeningA problem that should not be happening
Milestone
Description
Bug Description
I have imported this field according this
$target['user_lastvisit'] = $source['user_lastvisit'];
and it is not displayed correctly (but it is correct in database)
I think that this:
function sc_user_lastvisit($parm='')
{
return $this->var['user_currentvisit'] ? e107::getDate()->convert_date($this->var['user_currentvisit'], "long") : "<i>".LAN_USER_33."</i>";
}
function sc_user_lastvisit_lapse($parm='')
{
return $this->var['user_currentvisit'] ? e107::getDate()->computeLapse($this->var['user_currentvisit']) : '';
}
Should be at least:
function sc_user_lastvisit($parm='')
{
return $this->var['user_currentvisit'] ? e107::getDate()->convert_date($this->var['user_currentvisit'], "long") : e107::getDate()->convert_date($this->var['user_lastvisit'], "long");
}
function sc_user_lastvisit_lapse($parm='')
{
return $this->var['user_currentvisit'] ? e107::getDate()->computeLapse($this->var['user_currentvisit']) : e107::getDate()->computeLapse($this->var['user_lastvisit']);
}
Not sure when user_currentvisit is filled. I suppose it is mean that the user is online? if yes, then a message "online" would be better.
The problem with the solution above is that if that field is not filled it shows the time 1.1.1970 (in according format)
I would suppose that convert_date() or computeLapse() returns nothing if there is no date sent.
value of $this->var['user_lastvisit'] is string(1) "0"
Thanks
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
type: bugA problem that should not be happeningA problem that should not be happening