mirror of
https://github.com/rr-/szurubooru.git
synced 2025-07-17 08:26:24 +00:00
Fixed post deletion
When post was deleted foreign keys in corresponding comments weren't NULLified.
This commit is contained in:
@ -3,7 +3,11 @@ class Model_Comment_QueryBuilder implements AbstractQueryBuilder
|
||||
{
|
||||
public static function build($dbQuery, $query)
|
||||
{
|
||||
$dbQuery->from('comment');
|
||||
$dbQuery->orderBy('id')->desc();
|
||||
$dbQuery
|
||||
->from('comment')
|
||||
->where('post_id')
|
||||
->is()->not('NULL')
|
||||
->orderBy('id')
|
||||
->desc();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user