use correct classes and not 0.10.x format

Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann
2022-09-17 17:20:58 +02:00
parent 5591bc41b4
commit fd596801e2

View File

@@ -232,7 +232,7 @@ if (Froxlor::isDatabaseVersion('201902120')) {
foreach ($domain_ids as $domain_id) {
$domain_in .= "'" . $domain_id['id'] . "',";
}
$domain_in = substr($domain_in, 0, - 1);
$domain_in = substr($domain_in, 0, -1);
Database::query("DELETE FROM `" . TABLE_PANEL_DOMAIN_SSL_SETTINGS . "` WHERE `domainid` IN (" . $domain_in . ")");
}
// check for froxlor domain using let's encrypt
@@ -319,7 +319,7 @@ if (Froxlor::isDatabaseVersion('201907270')) {
"templates/Sparkle/customer/tickets"
);
$disabled = explode(',', ini_get('disable_functions'));
$exec_allowed = ! in_array('exec', $disabled);
$exec_allowed = !in_array('exec', $disabled);
$del_list = "";
foreach ($to_clean as $filedir) {
$complete_filedir = Froxlor::getInstallDir() . $filedir;
@@ -560,7 +560,7 @@ if (Froxlor::isFroxlorVersion('0.10.10')) {
if (Froxlor::isDatabaseVersion('201912311')) {
Update::showUpdateStep("Migrate logfiles_format setting");
$current_format = Settings::Set('system.logfiles_format');
if (! empty($current_format)) {
if (!empty($current_format)) {
Settings::Set('system.logfiles_format', '"' . Settings::Get('system.logfiles_format') . '"');
Update::lastStepStatus(0);
} else {
@@ -770,7 +770,7 @@ if (Froxlor::isDatabaseVersion('202102200') || Froxlor::isDatabaseVersion('20210
$columnfound = 1;
}
}
if (! $columnfound) {
if (!$columnfound) {
Database::query("ALTER TABLE panel_domains ADD `description` varchar(255) NOT NULL DEFAULT '' AFTER `ssl_sessiontickets`;");
}
$result = Database::query("DESCRIBE `mail_virtual`");
@@ -780,7 +780,7 @@ if (Froxlor::isDatabaseVersion('202102200') || Froxlor::isDatabaseVersion('20210
$columnfound = 1;
}
}
if (! $columnfound) {
if (!$columnfound) {
Database::query("ALTER TABLE mail_virtual ADD `description` varchar(255) NOT NULL DEFAULT '' AFTER `iscatchall`");
}
Update::lastStepStatus(0);
@@ -837,7 +837,7 @@ if (Froxlor::isDatabaseVersion('202106270')) {
if (file_exists($custom_logo_file_old)) {
Update::showUpdateStep("Migrating existing custom logo to new settings", true);
$path = Froxlor::getInstallDir().'/img/';
$path = Froxlor::getInstallDir() . '/img/';
if (!is_dir($path) && !mkdir($path, 0775)) {
throw new \Exception("img directory does not exist and cannot be created");
}
@@ -849,13 +849,13 @@ if (Froxlor::isDatabaseVersion('202106270')) {
// Save as new custom logo header
$save_to = 'logo_header.png';
copy($custom_logo_file_old, $path.$save_to);
Settings::Set("panel.logo_image_header", "img/{$save_to}?v=".time());
copy($custom_logo_file_old, $path . $save_to);
Settings::Set("panel.logo_image_header", "img/{$save_to}?v=" . time());
// Save as new custom logo login
$save_to = 'logo_login.png';
copy($custom_logo_file_old, $path.$save_to);
Settings::Set("panel.logo_image_login", "img/{$save_to}?v=".time());
copy($custom_logo_file_old, $path . $save_to);
Settings::Set("panel.logo_image_login", "img/{$save_to}?v=" . time());
Update::lastStepStatus(0);
}
@@ -885,7 +885,8 @@ if (Froxlor::isDatabaseVersion('202107200')) {
if (Froxlor::isDatabaseVersion('202107210')) {
Update::showUpdateStep("Normalizing ipv6 for correct comparison", true);
$result_stmt = Database::prepare("
$result_stmt = Database::prepare(
"
SELECT `id`, `ip` FROM `" . TABLE_PANEL_IPSANDPORTS . "`"
);
Database::pexecute($result_stmt);
@@ -996,12 +997,12 @@ if (Froxlor::isFroxlorVersion('0.10.35.1')) {
Froxlor::updateToVersion('0.10.36');
}
if (\Froxlor\Froxlor::isFroxlorVersion('0.10.36')) {
showUpdateStep("Updating from 0.10.36 to 0.10.37", false);
\Froxlor\Froxlor::updateToVersion('0.10.37');
if (Froxlor::isFroxlorVersion('0.10.36')) {
Update::showUpdateStep("Updating from 0.10.36 to 0.10.37", false);
Froxlor::updateToVersion('0.10.37');
}
if (\Froxlor\Froxlor::isFroxlorVersion('0.10.37')) {
showUpdateStep("Updating from 0.10.37 to 0.10.38", false);
\Froxlor\Froxlor::updateToVersion('0.10.38');
if (Froxlor::isFroxlorVersion('0.10.37')) {
Update::showUpdateStep("Updating from 0.10.37 to 0.10.38", false);
Froxlor::updateToVersion('0.10.38');
}