mirror of
https://github.com/flarum/framework.git
synced 2025-01-21 20:14:00 +08:00
Rename user methods
This commit is contained in:
parent
d51a779241
commit
5778edb5ef
|
@ -743,7 +743,7 @@ class User extends AbstractModel
|
|||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function refreshCommentsCount()
|
||||
public function refreshCommentCount()
|
||||
{
|
||||
$this->comment_count = $this->posts()->count();
|
||||
|
||||
|
@ -755,7 +755,7 @@ class User extends AbstractModel
|
|||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function refreshDiscussionsCount()
|
||||
public function refreshDiscussionCount()
|
||||
{
|
||||
$this->discussion_count = $this->discussions()->count();
|
||||
|
||||
|
|
|
@ -69,7 +69,7 @@ class UserMetadataUpdater
|
|||
$user = $post->user;
|
||||
|
||||
if ($user && $user->exists) {
|
||||
$user->refreshCommentsCount()->save();
|
||||
$user->refreshCommentCount()->save();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -78,7 +78,7 @@ class UserMetadataUpdater
|
|||
$user = $discussion->user;
|
||||
|
||||
if ($user && $user->exists) {
|
||||
$user->refreshDiscussionsCount()->save();
|
||||
$user->refreshDiscussionCount()->save();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user