From 71ad29c4d2449bae325689a8f727488c90e96f3e Mon Sep 17 00:00:00 2001 From: Yarik Date: Wed, 30 Mar 2016 17:22:21 +0300 Subject: [PATCH] test --- common/modules/comment/widgets/views/form-project-comment.php | 2 +- frontend/controllers/TenderController.php | 3 +++ frontend/messages/ru/app.php | 1 + frontend/views/site/index.php | 4 ---- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/common/modules/comment/widgets/views/form-project-comment.php b/common/modules/comment/widgets/views/form-project-comment.php index b343fd6..7cfe6cd 100644 --- a/common/modules/comment/widgets/views/form-project-comment.php +++ b/common/modules/comment/widgets/views/form-project-comment.php @@ -14,7 +14,7 @@
-
+
[ '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 @@