mirror of
https://github.com/flarum/core.git
synced 2025-10-14 16:34:26 +02:00
Implement proper update process
If the version in the settings table mismatches the code version, then we return a 503 error for all requests coming through index.php and api.php, while admin.php serves up a form prompting for the database password which will run outstanding migrations.
This commit is contained in:
@@ -44,16 +44,15 @@ class IndexController extends AbstractHtmlController
|
||||
*/
|
||||
public function render(Request $request, array $routeParams = [])
|
||||
{
|
||||
$view = $this->view->make('flarum.install::app');
|
||||
$view = $this->view->make('flarum.install::app')->with('title', 'Install Flarum');
|
||||
|
||||
$this->prerequisite->check();
|
||||
$errors = $this->prerequisite->getErrors();
|
||||
|
||||
if (count($errors)) {
|
||||
$view->content = $this->view->make('flarum.install::errors');
|
||||
$view->content->errors = $errors;
|
||||
$view->with('content', $this->view->make('flarum.install::errors')->with('errors', $errors));
|
||||
} else {
|
||||
$view->content = $this->view->make('flarum.install::install');
|
||||
$view->with('content', $this->view->make('flarum.install::install'));
|
||||
}
|
||||
|
||||
return $view;
|
||||
|
Reference in New Issue
Block a user