diff --git a/src/Admin/Actions/IndexAction.php b/src/Admin/Actions/IndexAction.php index 15fea7ab8..1c41c347d 100644 --- a/src/Admin/Actions/IndexAction.php +++ b/src/Admin/Actions/IndexAction.php @@ -4,9 +4,8 @@ use Dflydev\FigCookies\FigRequestCookies; use Flarum\Api\Client; use Flarum\Support\Actor; use Flarum\Support\HtmlAction; -use Session; -use Config; use Psr\Http\Message\ServerRequestInterface as Request; +use Flarum\Core; class IndexAction extends HtmlAction { @@ -25,7 +24,6 @@ class IndexAction extends HtmlAction $config = app('db')->table('config')->whereIn('key', ['base_url', 'api_url', 'forum_title', 'welcome_title', 'welcome_message'])->lists('value', 'key'); $data = []; $session = []; - $alert = Session::get('alert'); if (($user = $this->actor->getUser()) && $user->exists) { $session = [ @@ -42,12 +40,11 @@ class IndexAction extends HtmlAction } $view = view('flarum.admin::index') - ->with('title', 'Administration - '.Config::get('flarum::forum_title', 'Flarum Demo Forum')) + ->with('title', 'Administration - '.Core::config('forum_title')) ->with('config', $config) ->with('layout', 'flarum.admin::admin') ->with('data', $data) - ->with('session', $session) - ->with('alert', $alert); + ->with('session', $session); $assetManager = app('flarum.admin.assetManager'); $root = __DIR__.'/../../..'; diff --git a/src/Admin/AdminServiceProvider.php b/src/Admin/AdminServiceProvider.php index 580792149..9e4e5af21 100644 --- a/src/Admin/AdminServiceProvider.php +++ b/src/Admin/AdminServiceProvider.php @@ -2,7 +2,6 @@ use Flarum\Http\RouteCollection; use Flarum\Http\UrlGenerator; -use Flarum\Support\AssetManager; use Illuminate\Support\ServiceProvider; use Psr\Http\Message\ServerRequestInterface; @@ -15,10 +14,6 @@ class AdminServiceProvider extends ServiceProvider */ public function register() { - $this->app->singleton('flarum.admin.assetManager', function () { - return new AssetManager($this->app->make('files'), public_path('assets'), 'admin'); - }); - $this->app->singleton( 'Flarum\Http\UrlGeneratorInterface', function () { diff --git a/src/Forum/ForumServiceProvider.php b/src/Forum/ForumServiceProvider.php index 2befecdc6..702444cb7 100644 --- a/src/Forum/ForumServiceProvider.php +++ b/src/Forum/ForumServiceProvider.php @@ -14,10 +14,6 @@ class ForumServiceProvider extends ServiceProvider */ public function register() { - $this->app->singleton('flarum.forum.assetManager', function ($app) { - return new AssetManager($app['files'], $app['path.public'].'/assets', 'forum'); - }); - $this->app->singleton( 'Flarum\Http\UrlGeneratorInterface', function () {