1
0
mirror of https://github.com/flarum/core.git synced 2025-02-25 11:43:19 +01:00

Clean up some old code

This commit is contained in:
Toby Zerner 2015-06-18 17:43:16 +09:30
parent 32beab9238
commit 555bb18acd
3 changed files with 3 additions and 15 deletions

View File

@ -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__.'/../../..';

View File

@ -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 () {

View File

@ -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 () {