mirror of
https://github.com/flarum/core.git
synced 2025-10-12 23:44:27 +02:00
Rename discussion.participantsCount
This commit is contained in:
@@ -242,11 +242,11 @@ class Discussion extends AbstractModel
|
||||
}
|
||||
|
||||
/**
|
||||
* Refresh the discussion's participants count.
|
||||
* Refresh the discussion's participant count.
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function refreshParticipantsCount()
|
||||
public function refreshParticipantCount()
|
||||
{
|
||||
$this->participant_count = $this->participants()->count('users.id');
|
||||
|
||||
|
@@ -41,7 +41,7 @@ class DiscussionMetadataUpdater
|
||||
if ($discussion && $discussion->exists) {
|
||||
$discussion->refreshCommentCount();
|
||||
$discussion->refreshLastPost();
|
||||
$discussion->refreshParticipantsCount();
|
||||
$discussion->refreshParticipantCount();
|
||||
$discussion->save();
|
||||
}
|
||||
}
|
||||
@@ -77,7 +77,7 @@ class DiscussionMetadataUpdater
|
||||
|
||||
if ($discussion && $discussion->exists) {
|
||||
$discussion->refreshCommentCount();
|
||||
$discussion->refreshParticipantsCount();
|
||||
$discussion->refreshParticipantCount();
|
||||
$discussion->refreshLastPost();
|
||||
$discussion->save();
|
||||
}
|
||||
@@ -92,7 +92,7 @@ class DiscussionMetadataUpdater
|
||||
|
||||
if ($discussion && $discussion->exists) {
|
||||
$discussion->refreshCommentCount();
|
||||
$discussion->refreshParticipantsCount();
|
||||
$discussion->refreshParticipantCount();
|
||||
|
||||
if ($discussion->last_post_id == $post->id) {
|
||||
$discussion->refreshLastPost();
|
||||
|
Reference in New Issue
Block a user