fix language-strings; disallow direct removing of certificates if issuer=lets encrypt; fix sql query in updater; porting nginx regex for vhost-merging
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
@@ -132,7 +132,7 @@ if (Froxlor::isDatabaseVersion('202304260')) {
|
||||
Update::lastStepStatus(0);
|
||||
|
||||
Update::showUpdateStep("Adjusting system for data-export function");
|
||||
Database::query("UPDATE `" . TABLE_PANEL_SETTINGS . "`SET `varname` = 'exportenabled' WHERE `settinggroup`= 'system' AND `varname`= 'backupenabled");
|
||||
Database::query("UPDATE `" . TABLE_PANEL_SETTINGS . "`SET `varname` = 'exportenabled' WHERE `settinggroup`= 'system' AND `varname`= 'backupenabled'");
|
||||
Database::query("UPDATE `" . TABLE_PANEL_SETTINGS . "`SET `value` = REPLACE(`value`, 'extras.backup', 'extras.export') WHERE `settinggroup` = 'panel' AND `varname` = 'customer_hide_options'");
|
||||
Database::query("DELETE FROM `" . TABLE_PANEL_USERCOLUMNS . "` WHERE `section` = 'backup_list'");
|
||||
Database::query("DELETE FROM `" . TABLE_PANEL_TASKS . "` WHERE `type` = '20'");
|
||||
|
||||
@@ -863,13 +863,7 @@ class Nginx extends HttpConfigBase
|
||||
// remove comments
|
||||
$vhost = implode("\n", preg_replace('/^(\s+)?#(.*)$/', '', explode("\n", $vhost)));
|
||||
// Break blocks into lines
|
||||
$vhost = str_replace([
|
||||
"{",
|
||||
"}"
|
||||
], [
|
||||
" {\n",
|
||||
"\n}"
|
||||
], $vhost);
|
||||
$vhost = preg_replace("/^(\s+)?location(.+)\{(.+)\}$/misU", "location $2 {\n $3 \n}", $vhost);
|
||||
// Break into array items
|
||||
$vhost = explode("\n", preg_replace('/[ \t]+/', ' ', trim(preg_replace('/\t+/', '', $vhost))));
|
||||
// Remove empty lines
|
||||
|
||||
@@ -47,4 +47,9 @@ class SSLCertificate
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public static function isNotLetsEncrypt(array $attributes): bool
|
||||
{
|
||||
return (int)$attributes['fields']['letsencrypt'] == 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -89,6 +89,9 @@ return [
|
||||
'action' => 'delete',
|
||||
'id' => ':id'
|
||||
],
|
||||
// Let's Encrypt certificates can be removed 'correctly'
|
||||
// by disabling let's encrypt for the domain
|
||||
'visible' => [SSLCertificate::class, 'isNotLetsEncrypt']
|
||||
],
|
||||
]
|
||||
]
|
||||
|
||||
@@ -2210,7 +2210,7 @@ Yours sincerely, your administrator',
|
||||
'toolselect' => 'Traffic analyzer',
|
||||
'webalizer' => 'Webalizer',
|
||||
'awstats' => 'AWStats',
|
||||
'goaccess' => 'goacccess'
|
||||
'goaccess' => 'goaccess'
|
||||
],
|
||||
'requires_reconfiguration' => 'Changing this settings might require a reconfiguration of the following services:<br><strong>%s</strong>',
|
||||
'req_limit_per_interval' => [
|
||||
|
||||
@@ -2176,7 +2176,7 @@ Atentamente, su administrador'
|
||||
'toolselect' => 'Analizador de tráfico',
|
||||
'webalizer' => 'Webalizer',
|
||||
'awstats' => 'AWStats',
|
||||
'goaccess' => 'goacccess'
|
||||
'goaccess' => 'goaccess'
|
||||
],
|
||||
'requires_reconfiguration' => 'El cambio de esta configuración podría requerir una reconfiguración de los siguientes servicios:<br/><strong>%s</strong>'
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user