mirror of
https://github.com/flarum/core.git
synced 2025-08-21 23:56:33 +02:00
Database changes (#18)
* Update core references * Update core attribute names
This commit is contained in:
committed by
Franz Liedke
parent
63ff4b7fc7
commit
3e09c2bf33
@@ -32,7 +32,7 @@ class SubscriptionGambit extends AbstractRegexGambit
|
||||
$method = $negate ? 'whereNotExists' : 'whereExists';
|
||||
$search->getQuery()->$method(function ($query) use ($actor, $matches) {
|
||||
$query->selectRaw('1')
|
||||
->from('users_discussions')
|
||||
->from('discussion_user')
|
||||
->whereColumn('discussions.id', 'discussion_id')
|
||||
->where('user_id', $actor->id)
|
||||
->where('subscription', $matches[1] === 'follow' ? 'follow' : 'ignore');
|
||||
|
@@ -45,7 +45,7 @@ class FilterDiscussionListBySubscription
|
||||
$actor = $event->search->getActor();
|
||||
$event->search->getQuery()->whereNotExists(function ($query) use ($actor) {
|
||||
$query->selectRaw(1)
|
||||
->from('users_discussions')
|
||||
->from('discussion_user')
|
||||
->whereColumn('discussions.id', 'discussion_id')
|
||||
->where('user_id', $actor->id)
|
||||
->where('subscription', 'ignore');
|
||||
|
@@ -68,8 +68,8 @@ class SendNotificationWhenReplyIsPosted
|
||||
|
||||
$notify = $discussion->readers()
|
||||
->where('users.id', '!=', $post->user_id)
|
||||
->where('users_discussions.subscription', 'follow')
|
||||
->where('users_discussions.read_number', $discussion->last_post_number - 1)
|
||||
->where('discussion_user.subscription', 'follow')
|
||||
->where('discussion_user.last_read_post_number', $discussion->last_post_number - 1)
|
||||
->get();
|
||||
|
||||
$this->notifications->sync(
|
||||
|
@@ -42,7 +42,7 @@ class NewPostBlueprint implements BlueprintInterface, MailableInterface
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getSender()
|
||||
public function getFromUser()
|
||||
{
|
||||
return $this->post->user;
|
||||
}
|
||||
|
Reference in New Issue
Block a user