diff --git a/Web/Presenters/BugtrackerPresenter.php b/Web/Presenters/BugtrackerPresenter.php
index d8eb86e4..e842e636 100644
--- a/Web/Presenters/BugtrackerPresenter.php
+++ b/Web/Presenters/BugtrackerPresenter.php
@@ -109,8 +109,10 @@ final class BugtrackerPresenter extends OpenVKPresenter
$report = (new BugtrackerReports)->get($report_id);
$report->setStatus($status);
- if ($points)
+ if ($points >= 0)
DB::i()->getContext()->query("UPDATE `profiles` SET `coins` = `coins` + " . $points . " WHERE `id` = " . $report->getReporter()->getId());
+ else
+ $this->flashFail("err", tr("error"), "Число голосов должно быть больше или равно 0.");
$report->save();
@@ -142,8 +144,10 @@ final class BugtrackerPresenter extends OpenVKPresenter
$report = (new BugtrackerReports)->get($report_id);
$report->setPriority($priority);
- if ($points)
+ if ($points >= 0)
DB::i()->getContext()->query("UPDATE `profiles` SET `coins` = `coins` + " . $points . " WHERE `id` = " . $report->getReporter()->getId());
+ else
+ $this->flashFail("err", tr("error"), "Число голосов должно быть больше или равно 0.");
$report->save();
diff --git a/Web/static/js/openvk.cls.js b/Web/static/js/openvk.cls.js
index 8d3b3b42..8095c1bc 100755
--- a/Web/static/js/openvk.cls.js
+++ b/Web/static/js/openvk.cls.js
@@ -490,13 +490,12 @@ function showBtStatusChangeDialog(report, currentBalance, hash) {