Minor fixes

This commit is contained in:
Frederic Guillot
2016-05-28 20:26:23 -04:00
parent 729c933d00
commit 9370797095
12 changed files with 18 additions and 16 deletions

View File

@@ -3,7 +3,6 @@
namespace Kanboard\Model;
use Kanboard\Event\CommentEvent;
use Kanboard\Core\Base;
/**
@@ -114,7 +113,7 @@ class CommentModel extends Base
$values['date_creation'] = time();
$comment_id = $this->db->table(self::TABLE)->persist($values);
if ($comment_id) {
if ($comment_id !== false) {
$event = new CommentEvent(array('id' => $comment_id) + $values);
$this->dispatcher->dispatch(self::EVENT_CREATE, $event);
$this->userMentionModel->fireEvents($values['comment'], self::EVENT_USER_MENTION, $event);