diff --git a/Web/Presenters/SupportPresenter.php b/Web/Presenters/SupportPresenter.php index 7298e3ac..94467b09 100644 --- a/Web/Presenters/SupportPresenter.php +++ b/Web/Presenters/SupportPresenter.php @@ -232,20 +232,24 @@ final class SupportPresenter extends OpenVKPresenter $this->assertUserLoggedIn(); $comment = $this->comments->get($id); - if ($this->user->id === $this->tickets->get($comment->getTicketId())->getUser()->getId()) { - if ($mark === 1 || $mark === 2) {} + if($this->user->id === $this->tickets->get($comment->getTicketId())->getUser()->getId()) { + if($mark === 1 || $mark === 2) {} $comments->setMark($mark); $comments->save(); - if ($mark === 1) { - $this->flashFail("succ", tr("information_-1"), tr("support_rated_good")); - } elseif ($mark === 2) { - $this->flashFail("succ", tr("information_-1"), tr("support_rated_bad")); + if($mark === 1) { + // $this->flashFail("succ", tr("information_-1"), tr("support_rated_good")); + exit(header("HTTP/1.1 200 OK")); + } elseif($mark === 2) { + // $this->flashFail("succ", tr("information_-1"), tr("support_rated_bad")); + exit(header("HTTP/1.1 200 OK")); } } else { - $this->flashFail("err", tr("error"), tr("wrong_parameters")); + // $this->flashFail("err", tr("error"), tr("wrong_parameters")); + exit(header("HTTP/1.1 400 Bad Request")); } } else { - $this->flashFail("err", tr("error"), tr("forbidden")); + // $this->flashFail("err", tr("error"), tr("forbidden")); + exit(header("HTTP/1.1 403 Forbidden")); } } } diff --git a/Web/Presenters/templates/Support/AnswerTicket.xml b/Web/Presenters/templates/Support/AnswerTicket.xml index 2a9928e0..5938d8a5 100644 --- a/Web/Presenters/templates/Support/AnswerTicket.xml +++ b/Web/Presenters/templates/Support/AnswerTicket.xml @@ -110,15 +110,13 @@ {/if} - {if $comment->getUType() === 1} + {if $comment->getUType() === 1 && $comment->getMark() != null}}
diff --git a/Web/Presenters/templates/Support/View.xml b/Web/Presenters/templates/Support/View.xml index f457b949..46679f37 100644 --- a/Web/Presenters/templates/Support/View.xml +++ b/Web/Presenters/templates/Support/View.xml @@ -6,14 +6,26 @@ {/block} {block content} + {if $ticket->isDeleted() == 0 } @@ -107,20 +119,20 @@ {/if} - {if $comment->getUType() === 1} + {if $comment->getUType() === 1 && $comment->getMark() != null}} {/if}