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