From 07489a3a9c4fe191959969255eecf6c4fe57c764 Mon Sep 17 00:00:00 2001 From: Jonny Tischbein Date: Thu, 4 Oct 2018 18:53:52 +0200 Subject: [PATCH 1/2] Install: After detecting DB already in use, go back to db_stettings with error --- mod/install.php | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/mod/install.php b/mod/install.php index d2d322b3b9..8355f61300 100644 --- a/mod/install.php +++ b/mod/install.php @@ -125,13 +125,8 @@ function install_content(App $a) { if (DBA::$connected) { $r = q("SELECT COUNT(*) as `total` FROM `user`"); if (DBA::isResult($r) && $r[0]['total']) { - $tpl = get_markup_template('install.tpl'); - return replace_macros($tpl, [ - '$title' => $install_title, - '$pass' => '', - '$status' => L10n::t('Database already in use.'), - '$text' => '', - ]); + $install_wizard_pass = 2; + $wizard_status = L10n::t('Database already in use.'); } } From faa86aa2c0bb52908dc28fd8b0b5c5b093f5c4b2 Mon Sep 17 00:00:00 2001 From: Jonny Tischbein Date: Thu, 4 Oct 2018 21:38:44 +0200 Subject: [PATCH 2/2] fix indent with tabs --- mod/install.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mod/install.php b/mod/install.php index 8355f61300..7a69a731ba 100644 --- a/mod/install.php +++ b/mod/install.php @@ -125,8 +125,8 @@ function install_content(App $a) { if (DBA::$connected) { $r = q("SELECT COUNT(*) as `total` FROM `user`"); if (DBA::isResult($r) && $r[0]['total']) { - $install_wizard_pass = 2; - $wizard_status = L10n::t('Database already in use.'); + $install_wizard_pass = 2; + $wizard_status = L10n::t('Database already in use.'); } }