fix checkbox-value for installation; fix session-initialization; preselect various guessable fields to ease installation

Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann
2022-05-05 17:26:28 +02:00
parent 65eeab299d
commit d0eaf12b34
4 changed files with 63 additions and 22 deletions

View File

@@ -23,6 +23,7 @@
* @license https://files.froxlor.org/misc/COPYING.txt GPLv2
*/
use Froxlor\UI\Panel\UI;
use Froxlor\Install\Install;
// define default theme for configurehint, etc.
@@ -31,20 +32,20 @@ $_deftheme = 'Froxlor';
// validate correct php version
if (version_compare("7.4.0", PHP_VERSION, ">=")) {
die(view($_deftheme . '/misc/phprequirementfailed.html.twig', [
'{{ basehref }}' => '../',
'{{ froxlor_min_version }}' => '7.4.0',
'{{ current_version }}' => PHP_VERSION,
'{{ current_year }}' => date('Y', time()),
]));
'{{ basehref }}' => '../',
'{{ froxlor_min_version }}' => '7.4.0',
'{{ current_version }}' => PHP_VERSION,
'{{ current_year }}' => date('Y', time()),
]));
}
// validate vendor autoloader
if (!file_exists(dirname(__DIR__) . '/vendor/autoload.php')) {
die(view($_deftheme . '/misc/vendormissinghint.html.twig', [
'{{ basehref }}' => '../',
'{{ froxlor_install_dir }}' => dirname(__DIR__),
'{{ current_year }}' => date('Y', time()),
]));
'{{ basehref }}' => '../',
'{{ froxlor_install_dir }}' => dirname(__DIR__),
'{{ current_year }}' => date('Y', time()),
]));
}
// check installation status
@@ -54,8 +55,13 @@ if (file_exists(dirname(__DIR__) . '/lib/userdata.inc.php')) {
}
require dirname(__DIR__) . '/vendor/autoload.php';
require dirname(__DIR__) . '/lib/functions.php';
require dirname(__DIR__) . '/lib/tables.inc.php';
// init twig
UI::initTwig(true);
UI::sendHeaders();
require dirname(__DIR__) . '/lib/functions.php';
$installer = new Install();
$installer->handle();