Fix bug that corrupted DB after post deletion

This commit is contained in:
Jill Stingray 2020-06-23 20:06:15 +00:00
parent 48a2040322
commit 11b4f0b16a

View file

@ -305,7 +305,7 @@ final class WallPresenter extends OpenVKPresenter
if(!is_null($user)) {
if($post->getOwnerPost() == $user || $post->getTargetWall() == $user || $canBeDeletedByOtherUser) {
$post->unwire();
$post->delete(false);
$post->delete();
}
} else {
$this->flashFail("err", "Не удалось удалить пост", "Вы не вошли в аккаунт.");