diff options
Diffstat (limited to 'app/Controller/Comment.php')
-rw-r--r-- | app/Controller/Comment.php | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/app/Controller/Comment.php b/app/Controller/Comment.php index 90d9d6df..d6cbbf1e 100644 --- a/app/Controller/Comment.php +++ b/app/Controller/Comment.php @@ -81,11 +81,9 @@ class Comment extends Base list($valid, $errors) = $this->comment->validateCreation($values); if ($valid) { - if ($this->comment->create($values)) { $this->session->flash(t('Comment added successfully.')); - } - else { + } else { $this->session->flashError(t('Unable to create your comment.')); } @@ -132,11 +130,9 @@ class Comment extends Base list($valid, $errors) = $this->comment->validateModification($values); if ($valid) { - if ($this->comment->update($values)) { $this->session->flash(t('Comment updated successfully.')); - } - else { + } else { $this->session->flashError(t('Unable to update your comment.')); } @@ -176,8 +172,7 @@ class Comment extends Base if ($this->comment->remove($comment['id'])) { $this->session->flash(t('Comment removed successfully.')); - } - else { + } else { $this->session->flashError(t('Unable to remove this comment.')); } |