added more fields and defaults
This commit is contained in:
@@ -42,9 +42,15 @@ class Install
|
||||
public array $suggestions = [];
|
||||
public array $criticals = [];
|
||||
public array $loadedExtensions;
|
||||
// TODO: add more os
|
||||
public array $supportedOS = [
|
||||
'focal' => 'Ubuntu 20.04 LTS (Focal Fossa)'
|
||||
];
|
||||
public array $webserverBackend = [
|
||||
'php-fpm' => 'PHP-FPM',
|
||||
'fcgid' => 'FCGID',
|
||||
'none' => 'None',
|
||||
];
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
@@ -126,7 +132,7 @@ class Install
|
||||
|
||||
// also handle completion of installation if it's the step before the last step
|
||||
if ($this->currentStep == ($this->maxSteps -1)) {
|
||||
$core = new \Froxlor\Install\Install\Core($_SESSION['installation']);
|
||||
$core = new Core($_SESSION['installation']);
|
||||
$core->doInstall();
|
||||
}
|
||||
|
||||
|
||||
@@ -30,6 +30,7 @@ use Froxlor\Config\ConfigParser;
|
||||
use Froxlor\FileDir;
|
||||
use Froxlor\Froxlor;
|
||||
use Froxlor\PhpHelper;
|
||||
use Froxlor\System\Crypt;
|
||||
use PDO;
|
||||
use PDOException;
|
||||
use PDOStatement;
|
||||
@@ -503,9 +504,8 @@ class Core
|
||||
// last but not least create the main admin
|
||||
$ins_data = [
|
||||
'loginname' => $this->validatedData['admin_user'],
|
||||
/* use system default crypt */
|
||||
'password' => password_hash($this->validatedData['admin_pass'], PASSWORD_DEFAULT),
|
||||
'email' => 'admin@' . $this->validatedData['servername'],
|
||||
'email' => $this->validatedData['admin_email'],
|
||||
'deflang' => 'en' // TODO: set lanuage
|
||||
];
|
||||
$ins_stmt = $db_user->prepare("
|
||||
|
||||
@@ -121,6 +121,7 @@ return [
|
||||
'distribution' => [
|
||||
'label' => lng('distribution'),
|
||||
'type' => 'select',
|
||||
'mandatory' => true,
|
||||
'select_var' => $this->supportedOS,
|
||||
],
|
||||
'serverip' => [
|
||||
@@ -139,7 +140,7 @@ return [
|
||||
'label' => lng('use_ssl'),
|
||||
'type' => 'checkbox',
|
||||
'value' => '1',
|
||||
'checked' => old('use_ssl', '0', 'installation'),
|
||||
'checked' => old('use_ssl', '1', 'installation'),
|
||||
],
|
||||
'webserver' => [
|
||||
'label' => lng('webserver'),
|
||||
@@ -147,6 +148,12 @@ return [
|
||||
'mandatory' => true,
|
||||
'value' => old('webserver', 'apache24', 'installation'),
|
||||
],
|
||||
'webserver_backend' => [
|
||||
'label' => lng('webserver_backend'),
|
||||
'type' => 'select',
|
||||
'mandatory' => true,
|
||||
'select_var' => $this->webserverBackend,
|
||||
],
|
||||
'httpuser' => [
|
||||
'label' => lng('httpuser'),
|
||||
'type' => 'text',
|
||||
|
||||
Reference in New Issue
Block a user