Fixed a bug so topics' last post is now refreshed.

This commit is contained in:
Polonkai Gergely 2012-07-15 15:30:08 +02:00
parent bb7aee6fee
commit 47177333f9
1 changed files with 2 additions and 0 deletions

View File

@ -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;
}