Fixed a bug so topics' last post is now refreshed.
This commit is contained in:
parent
bb7aee6fee
commit
47177333f9
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user