mirror of
https://github.com/flarum/core.git
synced 2025-07-22 09:11:19 +02:00
Fix installation regressions
This commit is contained in:
@@ -138,7 +138,7 @@ class Application extends Container implements ApplicationContract
|
|||||||
*/
|
*/
|
||||||
public function url($path = null)
|
public function url($path = null)
|
||||||
{
|
{
|
||||||
$config = $this->make('flarum.config');
|
$config = $this->isInstalled() ? $this->make('flarum.config') : [];
|
||||||
$url = array_get($config, 'url', $_SERVER['REQUEST_URI']);
|
$url = array_get($config, 'url', $_SERVER['REQUEST_URI']);
|
||||||
|
|
||||||
if (is_array($url)) {
|
if (is_array($url)) {
|
||||||
|
@@ -231,6 +231,8 @@ class InstallCommand extends AbstractCommand
|
|||||||
|
|
||||||
$this->info('Writing default settings');
|
$this->info('Writing default settings');
|
||||||
|
|
||||||
|
$settings->set('version', $this->application->version());
|
||||||
|
|
||||||
foreach ($this->settings as $k => $v) {
|
foreach ($this->settings as $k => $v) {
|
||||||
$settings->set($k, $v);
|
$settings->set($k, $v);
|
||||||
}
|
}
|
||||||
|
@@ -42,6 +42,8 @@ class InstallServiceProvider extends AbstractServiceProvider
|
|||||||
$this->app->singleton('flarum.install.routes', function () {
|
$this->app->singleton('flarum.install.routes', function () {
|
||||||
return $this->getRoutes();
|
return $this->getRoutes();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$this->loadViewsFrom(__DIR__.'/../../views/install', 'flarum.install');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -56,7 +58,7 @@ class InstallServiceProvider extends AbstractServiceProvider
|
|||||||
$routes->get(
|
$routes->get(
|
||||||
'/',
|
'/',
|
||||||
'index',
|
'index',
|
||||||
$toController('Flarum\Install\Controller\IndexAction')
|
$toController('Flarum\Install\Controller\IndexController')
|
||||||
);
|
);
|
||||||
|
|
||||||
$routes->post(
|
$routes->post(
|
||||||
|
Reference in New Issue
Block a user