fix wrong database-update procedure in update-command, fix distribution guessing on installation

Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann 2023-11-12 13:08:40 +01:00
parent d52f33a50c
commit b53b3a924a
No known key found for this signature in database
GPG Key ID: C121F97338D7A352
3 changed files with 3 additions and 2 deletions

View File

@ -175,7 +175,7 @@ final class UpdateCommand extends CliCommand
$result = self::SUCCESS;
$question = new ConfirmationQuestion('Update database? [no] ', false, '/^(y|j)/i');
if ($yestoall || $helper->ask($input, $output, $question)) {
$result = $this->updateDatabase();
$result = $this->runUpdate($output, true);
}
} else {
$errmsg = 'error.autoupdate_' . $auex;

View File

@ -410,7 +410,7 @@ class Install
} else {
$osrf = explode("\n", file_get_contents('/etc/os-release'));
foreach ($osrf as $line) {
$osrfline = explode("\n", $line);
$osrfline = explode("=", $line);
if ($osrfline[0] == 'VERSION_CODENAME') {
$os_dist['VERSION_CODENAME'] = $osrfline[1];
} else if ($osrfline[0] == 'ID') {

View File

@ -115,6 +115,7 @@ if (!isset($sql) || !is_array($sql)) {
* Show nice note if requested domain is "unknown" to froxlor and thus is being lead to its vhost
*/
if ($_SERVER['SERVER_NAME'] != Settings::Get('system.hostname') &&
Settings::Get('panel.is_configured') == 1 &&
!filter_var($_SERVER['SERVER_NAME'], FILTER_VALIDATE_IP) && (
empty(Settings::Get('system.froxloraliases')) ||
(!empty(Settings::Get('system.froxloraliases')) && !in_array($_SERVER['SERVER_NAME'], array_map('trim', explode(',', Settings::Get('system.froxloraliases')))))