diff --git a/Web/Models/Repositories/Tickets.php b/Web/Models/Repositories/Tickets.php index 62ae4286..7f00e62b 100644 --- a/Web/Models/Repositories/Tickets.php +++ b/Web/Models/Repositories/Tickets.php @@ -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 diff --git a/Web/Presenters/templates/Support/AnswerTicket.xml b/Web/Presenters/templates/Support/AnswerTicket.xml index 7c4091be..c8fea4d7 100644 --- a/Web/Presenters/templates/Support/AnswerTicket.xml +++ b/Web/Presenters/templates/Support/AnswerTicket.xml @@ -20,7 +20,7 @@
-
+