lastVisit to currentVisit for Online and User
This commit is contained in:
parent
8131e14e56
commit
6af755988e
3 changed files with 5 additions and 5 deletions
|
@ -11,7 +11,7 @@ class Model extends ParentModel
|
|||
protected $visits = [];
|
||||
protected $online = [];
|
||||
|
||||
public function lastVisit(User $user): ?int
|
||||
public function currentVisit(User $user): ?int
|
||||
{
|
||||
return $this->visits[$user->id] ?? null;
|
||||
}
|
||||
|
|
|
@ -224,7 +224,7 @@ class View extends Profile
|
|||
$fields['lastvisit'] = [
|
||||
'class' => 'pline',
|
||||
'type' => 'str',
|
||||
'value' => \ForkBB\dt($this->curUser->lastVisit, true),
|
||||
'value' => \ForkBB\dt($this->curUser->currentVisit, true),
|
||||
'caption' => \ForkBB\__('Last visit info'),
|
||||
];
|
||||
}
|
||||
|
|
|
@ -29,7 +29,7 @@ class Model extends DataModel
|
|||
$this->zDepend = [
|
||||
'group_id' => ['isUnverified', 'isGuest', 'isAdmin', 'isAdmMod', 'link', 'viewUsers', 'showPostCount', 'searchUsers'],
|
||||
'id' => ['isGuest', 'link', 'avatar', 'online'],
|
||||
'last_visit' => ['lastVisit'],
|
||||
'last_visit' => ['currentVisit'],
|
||||
'logged' => ['isLogged'],
|
||||
'show_sig' => ['showSignature'],
|
||||
'show_avatars' => ['showAvatar'],
|
||||
|
@ -135,9 +135,9 @@ class Model extends DataModel
|
|||
*
|
||||
* @return int
|
||||
*/
|
||||
protected function getlastVisit(): int
|
||||
protected function getcurrentVisit(): int
|
||||
{
|
||||
return $this->c->Online->lastVisit($this) ?? $this->last_visit;
|
||||
return $this->c->Online->currentVisit($this) ?? $this->last_visit;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Reference in a new issue