From 6d57f902b3d756d165d6ec1413cdff4a8fc465ac Mon Sep 17 00:00:00 2001 From: Toby Zerner Date: Thu, 23 Jul 2015 14:33:31 +0930 Subject: [PATCH] Ensure we don't preload index data on non-index pages --- src/Events/RegisterForumRoutes.php | 2 +- src/Forum/Actions/ClientAction.php | 2 +- src/Forum/ForumServiceProvider.php | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Events/RegisterForumRoutes.php b/src/Events/RegisterForumRoutes.php index 0e7598644..d10331bc3 100644 --- a/src/Events/RegisterForumRoutes.php +++ b/src/Events/RegisterForumRoutes.php @@ -18,7 +18,7 @@ class RegisterForumRoutes $this->routes = $routes; } - public function get($url, $name, $action = 'Flarum\Forum\Actions\IndexAction') + public function get($url, $name, $action = 'Flarum\Forum\Actions\ClientAction') { $this->route('get', $url, $name, $action); } diff --git a/src/Forum/Actions/ClientAction.php b/src/Forum/Actions/ClientAction.php index b4390fce0..0091c4b9d 100644 --- a/src/Forum/Actions/ClientAction.php +++ b/src/Forum/Actions/ClientAction.php @@ -2,7 +2,7 @@ use Flarum\Support\ClientAction as BaseClientAction; -abstract class ClientAction extends BaseClientAction +class ClientAction extends BaseClientAction { /** * {@inheritdoc} diff --git a/src/Forum/ForumServiceProvider.php b/src/Forum/ForumServiceProvider.php index 9f8cc6a47..5e4de9466 100644 --- a/src/Forum/ForumServiceProvider.php +++ b/src/Forum/ForumServiceProvider.php @@ -67,19 +67,19 @@ class ForumServiceProvider extends ServiceProvider $routes->get( '/u/{username}[/{filter}]', 'flarum.forum.user', - $this->action('Flarum\Forum\Actions\IndexAction') + $this->action('Flarum\Forum\Actions\ClientAction') ); $routes->get( '/settings', 'flarum.forum.settings', - $this->action('Flarum\Forum\Actions\IndexAction') + $this->action('Flarum\Forum\Actions\ClientAction') ); $routes->get( '/notifications', 'flarum.forum.notifications', - $this->action('Flarum\Forum\Actions\IndexAction') + $this->action('Flarum\Forum\Actions\ClientAction') ); $routes->get(