1
0
mirror of https://github.com/flarum/core.git synced 2025-07-25 10:41:24 +02:00

Rename user methods

This commit is contained in:
Toby Zerner
2018-08-24 21:59:47 +09:30
parent eb3232dfc9
commit 5142c639c1
2 changed files with 4 additions and 4 deletions

View File

@@ -743,7 +743,7 @@ class User extends AbstractModel
* *
* @return $this * @return $this
*/ */
public function refreshCommentsCount() public function refreshCommentCount()
{ {
$this->comment_count = $this->posts()->count(); $this->comment_count = $this->posts()->count();
@@ -755,7 +755,7 @@ class User extends AbstractModel
* *
* @return $this * @return $this
*/ */
public function refreshDiscussionsCount() public function refreshDiscussionCount()
{ {
$this->discussion_count = $this->discussions()->count(); $this->discussion_count = $this->discussions()->count();

View File

@@ -69,7 +69,7 @@ class UserMetadataUpdater
$user = $post->user; $user = $post->user;
if ($user && $user->exists) { if ($user && $user->exists) {
$user->refreshCommentsCount()->save(); $user->refreshCommentCount()->save();
} }
} }
@@ -78,7 +78,7 @@ class UserMetadataUpdater
$user = $discussion->user; $user = $discussion->user;
if ($user && $user->exists) { if ($user && $user->exists) {
$user->refreshDiscussionsCount()->save(); $user->refreshDiscussionCount()->save();
} }
} }
} }