diff --git a/src/KekRozsak/FrontBundle/Entity/ForumPost.php b/src/KekRozsak/FrontBundle/Entity/ForumPost.php index 31c13b1..6618a9f 100644 --- a/src/KekRozsak/FrontBundle/Entity/ForumPost.php +++ b/src/KekRozsak/FrontBundle/Entity/ForumPost.php @@ -128,6 +128,8 @@ class ForumPost public function setTopic(ForumTopic $topic) { $this->topic = $topic; + if ($topic->getLastPost()->getCreatedAt() < $this->createdAt) + $topic->setLastPost($this); return $this; }