mirror of
https://github.com/flarum/framework.git
synced 2025-03-04 17:43:10 +08:00
Ensure we don't preload index data on non-index pages
This commit is contained in:
parent
80445f1d70
commit
3533dfffc1
@ -18,7 +18,7 @@ class RegisterForumRoutes
|
|||||||
$this->routes = $routes;
|
$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);
|
$this->route('get', $url, $name, $action);
|
||||||
}
|
}
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
use Flarum\Support\ClientAction as BaseClientAction;
|
use Flarum\Support\ClientAction as BaseClientAction;
|
||||||
|
|
||||||
abstract class ClientAction extends BaseClientAction
|
class ClientAction extends BaseClientAction
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
|
@ -67,19 +67,19 @@ class ForumServiceProvider extends ServiceProvider
|
|||||||
$routes->get(
|
$routes->get(
|
||||||
'/u/{username}[/{filter}]',
|
'/u/{username}[/{filter}]',
|
||||||
'flarum.forum.user',
|
'flarum.forum.user',
|
||||||
$this->action('Flarum\Forum\Actions\IndexAction')
|
$this->action('Flarum\Forum\Actions\ClientAction')
|
||||||
);
|
);
|
||||||
|
|
||||||
$routes->get(
|
$routes->get(
|
||||||
'/settings',
|
'/settings',
|
||||||
'flarum.forum.settings',
|
'flarum.forum.settings',
|
||||||
$this->action('Flarum\Forum\Actions\IndexAction')
|
$this->action('Flarum\Forum\Actions\ClientAction')
|
||||||
);
|
);
|
||||||
|
|
||||||
$routes->get(
|
$routes->get(
|
||||||
'/notifications',
|
'/notifications',
|
||||||
'flarum.forum.notifications',
|
'flarum.forum.notifications',
|
||||||
$this->action('Flarum\Forum\Actions\IndexAction')
|
$this->action('Flarum\Forum\Actions\ClientAction')
|
||||||
);
|
);
|
||||||
|
|
||||||
$routes->get(
|
$routes->get(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user