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:
@@ -175,7 +175,7 @@ final class UpdateCommand extends CliCommand
|
|||||||
$result = self::SUCCESS;
|
$result = self::SUCCESS;
|
||||||
$question = new ConfirmationQuestion('Update database? [no] ', false, '/^(y|j)/i');
|
$question = new ConfirmationQuestion('Update database? [no] ', false, '/^(y|j)/i');
|
||||||
if ($yestoall || $helper->ask($input, $output, $question)) {
|
if ($yestoall || $helper->ask($input, $output, $question)) {
|
||||||
$result = $this->updateDatabase();
|
$result = $this->runUpdate($output, true);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$errmsg = 'error.autoupdate_' . $auex;
|
$errmsg = 'error.autoupdate_' . $auex;
|
||||||
|
|||||||
@@ -410,7 +410,7 @@ class Install
|
|||||||
} else {
|
} else {
|
||||||
$osrf = explode("\n", file_get_contents('/etc/os-release'));
|
$osrf = explode("\n", file_get_contents('/etc/os-release'));
|
||||||
foreach ($osrf as $line) {
|
foreach ($osrf as $line) {
|
||||||
$osrfline = explode("\n", $line);
|
$osrfline = explode("=", $line);
|
||||||
if ($osrfline[0] == 'VERSION_CODENAME') {
|
if ($osrfline[0] == 'VERSION_CODENAME') {
|
||||||
$os_dist['VERSION_CODENAME'] = $osrfline[1];
|
$os_dist['VERSION_CODENAME'] = $osrfline[1];
|
||||||
} else if ($osrfline[0] == 'ID') {
|
} else if ($osrfline[0] == 'ID') {
|
||||||
|
|||||||
@@ -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
|
* 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') &&
|
if ($_SERVER['SERVER_NAME'] != Settings::Get('system.hostname') &&
|
||||||
|
Settings::Get('panel.is_configured') == 1 &&
|
||||||
!filter_var($_SERVER['SERVER_NAME'], FILTER_VALIDATE_IP) && (
|
!filter_var($_SERVER['SERVER_NAME'], FILTER_VALIDATE_IP) && (
|
||||||
empty(Settings::Get('system.froxloraliases')) ||
|
empty(Settings::Get('system.froxloraliases')) ||
|
||||||
(!empty(Settings::Get('system.froxloraliases')) && !in_array($_SERVER['SERVER_NAME'], array_map('trim', explode(',', Settings::Get('system.froxloraliases')))))
|
(!empty(Settings::Get('system.froxloraliases')) && !in_array($_SERVER['SERVER_NAME'], array_map('trim', explode(',', Settings::Get('system.froxloraliases')))))
|
||||||
|
|||||||
Reference in New Issue
Block a user