diff --git a/common/modules/comment/Controller.php b/common/modules/comment/Controller.php index 1d7e87b..de9b8b5 100755 --- a/common/modules/comment/Controller.php +++ b/common/modules/comment/Controller.php @@ -65,7 +65,7 @@ if($model->rating->save()) { return [ 'result' => [ - 'text' => 'Comment successfully updated', + 'text' => 'Мнение успешно отредактировано', 'html' => $this->renderAjax('@common/modules/comment/widgets/views/_review_comment_view', [ 'model' => $model ]), ], ]; diff --git a/common/modules/comment/models/Comment.php b/common/modules/comment/models/Comment.php index 52d0a4c..985e919 100755 --- a/common/modules/comment/models/Comment.php +++ b/common/modules/comment/models/Comment.php @@ -209,7 +209,7 @@ $this->addError('comment_id', 'Comment ID not found'); return false; } else { - if($this->update()) { + if($this->update() !== false) { // $this->clearSafe(); Clears safe attributes after AJAX update return true; } else { diff --git a/common/modules/comment/widgets/views/_review_comment_view.php b/common/modules/comment/widgets/views/_review_comment_view.php index 2bfaea3..361ed69 100755 --- a/common/modules/comment/widgets/views/_review_comment_view.php +++ b/common/modules/comment/widgets/views/_review_comment_view.php @@ -15,7 +15,7 @@ * @var User $user */ $user = $model->user; - $model->buildButtons([ 'delete' ]); + $model->buildButtons([ 'delete', 'update' ]); ?>