Support: Some fixes

:3
This commit is contained in:
Maxim Leshchenko 2022-01-07 02:07:36 +02:00
parent 02e41e19b4
commit 9feea4302a
No known key found for this signature in database
GPG key ID: BB9C44A8733FBEEE
2 changed files with 6 additions and 3 deletions

View file

@ -36,9 +36,12 @@ class Tickets
foreach($this->tickets->where(["user_id" => $userId, "deleted" => 0])->order("created DESC")->page($page, OPENVK_DEFAULT_PER_PAGE) as $ticket) yield new Ticket($ticket);
}
function getTicketsCountByUserId(int $userId, int $type = 0): int
function getTicketsCountByUserId(int $userId, int $type = NULL): int
{
return sizeof($this->tickets->where(["user_id" => $userId, "deleted" => 0, "type" => $type]));
if(is_null($type))
return sizeof($this->tickets->where(["user_id" => $userId, "deleted" => 0]));
else
return sizeof($this->tickets->where(["user_id" => $userId, "deleted" => 0, "type" => $type]));
}
function getRequestById(int $requestId): ?Ticket

View file

@ -20,7 +20,7 @@
</div>
<br />
<div>
<form action="/al_comment/create/support/reply/{$id}" method="post" style="margin: 0;">
<form action="/al_comments/create/support/reply/{$id}" method="post" style="margin: 0;">
<textarea name="text" id="answer_text" style="width: 100%; resize: vertical;"></textarea>
<br />
<input type="hidden" name="hash" value="{$csrfToken}" />