mirror of
https://github.com/flarum/framework.git
synced 2025-02-18 11:52:46 +08:00
fixes session during installation (#1418)
* fixes session during installation * Apply fixes from StyleCI [ci skip] [skip ci] * styling of commented code, removed unnecessary import
This commit is contained in:
parent
c4a501f82a
commit
b8632d693a
|
@ -119,22 +119,20 @@ class Application extends Container implements ApplicationContract
|
||||||
*
|
*
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public function isInstalled()
|
public function isInstalled(): bool
|
||||||
{
|
{
|
||||||
return $this->bound('flarum.config');
|
return $this->bound('flarum.config');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function isUpToDate()
|
public function isUpToDate(): bool
|
||||||
{
|
{
|
||||||
$settings = $this->make(SettingsRepositoryInterface::class);
|
$settings = $this->make(SettingsRepositoryInterface::class);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$version = $settings->get('version');
|
$version = $settings->get('version');
|
||||||
} finally {
|
} finally {
|
||||||
$isUpToDate = isset($version) && $version === $this->version();
|
return isset($version) && $version === $this->version();
|
||||||
}
|
}
|
||||||
|
|
||||||
return $isUpToDate;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -118,7 +118,7 @@ class Server
|
||||||
// (Right now it tries to resolve a database connection because of the injected settings repo instance)
|
// (Right now it tries to resolve a database connection because of the injected settings repo instance)
|
||||||
// We could register a different settings repo when Flarum is not installed
|
// We could register a different settings repo when Flarum is not installed
|
||||||
//$pipe->pipe($this->app->make(HandleErrors::class, ['debug' => true]));
|
//$pipe->pipe($this->app->make(HandleErrors::class, ['debug' => true]));
|
||||||
$pipe->pipe($this->app->make(StartSession::class));
|
//$pipe->pipe($this->app->make(StartSession::class));
|
||||||
$pipe->pipe($this->app->make(DispatchRoute::class, ['routes' => $this->app->make('flarum.install.routes')]));
|
$pipe->pipe($this->app->make(DispatchRoute::class, ['routes' => $this->app->make('flarum.install.routes')]));
|
||||||
|
|
||||||
return $pipe;
|
return $pipe;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user