mirror of
https://github.com/flarum/core.git
synced 2025-08-04 23:47:32 +02:00
Ensure compatibility with DB table prefix
This commit is contained in:
@@ -63,7 +63,7 @@ class PostPolicy extends AbstractPolicy
|
|||||||
return function ($query) use ($actor) {
|
return function ($query) use ($actor) {
|
||||||
$query->selectRaw('1')
|
$query->selectRaw('1')
|
||||||
->from('discussions')
|
->from('discussions')
|
||||||
->whereRaw('discussions.id = posts.discussion_id')
|
->whereColumn('discussions.id', 'posts.discussion_id')
|
||||||
->where($this->canApprovePosts($actor));
|
->where($this->canApprovePosts($actor));
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user