1
0
mirror of https://github.com/flarum/core.git synced 2025-08-01 22:20:21 +02:00

Rename column for consistency

This commit is contained in:
Toby Zerner
2015-09-22 16:54:32 +09:30
parent efca923d30
commit 8937050aed
3 changed files with 37 additions and 3 deletions

View File

@@ -71,7 +71,7 @@ class User extends Model
'join_time',
'last_seen_time',
'read_time',
'notification_read_time'
'notifications_read_time'
];
/**
@@ -295,7 +295,7 @@ class User extends Model
*/
public function markNotificationsAsRead()
{
$this->notification_read_time = time();
$this->notifications_read_time = time();
return $this;
}
@@ -432,7 +432,7 @@ class User extends Model
{
return $this->notifications()
->whereIn('type', $this->getAlertableNotificationTypes())
->where('time', '>', $this->notification_read_time ?: 0)
->where('time', '>', $this->notifications_read_time ?: 0)
->where('is_read', 0)
->where('is_deleted', 0)
->count($this->getConnection()->raw('DISTINCT type, subject_id'));