X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/3b31ac75ec41b3990cea770a9e48e2066bd8e9a3..refs/pull/5280/head:/app/Activity/Models/View.php diff --git a/app/Activity/Models/View.php b/app/Activity/Models/View.php index a6bc2139e..30ead1193 100644 --- a/app/Activity/Models/View.php +++ b/app/Activity/Models/View.php @@ -41,7 +41,7 @@ class View extends Model public static function incrementFor(Viewable $viewable): int { $user = user(); - if (is_null($user) || $user->isDefault()) { + if ($user->isGuest()) { return 0; } @@ -54,12 +54,4 @@ class View extends Model return $view->views; } - - /** - * Clear all views from the system. - */ - public static function clearAll() - { - static::query()->truncate(); - } }