-
= Yii::t('add', 'add_answer') ?>
+
= Yii::t('app', 'add_answer') ?>
[ 'class' => 'resformsfile MultiFile-intercepted', 'enctype' => 'multipart/form-data' ] ]);
diff --git a/frontend/controllers/TenderController.php b/frontend/controllers/TenderController.php
index 8b4d64f..c3dbfa8 100755
--- a/frontend/controllers/TenderController.php
+++ b/frontend/controllers/TenderController.php
@@ -26,6 +26,7 @@
use common\models\Page;
use frontend\models\Option;
use common\models\Social;
+ use yii\web\NotFoundHttpException;
/**
* Site controller
@@ -87,6 +88,8 @@
$model = Project::findOne($tender_id);
if(!empty($model)) {
$model->updateCounters(['view_count' => 1]);
+ } else {
+ throw new NotFoundHttpException(Yii::t('app', 'project_not_found'));
}
return $this->render('view', [
diff --git a/frontend/messages/ru/app.php b/frontend/messages/ru/app.php
index c6f65bc..5d673c6 100644
--- a/frontend/messages/ru/app.php
+++ b/frontend/messages/ru/app.php
@@ -157,5 +157,6 @@
'add_field' => 'Добавить поле',
'add_more' => 'Добавить еще',
'hidden_project' => 'Снять с тендера',
+ 'project_not_found' => 'Данный проект не найден',
];
\ No newline at end of file
diff --git a/frontend/views/site/index.php b/frontend/views/site/index.php
index 0c935d9..2953c56 100755
--- a/frontend/views/site/index.php
+++ b/frontend/views/site/index.php
@@ -1,10 +1,6 @@