mirror of
https://github.com/openvk/openvk
synced 2025-01-10 18:10:03 +03:00
Support: Check ticket for existence before showing
This commit is contained in:
parent
bdf97e4286
commit
763c0c91e2
1 changed files with 4 additions and 0 deletions
|
@ -169,6 +169,10 @@ final class SupportPresenter extends OpenVKPresenter
|
||||||
{
|
{
|
||||||
$this->assertPermission('openvk\Web\Models\Entities\TicketReply', 'write', 0);
|
$this->assertPermission('openvk\Web\Models\Entities\TicketReply', 'write', 0);
|
||||||
$ticket = $this->tickets->get($id);
|
$ticket = $this->tickets->get($id);
|
||||||
|
|
||||||
|
if(!$ticket || $ticket->isDeleted() != 0)
|
||||||
|
$this->notFound();
|
||||||
|
|
||||||
$ticketComments = $this->comments->getCommentsById($id);
|
$ticketComments = $this->comments->getCommentsById($id);
|
||||||
$this->template->ticket = $ticket;
|
$this->template->ticket = $ticket;
|
||||||
$this->template->comments = $ticketComments;
|
$this->template->comments = $ticketComments;
|
||||||
|
|
Loading…
Reference in a new issue