Skip to content

Commit

Permalink
Fix incorrect column name
Browse files Browse the repository at this point in the history
  • Loading branch information
tobyzerner committed Jan 19, 2015
1 parent 577d513 commit 49be841
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Flarum/Core/Listeners/DiscussionMetadataUpdater.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public function whenReplyWasPosted(ReplyWasPosted $event)
{
$discussion = $this->discussionRepo->find($event->post->discussion_id);

$discussion->replies_count++;
$discussion->comments_count++;
$discussion->setLastPost($event->post);

$this->discussionRepo->save($discussion);
Expand All @@ -42,7 +42,7 @@ public function whenPostWasRestored(PostWasRestored $event)
{
$discussion = $this->discussionRepo->find($event->post->discussion_id);

$discussion->replies_count++;
$discussion->comments_count++;
$discussion->refreshLastPost();

$this->discussionRepo->save($discussion);
Expand All @@ -52,7 +52,7 @@ protected function removePost(Post $post)
{
$discussion = $this->discussionRepo->find($post->discussion_id);

$discussion->replies_count--;
$discussion->comments_count--;

if ($discussion->last_post_id == $post->id) {
$discussion->refreshLastPost();
Expand Down

0 comments on commit 49be841

Please sign in to comment.