mirror of
https://github.com/flarum/core.git
synced 2025-07-16 14:26:25 +02:00
Fix column names
This commit is contained in:
@@ -380,7 +380,7 @@ class Discussion extends AbstractModel
|
|||||||
*/
|
*/
|
||||||
public function lastUser()
|
public function lastUser()
|
||||||
{
|
{
|
||||||
return $this->belongsTo(User::class, 'last_user_id');
|
return $this->belongsTo(User::class, 'last_posted_user_id');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -34,7 +34,7 @@ class NotificationRepository
|
|||||||
->whereIn('type', $user->getAlertableNotificationTypes())
|
->whereIn('type', $user->getAlertableNotificationTypes())
|
||||||
->whereNull('deleted_at')
|
->whereNull('deleted_at')
|
||||||
->groupBy('type', 'subject_id')
|
->groupBy('type', 'subject_id')
|
||||||
->orderByRaw('MAX(time) DESC')
|
->orderByRaw('MAX(created_at) DESC')
|
||||||
->skip($offset)
|
->skip($offset)
|
||||||
->take($limit);
|
->take($limit);
|
||||||
|
|
||||||
|
@@ -136,8 +136,8 @@ class PostRepository
|
|||||||
$query = Discussion::find($discussionId)
|
$query = Discussion::find($discussionId)
|
||||||
->posts()
|
->posts()
|
||||||
->whereVisibleTo($actor)
|
->whereVisibleTo($actor)
|
||||||
->where('time', '<', function ($query) use ($discussionId, $number) {
|
->where('created_at', '<', function ($query) use ($discussionId, $number) {
|
||||||
$query->select('time')
|
$query->select('created_at')
|
||||||
->from('posts')
|
->from('posts')
|
||||||
->where('discussion_id', $discussionId)
|
->where('discussion_id', $discussionId)
|
||||||
->whereNotNull('number')
|
->whereNotNull('number')
|
||||||
|
Reference in New Issue
Block a user