Commit 71ad29c4d2449bae325689a8f727488c90e96f3e
1 parent
c4b9c0bd
test
Showing
4 changed files
with
5 additions
and
5 deletions
Show diff stats
common/modules/comment/widgets/views/form-project-comment.php
... | ... | @@ -14,7 +14,7 @@ |
14 | 14 | <div class="new-portf-add-comm style"> |
15 | 15 | <div class="box-wr"> |
16 | 16 | <div class="box-all"> |
17 | - <div class="tender-add-answer-title"><?= Yii::t('add', 'add_answer') ?></div> | |
17 | + <div class="tender-add-answer-title"><?= Yii::t('app', 'add_answer') ?></div> | |
18 | 18 | <div class="form-tender-answer style"> |
19 | 19 | <?php |
20 | 20 | $form = ActiveForm::begin([ 'options' => [ 'class' => 'resformsfile MultiFile-intercepted', 'enctype' => 'multipart/form-data' ] ]); | ... | ... |
frontend/controllers/TenderController.php
... | ... | @@ -26,6 +26,7 @@ |
26 | 26 | use common\models\Page; |
27 | 27 | use frontend\models\Option; |
28 | 28 | use common\models\Social; |
29 | + use yii\web\NotFoundHttpException; | |
29 | 30 | |
30 | 31 | /** |
31 | 32 | * Site controller |
... | ... | @@ -87,6 +88,8 @@ |
87 | 88 | $model = Project::findOne($tender_id); |
88 | 89 | if(!empty($model)) { |
89 | 90 | $model->updateCounters(['view_count' => 1]); |
91 | + } else { | |
92 | + throw new NotFoundHttpException(Yii::t('app', 'project_not_found')); | |
90 | 93 | } |
91 | 94 | |
92 | 95 | return $this->render('view', [ | ... | ... |
frontend/messages/ru/app.php
frontend/views/site/index.php