mirror of https://github.com/flarum/flarum
Boot app before attempting upgrade
parent
38b832bbf7
commit
7d257565cc
|
@ -111,10 +111,25 @@ if (Core::isInstalled()) {
|
||||||
|
|
||||||
$app->register(new \Flarum\Core\CoreServiceProvider($app));
|
$app->register(new \Flarum\Core\CoreServiceProvider($app));
|
||||||
|
|
||||||
|
$config->set('mail.driver', Core::config('mail_driver'));
|
||||||
|
$config->set('mail.host', Core::config('mail_host'));
|
||||||
|
$config->set('mail.port', Core::config('mail_port'));
|
||||||
|
$config->set('mail.from.address', Core::config('mail_from'));
|
||||||
|
$config->set('mail.from.name', Core::config('forum_title'));
|
||||||
|
$config->set('mail.encryption', Core::config('mail_encryption'));
|
||||||
|
$config->set('mail.username', Core::config('mail_username'));
|
||||||
|
$config->set('mail.password', Core::config('mail_password'));
|
||||||
|
|
||||||
|
// Register extensions and tell them to listen for events
|
||||||
|
$app->register(new \Flarum\Support\ExtensionsServiceProvider($app));
|
||||||
|
}
|
||||||
|
|
||||||
|
$app->boot();
|
||||||
|
|
||||||
// If the version stored in the database doesn't match the version of the
|
// If the version stored in the database doesn't match the version of the
|
||||||
// code, then run the upgrade script (migrations). This is temporary - a
|
// code, then run the upgrade script (migrations). This is temporary - a
|
||||||
// proper, more secure upgrade method is planned.
|
// proper, more secure upgrade method is planned.
|
||||||
if ($settings->get('version') !== $app::VERSION) {
|
if (Core::isInstalled() && $settings->get('version') !== $app::VERSION) {
|
||||||
$input = new \Symfony\Component\Console\Input\StringInput('');
|
$input = new \Symfony\Component\Console\Input\StringInput('');
|
||||||
$output = new \Symfony\Component\Console\Output\BufferedOutput;
|
$output = new \Symfony\Component\Console\Output\BufferedOutput;
|
||||||
|
|
||||||
|
@ -131,19 +146,4 @@ if (Core::isInstalled()) {
|
||||||
$admin->flushAssets();
|
$admin->flushAssets();
|
||||||
}
|
}
|
||||||
|
|
||||||
$config->set('mail.driver', Core::config('mail_driver'));
|
|
||||||
$config->set('mail.host', Core::config('mail_host'));
|
|
||||||
$config->set('mail.port', Core::config('mail_port'));
|
|
||||||
$config->set('mail.from.address', Core::config('mail_from'));
|
|
||||||
$config->set('mail.from.name', Core::config('forum_title'));
|
|
||||||
$config->set('mail.encryption', Core::config('mail_encryption'));
|
|
||||||
$config->set('mail.username', Core::config('mail_username'));
|
|
||||||
$config->set('mail.password', Core::config('mail_password'));
|
|
||||||
|
|
||||||
// Register extensions and tell them to listen for events
|
|
||||||
$app->register(new \Flarum\Support\ExtensionsServiceProvider($app));
|
|
||||||
}
|
|
||||||
|
|
||||||
$app->boot();
|
|
||||||
|
|
||||||
return $app;
|
return $app;
|
||||||
|
|
Loading…
Reference in New Issue