Ticket deletion fixed (#727)

* Ticket deletion fixed

* ?act=list
This commit is contained in:
n1rwana 2022-09-14 13:27:48 +03:00 committed by GitHub
parent 384c0da78b
commit 2cdcb0dc4e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -155,11 +155,12 @@ final class SupportPresenter extends OpenVKPresenter
$this->notFound(); $this->notFound();
} else { } else {
if($ticket->getUserId() !== $this->user->id && $this->hasPermission('openvk\Web\Models\Entities\TicketReply', 'write', 0)) if($ticket->getUserId() !== $this->user->id && $this->hasPermission('openvk\Web\Models\Entities\TicketReply', 'write', 0))
$this->redirect("/support/tickets"); $_redirect = "/support/tickets";
else else
$this->redirect("/support"); $_redirect = "/support?act=list";
$ticket->delete(); $ticket->delete();
$this->redirect($_redirect);
} }
} }
} }