From 0fa20fe42e448e6915ba7499708ac3f4d59fa20b Mon Sep 17 00:00:00 2001 From: Herman van Rink Date: Wed, 4 Dec 2019 20:52:09 +0100 Subject: [PATCH 001/621] Draft an info tab for the client page #5372 --- interface/web/client/client_edit.php | 24 +++++++++++++++++++ interface/web/client/form/client.tform.php | 7 ++++++ .../web/dashboard/dashlets/databasequota.php | 9 +++++-- .../web/dashboard/dashlets/mailquota.php | 10 ++++++-- interface/web/dashboard/dashlets/quota.php | 10 ++++++-- 5 files changed, 54 insertions(+), 6 deletions(-) diff --git a/interface/web/client/client_edit.php b/interface/web/client/client_edit.php index bbc7849f1f..c5fc6be610 100644 --- a/interface/web/client/client_edit.php +++ b/interface/web/client/client_edit.php @@ -73,6 +73,30 @@ function onShowNew() { parent::onShowNew(); } + function onShowEdit() { + global $app, $conf; + chdir('../dashboard'); + + $dashlet_list = array(); + $dashlets = array('databasequota.php', 'limits.php', 'mailquota.php', 'quota.php'); + $current_client_id = $this->id; + + foreach ($dashlets as $file) { + if ($file != '.' && $file != '..' && !is_dir(ISPC_WEB_PATH.'/dashboard/dashlets/'.$file)) { + $dashlet_name = substr($file, 0, -4); + $dashlet_class = 'dashlet_'.$dashlet_name; + include_once ISPC_WEB_PATH.'/dashboard/dashlets/'.$file; + $dashlet_list[$dashlet_name] = new $dashlet_class; + $dashlets_html .= $dashlet_list[$dashlet_name]->show($current_client_id); + } + } + $app->tpl->setVar('dashlets', $dashlets_html); + + chdir('../client'); + + parent::onShowEdit(); + } + function onSubmit() { global $app, $conf; diff --git a/interface/web/client/form/client.tform.php b/interface/web/client/form/client.tform.php index 5b45ffb972..57d7ae1833 100644 --- a/interface/web/client/form/client.tform.php +++ b/interface/web/client/form/client.tform.php @@ -46,6 +46,7 @@ $form["db_table_idx"] = "client_id"; $form["db_history"] = "yes"; $form["tab_default"] = "address"; +$form["tab_default"] = "info"; $form["list_default"] = "client_list.php"; $form["auth"] = 'yes'; @@ -80,6 +81,12 @@ } } +$form["tabs"]['info'] = array ( + 'title' => "Info", + 'width' => 100, + 'template' => "templates/client_edit_info.htm", + 'fields' => array () +); $form["tabs"]['address'] = array ( 'title' => "Address", 'width' => 100, diff --git a/interface/web/dashboard/dashlets/databasequota.php b/interface/web/dashboard/dashlets/databasequota.php index 6439cdee12..541539c8c7 100644 --- a/interface/web/dashboard/dashlets/databasequota.php +++ b/interface/web/dashboard/dashlets/databasequota.php @@ -2,7 +2,7 @@ class dashlet_databasequota { - function show() { + function show($limit_to_client_id = 0) { global $app; //* Loading Template @@ -15,8 +15,13 @@ function show() { $lng_file = 'lib/lang/'.$_SESSION['s']['language'].'_dashlet_databasequota.lng'; if(is_file($lng_file)) include $lng_file; $tpl->setVar($wb); + if ($limit_to_client_id == 0 || $_SESSION["s"]["user"]["typ"] != 'admin') { + $client_id = $_SESSION['s']['user']['client_id']; + } else { + $client_id = $limit_to_client_id; + } - $databases = $app->quota_lib->get_databasequota_data( ($_SESSION["s"]["user"]["typ"] != 'admin') ? $_SESSION['s']['user']['client_id'] : null); + $databases = $app->quota_lib->get_databasequota_data($client_id); //print_r($databases); $has_databasequota = false; diff --git a/interface/web/dashboard/dashlets/mailquota.php b/interface/web/dashboard/dashlets/mailquota.php index 4629d6a463..15a26178d1 100644 --- a/interface/web/dashboard/dashlets/mailquota.php +++ b/interface/web/dashboard/dashlets/mailquota.php @@ -2,7 +2,7 @@ class dashlet_mailquota { - function show() { + function show($limit_to_client_id = 0) { global $app; //* Loading Template @@ -16,7 +16,13 @@ function show() { if(is_file($lng_file)) include $lng_file; $tpl->setVar($wb); - $emails = $app->quota_lib->get_mailquota_data( ($_SESSION["s"]["user"]["typ"] != 'admin') ? $_SESSION['s']['user']['client_id'] : null); + if ($limit_to_client_id == 0 || $_SESSION["s"]["user"]["typ"] != 'admin') { + $client_id = $_SESSION['s']['user']['client_id']; + } else { + $client_id = $limit_to_client_id; + } + + $emails = $app->quota_lib->get_mailquota_data($client_id); //print_r($emails); $has_mailquota = false; diff --git a/interface/web/dashboard/dashlets/quota.php b/interface/web/dashboard/dashlets/quota.php index 6ff975b623..e67935d7cd 100644 --- a/interface/web/dashboard/dashlets/quota.php +++ b/interface/web/dashboard/dashlets/quota.php @@ -2,7 +2,7 @@ class dashlet_quota { - function show() { + function show($limit_to_client_id = 0) { global $app; //* Loading Template @@ -16,7 +16,13 @@ function show() { if(is_file($lng_file)) include $lng_file; $tpl->setVar($wb); - $sites = $app->quota_lib->get_quota_data( ($_SESSION["s"]["user"]["typ"] != 'admin') ? $_SESSION['s']['user']['client_id'] : null); + if ($limit_to_client_id == 0 || $_SESSION["s"]["user"]["typ"] != 'admin') { + $client_id = $_SESSION['s']['user']['client_id']; + } else { + $client_id = $limit_to_client_id; + } + + $sites = $app->quota_lib->get_quota_data($client_id); //print_r($sites); $has_quota = false; From 51ae28346b5cde079211cb7513d7dc2c7b421c26 Mon Sep 17 00:00:00 2001 From: Herman van Rink Date: Wed, 4 Dec 2019 20:57:46 +0100 Subject: [PATCH 002/621] Add draft template for #5372 --- .../web/client/templates/client_edit_info.htm | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 interface/web/client/templates/client_edit_info.htm diff --git a/interface/web/client/templates/client_edit_info.htm b/interface/web/client/templates/client_edit_info.htm new file mode 100644 index 0000000000..3a1a07c057 --- /dev/null +++ b/interface/web/client/templates/client_edit_info.htm @@ -0,0 +1,30 @@ + + +

+ + Client info +
+
+
+
From 169a4800b139038072d65159a2cb4a31ace78420 Mon Sep 17 00:00:00 2001 From: Herman van Rink Date: Fri, 20 Dec 2019 15:10:45 +0100 Subject: [PATCH 003/621] Prepare the limits table to be show for an admin or reseller but with client data, #5372 --- interface/lib/classes/tform_base.inc.php | 20 +++++++++++++----- interface/web/dashboard/dashlets/limits.php | 23 ++++++++++++++------- 2 files changed, 31 insertions(+), 12 deletions(-) diff --git a/interface/lib/classes/tform_base.inc.php b/interface/lib/classes/tform_base.inc.php index e6174d2da7..15219c5110 100644 --- a/interface/lib/classes/tform_base.inc.php +++ b/interface/lib/classes/tform_base.inc.php @@ -1548,17 +1548,27 @@ function datalogSave($action, $primary_id, $record_old, $record_new) { return true; } - function getAuthSQL($perm, $table = '') { - if($_SESSION["s"]["user"]["typ"] == 'admin' || $_SESSION['s']['user']['mailuser_id'] > 0) { + function getAuthSQL($perm, $table = '', $userid = NULL, $groups = NULL) { + if(($_SESSION["s"]["user"]["typ"] == 'admin' || $_SESSION['s']['user']['mailuser_id'] > 0 ) && $userid == NULL && $groups == NULL) { return '1'; } else { if ($table != ''){ $table = ' ' . $table . '.'; } - $groups = ( $_SESSION["s"]["user"]["groups"] ) ? $_SESSION["s"]["user"]["groups"] : 0; $sql = '('; - $sql .= "(" . $table . "sys_userid = ".$_SESSION["s"]["user"]["userid"]." AND " . $table . "sys_perm_user like '%$perm%') OR "; - $sql .= "(" . $table . "sys_groupid IN (".$groups.") AND " . $table ."sys_perm_group like '%$perm%') OR "; + if ($userid === NULL) { + $userid = $_SESSION["s"]["user"]["userid"]; + } + if ($userid > 0) { + $sql .= "(" . $table . "sys_userid = ".$userid." AND " . $table . "sys_perm_user like '%$perm%') OR "; + } + + if ($groups === NULL) { + $groups = ( $_SESSION["s"]["user"]["groups"] ) ? $_SESSION["s"]["user"]["groups"] : 0; + } + if ($groups > 0) { + $sql .= "(" . $table . "sys_groupid IN (".$groups.") AND " . $table ."sys_perm_group like '%$perm%') OR "; + } $sql .= $table . "sys_perm_other like '%$perm%'"; $sql .= ')'; diff --git a/interface/web/dashboard/dashlets/limits.php b/interface/web/dashboard/dashlets/limits.php index 62cd2db358..a85d877e8b 100644 --- a/interface/web/dashboard/dashlets/limits.php +++ b/interface/web/dashboard/dashlets/limits.php @@ -2,7 +2,7 @@ class dashlet_limits { - function show() { + function show($limit_to_client_id = 0) { global $app, $conf; $limits = array(); @@ -148,6 +148,12 @@ function show() { $client = $app->db->queryOneRecord("SELECT * FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = ?", $client_group_id); } + if ($limit_to_client_id == 0 || !$app->auth->is_admin()) { + $client_id = $_SESSION['s']['user']['client_id']; + } else { + $client_id = $limit_to_client_id; + } + $rows = array(); foreach($limits as $limit) { $field = $limit['field']; @@ -159,10 +165,10 @@ function show() { if($value != 0 || $value == $wb['unlimited_txt']) { $value_formatted = ($value == '-1')?$wb['unlimited_txt']:$value; if($limit['q_type']!=''){ - $usage = $this->_get_assigned_quota($limit) . " MB"; + $usage = $this->_get_assigned_quota($limit, $client_id) . " MB"; $value_formatted = ($value == '-1')?$wb['unlimited_txt']:$value . " MB"; } - else $usage = $this->_get_limit_usage($limit); + else $usage = $this->_get_limit_usage($limit, $client_id); $percentage = ($value == '-1' || $value == 0 ? 0 : round(100 * $usage / $value)); $rows[] = array('field' => $field, 'field_txt' => $wb[$field.'_txt'], @@ -181,23 +187,26 @@ function show() { } - function _get_limit_usage($limit) { + function _get_limit_usage($limit, $limit_to_client_id) { global $app; $sql = "SELECT count(sys_userid) as number FROM ?? WHERE "; if($limit['db_where'] != '') $sql .= $limit['db_where']." AND "; - $sql .= $app->tform->getAuthSQL('r'); + $sql .= $app->tform->getAuthSQL('r', '', $limit_to_client_id); + // TEST to show reseller data. + //$sql .= $app->tform->getAuthSQL('r', '', 0, '3,28,39'); + //echo $sql; $rec = $app->db->queryOneRecord($sql, $limit['db_table']); return $rec['number']; } - function _get_assigned_quota($limit) { + function _get_assigned_quota($limit, $limit_to_client_id) { global $app; $sql = "SELECT sum(??) as number FROM ?? WHERE "; if($limit['db_where'] != '') $sql .= $limit['db_where']." AND "; - $sql .= $app->tform->getAuthSQL('r'); + $sql .= $app->tform->getAuthSQL('r', '', $limit_to_client_id); $rec = $app->db->queryOneRecord($sql, $limit['q_type'], $limit['db_table']); if($limit['db_table']=='mail_user') $quotaMB = $rec['number'] / 1048576; // Mail quota is in bytes, must be converted to MB else $quotaMB = $rec['number']; From 8c5ba07e7a32c0742ef07734a2d2da73a6352574 Mon Sep 17 00:00:00 2001 From: Herman van Rink Date: Thu, 10 Dec 2020 04:02:02 +0100 Subject: [PATCH 004/621] Add delete button to some edit forms --- interface/web/mail/mail_alias_edit.php | 4 ++++ interface/web/mail/mail_domain_edit.php | 3 +++ interface/web/mail/mail_forward_edit.php | 4 ++++ interface/web/mail/mail_user_edit.php | 4 ++++ interface/web/mail/templates/mail_alias_edit.htm | 13 +++++++++---- interface/web/mail/templates/mail_domain_edit.htm | 13 +++++++++---- interface/web/mail/templates/mail_forward_edit.htm | 13 +++++++++---- .../web/mail/templates/mail_user_mailbox_edit.htm | 13 +++++++++---- 8 files changed, 51 insertions(+), 16 deletions(-) diff --git a/interface/web/mail/mail_alias_edit.php b/interface/web/mail/mail_alias_edit.php index 8f5b27dd2a..cee0719363 100644 --- a/interface/web/mail/mail_alias_edit.php +++ b/interface/web/mail/mail_alias_edit.php @@ -88,6 +88,10 @@ function onShowEnd() { } $app->tpl->setVar("email_domain", $domain_select); + $csrf_token = $app->auth->csrf_token_get('mail_alias_del'); + $app->tpl->setVar('_csrf_id', $csrf_token['csrf_id']); + $app->tpl->setVar('_csrf_key', $csrf_token['csrf_key']); + parent::onShowEnd(); } diff --git a/interface/web/mail/mail_domain_edit.php b/interface/web/mail/mail_domain_edit.php index 7409bf0c7c..0fcb913140 100644 --- a/interface/web/mail/mail_domain_edit.php +++ b/interface/web/mail/mail_domain_edit.php @@ -154,6 +154,9 @@ function onShowEnd() { $app->tpl->setVar("client_server_id", $options_mail_servers); unset($options_mail_servers); + $csrf_token = $app->auth->csrf_token_get('mail_alias_del'); + $app->tpl->setVar('_csrf_id', $csrf_token['csrf_id']); + $app->tpl->setVar('_csrf_key', $csrf_token['csrf_key']); } /* diff --git a/interface/web/mail/mail_forward_edit.php b/interface/web/mail/mail_forward_edit.php index 3106dc477c..d838cab4ed 100644 --- a/interface/web/mail/mail_forward_edit.php +++ b/interface/web/mail/mail_forward_edit.php @@ -86,6 +86,10 @@ function onShowEnd() { } $app->tpl->setVar("email_domain", $domain_select); + $csrf_token = $app->auth->csrf_token_get('mail_alias_del'); + $app->tpl->setVar('_csrf_id', $csrf_token['csrf_id']); + $app->tpl->setVar('_csrf_key', $csrf_token['csrf_key']); + parent::onShowEnd(); } diff --git a/interface/web/mail/mail_user_edit.php b/interface/web/mail/mail_user_edit.php index 1dca1db848..70a4251b09 100644 --- a/interface/web/mail/mail_user_edit.php +++ b/interface/web/mail/mail_user_edit.php @@ -135,6 +135,10 @@ function onShowEnd() { $app->tpl->setVar("enable_custom_login", 0); } + $csrf_token = $app->auth->csrf_token_get('mail_alias_del'); + $app->tpl->setVar('_csrf_id', $csrf_token['csrf_id']); + $app->tpl->setVar('_csrf_key', $csrf_token['csrf_key']); + parent::onShowEnd(); } diff --git a/interface/web/mail/templates/mail_alias_edit.htm b/interface/web/mail/templates/mail_alias_edit.htm index 2fd149a348..4b1b1a33ab 100644 --- a/interface/web/mail/templates/mail_alias_edit.htm +++ b/interface/web/mail/templates/mail_alias_edit.htm @@ -38,7 +38,12 @@ -
- - -
+
+ + + +
+ + +
+
diff --git a/interface/web/mail/templates/mail_domain_edit.htm b/interface/web/mail/templates/mail_domain_edit.htm index cb462c9819..7641576853 100644 --- a/interface/web/mail/templates/mail_domain_edit.htm +++ b/interface/web/mail/templates/mail_domain_edit.htm @@ -117,10 +117,15 @@ -
- - -
+
+ + + +
+ + +
+

Error 400 - trying to redirect

" + + - - AllowOverride None - Order Deny,Allow - Deny from all - From 69c4da025798cf0147173c394a9f5b7822f2b7b8 Mon Sep 17 00:00:00 2001 From: dachris1 Date: Tue, 15 Nov 2022 20:12:06 +0100 Subject: [PATCH 030/621] updated based on debian config install/tpl/gentoo_postfix.conf.master updated based on debian config --- install/tpl/gentoo_postfix.conf.master | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/install/tpl/gentoo_postfix.conf.master b/install/tpl/gentoo_postfix.conf.master index c6b1c2f9c5..8bd34f6928 100644 --- a/install/tpl/gentoo_postfix.conf.master +++ b/install/tpl/gentoo_postfix.conf.master @@ -1,3 +1,5 @@ +alias_maps = hash:/etc/aliases, hash:/var/lib/mailman/data/aliases +alias_database = hash:/etc/aliases, hash:/var/lib/mailman/data/aliases virtual_alias_domains = proxy:mysql:{config_dir}/mysql-virtual_alias_domains.cf virtual_alias_maps = hash:/var/lib/mailman/data/virtual-mailman, proxy:mysql:{config_dir}/mysql-virtual_forwardings.cf, proxy:mysql:{config_dir}/mysql-virtual_alias_maps.cf, proxy:mysql:{config_dir}/mysql-virtual_email2email.cf virtual_mailbox_domains = proxy:mysql:{config_dir}/mysql-virtual_domains.cf @@ -5,6 +7,9 @@ virtual_mailbox_maps = proxy:mysql:{config_dir}/mysql-virtual_mailboxes.cf virtual_mailbox_base = {vmail_mailbox_base} virtual_uid_maps = proxy:mysql:/etc/postfix/mysql-virtual_uids.cf virtual_gid_maps = proxy:mysql:/etc/postfix/mysql-virtual_gids.cf +sender_bcc_maps = proxy:mysql:{config_dir}/mysql-virtual_outgoing_bcc.cf +inet_protocols=all +inet_interfaces = all smtpd_sasl_auth_enable = yes broken_sasl_auth_clients = yes smtpd_sasl_authenticated_header = yes @@ -35,7 +40,7 @@ header_checks = regexp:{config_dir}/header_checks mime_header_checks = regexp:{config_dir}/mime_header_checks nested_header_checks = regexp:{config_dir}/nested_header_checks body_checks = regexp:{config_dir}/body_checks -inet_interfaces = all +owner_request_special = no smtp_tls_security_level = may smtpd_tls_mandatory_protocols = !SSLv2, !SSLv3 smtpd_tls_protocols = !SSLv2,!SSLv3 From d079b01330a767f6c80e1d031af8eca3779a43d9 Mon Sep 17 00:00:00 2001 From: clk Date: Thu, 24 Nov 2022 13:27:32 +0100 Subject: [PATCH 031/621] Fixed file deletion bug --- server/lib/classes/aps_installer.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/lib/classes/aps_installer.inc.php b/server/lib/classes/aps_installer.inc.php index 922f32e612..e50c601cec 100644 --- a/server/lib/classes/aps_installer.inc.php +++ b/server/lib/classes/aps_installer.inc.php @@ -384,7 +384,7 @@ private function prepareFiles($task, $sxe) if(is_dir($this->document_root)){ $files = array_diff(scandir($this->document_root), array('.', '..', 'error', 'stats')); foreach($files as $file){ - if(is_dir($this->document_root.'/'.$file)){ + if(is_dir($this->document_root.'/'.$file) and !is_link($this->document_root.'/'.$file)){ $app->file->removeDirectory($this->document_root.'/'.$file); } else { @unlink($this->document_root.'/'.$file); From f68f9f06c4f2c427ee10c68b32eedf8d8f61f110 Mon Sep 17 00:00:00 2001 From: Herman van Rink Date: Sun, 27 Nov 2022 22:26:12 +0100 Subject: [PATCH 032/621] Fix dashlets for admin. --- interface/web/dashboard/dashlets/databasequota.php | 4 ++-- interface/web/dashboard/dashlets/limits.php | 8 ++++++++ interface/web/dashboard/dashlets/mailquota.php | 4 ++-- interface/web/dashboard/dashlets/quota.php | 4 ++-- 4 files changed, 14 insertions(+), 6 deletions(-) diff --git a/interface/web/dashboard/dashlets/databasequota.php b/interface/web/dashboard/dashlets/databasequota.php index ca8a70dd31..641dfd7784 100644 --- a/interface/web/dashboard/dashlets/databasequota.php +++ b/interface/web/dashboard/dashlets/databasequota.php @@ -2,7 +2,7 @@ class dashlet_databasequota { - function show($limit_to_client_id = 0) { + function show($limit_to_client_id = null) { global $app; //* Loading Template @@ -23,7 +23,7 @@ function show($limit_to_client_id = 0) { $lng_file = 'lib/lang/'.$_SESSION['s']['language'].'_dashlet_databasequota.lng'; if(is_file($lng_file)) include $lng_file; $tpl->setVar($wb); - if ($limit_to_client_id == 0 || $_SESSION["s"]["user"]["typ"] != 'admin') { + if ($_SESSION["s"]["user"]["typ"] != 'admin') { $client_id = $_SESSION['s']['user']['client_id']; } else { $client_id = $limit_to_client_id; diff --git a/interface/web/dashboard/dashlets/limits.php b/interface/web/dashboard/dashlets/limits.php index d68015dd11..79ac2126c8 100644 --- a/interface/web/dashboard/dashlets/limits.php +++ b/interface/web/dashboard/dashlets/limits.php @@ -149,8 +149,10 @@ public function show($limit_to_client_id = 0) if ($limit_to_client_id == 0) { $client_id = $_SESSION['s']['user']['client_id']; + $user_is_admin = true; } else { $client_id = $limit_to_client_id; + $user_is_admin = false; } $client_group_id = $app->functions->intval($_SESSION["s"]["user"]["default_group"]); @@ -161,6 +163,12 @@ public function show($limit_to_client_id = 0) foreach ($limits as $limit) { $field = $limit['field']; $value = $client[$field]; + if ($user_is_admin) { + $value = $wb['unlimited_txt']; + } else { + $value = $client[$field]; + } + if ($value != 0 || $value == $wb['unlimited_txt']) { $value_formatted = ($value == '-1')?$wb['unlimited_txt']:$value; if (isset($limit['q_type']) && $limit['q_type'] != '') { diff --git a/interface/web/dashboard/dashlets/mailquota.php b/interface/web/dashboard/dashlets/mailquota.php index 784e6b1c87..b310cc1dcb 100644 --- a/interface/web/dashboard/dashlets/mailquota.php +++ b/interface/web/dashboard/dashlets/mailquota.php @@ -2,7 +2,7 @@ class dashlet_mailquota { - function show($limit_to_client_id = 0) { + function show($limit_to_client_id = null) { global $app; //* Loading Template @@ -16,7 +16,7 @@ function show($limit_to_client_id = 0) { if(is_file($lng_file)) include $lng_file; $tpl->setVar($wb); - if ($limit_to_client_id == 0 || $_SESSION["s"]["user"]["typ"] != 'admin') { + if ($_SESSION["s"]["user"]["typ"] != 'admin') { $client_id = $_SESSION['s']['user']['client_id']; } else { $client_id = $limit_to_client_id; diff --git a/interface/web/dashboard/dashlets/quota.php b/interface/web/dashboard/dashlets/quota.php index 6380e18d87..3225bd304f 100644 --- a/interface/web/dashboard/dashlets/quota.php +++ b/interface/web/dashboard/dashlets/quota.php @@ -2,7 +2,7 @@ class dashlet_quota { - function show($limit_to_client_id = 0) { + function show($limit_to_client_id = null) { global $app; //* Loading Template @@ -24,7 +24,7 @@ function show($limit_to_client_id = 0) { if(is_file($lng_file)) include $lng_file; $tpl->setVar($wb); - if ($limit_to_client_id == 0 || $_SESSION["s"]["user"]["typ"] != 'admin') { + if ($_SESSION["s"]["user"]["typ"] != 'admin') { $client_id = $_SESSION['s']['user']['client_id']; } else { $client_id = $limit_to_client_id; From 626ec513c3a81282cf2bb5e8158e8adfbeec1dff Mon Sep 17 00:00:00 2001 From: Herman van Rink Date: Sun, 27 Nov 2022 22:36:55 +0100 Subject: [PATCH 033/621] Unlimited quota is stored as -1, not zero, #6417 --- interface/lib/classes/quota_lib.inc.php | 2 +- interface/web/dashboard/dashlets/templates/databasequota.htm | 2 +- interface/web/dashboard/dashlets/templates/mailquota.htm | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/interface/lib/classes/quota_lib.inc.php b/interface/lib/classes/quota_lib.inc.php index b02cdea994..063d128b66 100644 --- a/interface/lib/classes/quota_lib.inc.php +++ b/interface/lib/classes/quota_lib.inc.php @@ -326,7 +326,7 @@ public function get_databasequota_data($clientid = null, $readable = true) { if($used_ratio >= 0.8) $databases[$i]['display_colour'] = '#fd934f'; if($used_ratio >= 1) $databases[$i]['display_colour'] = '#cc0000'; - if($databases[$i]['database_quota'] == 0){ + if($databases[$i]['database_quota'] == -1) { $databases[$i]['database_quota'] = $app->lng('unlimited_txt'); } else { $databases[$i]['database_quota'] = $databases[$i]['database_quota'] . ' MB'; diff --git a/interface/web/dashboard/dashlets/templates/databasequota.htm b/interface/web/dashboard/dashlets/templates/databasequota.htm index 082dd1f8c0..48d6fa834c 100644 --- a/interface/web/dashboard/dashlets/templates/databasequota.htm +++ b/interface/web/dashboard/dashlets/templates/databasequota.htm @@ -14,7 +14,7 @@ {tmpl_var name='database_name'} {tmpl_var name='used'} {tmpl_var name='database_quota'} - {tmpl_if name="quota_raw" op="!=" value="0"} + {tmpl_if name="quota_raw" op="!=" value="-1"}
{tmpl_var name="used_percentage"}% {tmpl_var name='used'} {tmpl_var name='of_txt'} {tmpl_var name='database_quota'} diff --git a/interface/web/dashboard/dashlets/templates/mailquota.htm b/interface/web/dashboard/dashlets/templates/mailquota.htm index 9013c7ac3b..81a82f5349 100644 --- a/interface/web/dashboard/dashlets/templates/mailquota.htm +++ b/interface/web/dashboard/dashlets/templates/mailquota.htm @@ -16,7 +16,7 @@ {tmpl_var name='name'} {tmpl_var name='used'} {tmpl_var name='quota'} - {tmpl_if name="quota_raw" op="!=" value="0"} + {tmpl_if name="quota_raw" op="!=" value="-1"}
{tmpl_var name="used_percentage"}% {tmpl_var name='used'} {tmpl_var name='of_txt'} {tmpl_var name='quota'} From 512c58e1e6b7c96c83a1f75e18a7f834be6550a9 Mon Sep 17 00:00:00 2001 From: Herman van Rink Date: Sun, 27 Nov 2022 22:36:55 +0100 Subject: [PATCH 034/621] Unlimited quota is stored as -1, not zero, #6417 --- interface/lib/classes/quota_lib.inc.php | 2 +- interface/web/dashboard/dashlets/templates/databasequota.htm | 2 +- interface/web/dashboard/dashlets/templates/mailquota.htm | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/interface/lib/classes/quota_lib.inc.php b/interface/lib/classes/quota_lib.inc.php index b02cdea994..063d128b66 100644 --- a/interface/lib/classes/quota_lib.inc.php +++ b/interface/lib/classes/quota_lib.inc.php @@ -326,7 +326,7 @@ public function get_databasequota_data($clientid = null, $readable = true) { if($used_ratio >= 0.8) $databases[$i]['display_colour'] = '#fd934f'; if($used_ratio >= 1) $databases[$i]['display_colour'] = '#cc0000'; - if($databases[$i]['database_quota'] == 0){ + if($databases[$i]['database_quota'] == -1) { $databases[$i]['database_quota'] = $app->lng('unlimited_txt'); } else { $databases[$i]['database_quota'] = $databases[$i]['database_quota'] . ' MB'; diff --git a/interface/web/dashboard/dashlets/templates/databasequota.htm b/interface/web/dashboard/dashlets/templates/databasequota.htm index e4c1d493bb..e6fe773f15 100644 --- a/interface/web/dashboard/dashlets/templates/databasequota.htm +++ b/interface/web/dashboard/dashlets/templates/databasequota.htm @@ -14,7 +14,7 @@ {tmpl_var name='database_name'} {tmpl_var name='used'} {tmpl_var name='database_quota'} - {tmpl_if name="quota_raw" op="!=" value="0"} + {tmpl_if name="quota_raw" op="!=" value="-1"}
{tmpl_var name="used_percentage"}% {tmpl_var name='used'} {tmpl_var name='of_txt'} {tmpl_var name='database_quota'} diff --git a/interface/web/dashboard/dashlets/templates/mailquota.htm b/interface/web/dashboard/dashlets/templates/mailquota.htm index 9013c7ac3b..81a82f5349 100644 --- a/interface/web/dashboard/dashlets/templates/mailquota.htm +++ b/interface/web/dashboard/dashlets/templates/mailquota.htm @@ -16,7 +16,7 @@ {tmpl_var name='name'} {tmpl_var name='used'} {tmpl_var name='quota'} - {tmpl_if name="quota_raw" op="!=" value="0"} + {tmpl_if name="quota_raw" op="!=" value="-1"}
{tmpl_var name="used_percentage"}% {tmpl_var name='used'} {tmpl_var name='of_txt'} {tmpl_var name='quota'} From e11f336e42c2cef7901abc5d1327c7ac557d145f Mon Sep 17 00:00:00 2001 From: Herman van Rink Date: Sun, 27 Nov 2022 22:51:13 +0100 Subject: [PATCH 035/621] tabs --- interface/lib/classes/quota_lib.inc.php | 2 +- interface/web/dashboard/dashlets/templates/databasequota.htm | 2 +- interface/web/dashboard/dashlets/templates/mailquota.htm | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/interface/lib/classes/quota_lib.inc.php b/interface/lib/classes/quota_lib.inc.php index 063d128b66..7c5b388536 100644 --- a/interface/lib/classes/quota_lib.inc.php +++ b/interface/lib/classes/quota_lib.inc.php @@ -326,7 +326,7 @@ public function get_databasequota_data($clientid = null, $readable = true) { if($used_ratio >= 0.8) $databases[$i]['display_colour'] = '#fd934f'; if($used_ratio >= 1) $databases[$i]['display_colour'] = '#cc0000'; - if($databases[$i]['database_quota'] == -1) { + if($databases[$i]['database_quota'] == -1) { $databases[$i]['database_quota'] = $app->lng('unlimited_txt'); } else { $databases[$i]['database_quota'] = $databases[$i]['database_quota'] . ' MB'; diff --git a/interface/web/dashboard/dashlets/templates/databasequota.htm b/interface/web/dashboard/dashlets/templates/databasequota.htm index 48d6fa834c..4e8db908bd 100644 --- a/interface/web/dashboard/dashlets/templates/databasequota.htm +++ b/interface/web/dashboard/dashlets/templates/databasequota.htm @@ -14,7 +14,7 @@ {tmpl_var name='database_name'} {tmpl_var name='used'} {tmpl_var name='database_quota'} - {tmpl_if name="quota_raw" op="!=" value="-1"} + {tmpl_if name="quota_raw" op="!=" value="-1"}
{tmpl_var name="used_percentage"}% {tmpl_var name='used'} {tmpl_var name='of_txt'} {tmpl_var name='database_quota'} diff --git a/interface/web/dashboard/dashlets/templates/mailquota.htm b/interface/web/dashboard/dashlets/templates/mailquota.htm index 81a82f5349..08834fa5ab 100644 --- a/interface/web/dashboard/dashlets/templates/mailquota.htm +++ b/interface/web/dashboard/dashlets/templates/mailquota.htm @@ -16,7 +16,7 @@ {tmpl_var name='name'} {tmpl_var name='used'} {tmpl_var name='quota'} - {tmpl_if name="quota_raw" op="!=" value="-1"} + {tmpl_if name="quota_raw" op="!=" value="-1"}
{tmpl_var name="used_percentage"}% {tmpl_var name='used'} {tmpl_var name='of_txt'} {tmpl_var name='quota'} From 00b142be01e94aa66867965b17e0957616b8d81a Mon Sep 17 00:00:00 2001 From: Herman van Rink Date: Sun, 27 Nov 2022 22:51:13 +0100 Subject: [PATCH 036/621] tabs --- interface/lib/classes/quota_lib.inc.php | 2 +- interface/web/dashboard/dashlets/templates/databasequota.htm | 2 +- interface/web/dashboard/dashlets/templates/mailquota.htm | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/interface/lib/classes/quota_lib.inc.php b/interface/lib/classes/quota_lib.inc.php index 063d128b66..7c5b388536 100644 --- a/interface/lib/classes/quota_lib.inc.php +++ b/interface/lib/classes/quota_lib.inc.php @@ -326,7 +326,7 @@ public function get_databasequota_data($clientid = null, $readable = true) { if($used_ratio >= 0.8) $databases[$i]['display_colour'] = '#fd934f'; if($used_ratio >= 1) $databases[$i]['display_colour'] = '#cc0000'; - if($databases[$i]['database_quota'] == -1) { + if($databases[$i]['database_quota'] == -1) { $databases[$i]['database_quota'] = $app->lng('unlimited_txt'); } else { $databases[$i]['database_quota'] = $databases[$i]['database_quota'] . ' MB'; diff --git a/interface/web/dashboard/dashlets/templates/databasequota.htm b/interface/web/dashboard/dashlets/templates/databasequota.htm index e6fe773f15..a2ecc2e47d 100644 --- a/interface/web/dashboard/dashlets/templates/databasequota.htm +++ b/interface/web/dashboard/dashlets/templates/databasequota.htm @@ -14,7 +14,7 @@ {tmpl_var name='database_name'} {tmpl_var name='used'} {tmpl_var name='database_quota'} - {tmpl_if name="quota_raw" op="!=" value="-1"} + {tmpl_if name="quota_raw" op="!=" value="-1"}
{tmpl_var name="used_percentage"}% {tmpl_var name='used'} {tmpl_var name='of_txt'} {tmpl_var name='database_quota'} diff --git a/interface/web/dashboard/dashlets/templates/mailquota.htm b/interface/web/dashboard/dashlets/templates/mailquota.htm index 81a82f5349..08834fa5ab 100644 --- a/interface/web/dashboard/dashlets/templates/mailquota.htm +++ b/interface/web/dashboard/dashlets/templates/mailquota.htm @@ -16,7 +16,7 @@ {tmpl_var name='name'} {tmpl_var name='used'} {tmpl_var name='quota'} - {tmpl_if name="quota_raw" op="!=" value="-1"} + {tmpl_if name="quota_raw" op="!=" value="-1"}
{tmpl_var name="used_percentage"}% {tmpl_var name='used'} {tmpl_var name='of_txt'} {tmpl_var name='quota'} From 77ab6ddacfa5925f848ce6083d40258e36cec193 Mon Sep 17 00:00:00 2001 From: Herman van Rink Date: Sun, 4 Dec 2022 20:53:59 +0100 Subject: [PATCH 037/621] Mark usage column for php sorting, #6418 --- interface/web/admin/list/server_php.list.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/interface/web/admin/list/server_php.list.php b/interface/web/admin/list/server_php.list.php index a4a38901ab..4ea40bdae1 100644 --- a/interface/web/admin/list/server_php.list.php +++ b/interface/web/admin/list/server_php.list.php @@ -39,6 +39,9 @@ //* Enable auth $liste['auth'] = 'no'; +// mark columns for php sorting (no real mySQL columns) +$liste["phpsort"] = array('usage'); + /***************************************************** * Suchfelder From 697ce3b608622aba11fefe55164ead5631685d33 Mon Sep 17 00:00:00 2001 From: Herman van Rink Date: Sun, 4 Dec 2022 22:53:09 +0100 Subject: [PATCH 038/621] PHP 8 strict fixes, #6419 --- server/lib/classes/letsencrypt.inc.php | 1 + server/plugins-available/apache2_plugin.inc.php | 16 +++++++--------- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/server/lib/classes/letsencrypt.inc.php b/server/lib/classes/letsencrypt.inc.php index 5a69ce18a1..bce4e7b84a 100644 --- a/server/lib/classes/letsencrypt.inc.php +++ b/server/lib/classes/letsencrypt.inc.php @@ -304,6 +304,7 @@ public function get_website_certificate_paths($data) { 'domain' => $domain, 'key' => $ssl_dir.'/'.$domain.'-le.key', 'key2' => $ssl_dir.'/'.$domain.'-le.key.org', + 'csr' => '', # Not used for LE. 'crt' => $ssl_dir.'/'.$domain.'-le.crt', 'bundle' => $ssl_dir.'/'.$domain.'-le.bundle' ); diff --git a/server/plugins-available/apache2_plugin.inc.php b/server/plugins-available/apache2_plugin.inc.php index dcbd8a9b9f..d411cc74dc 100644 --- a/server/plugins-available/apache2_plugin.inc.php +++ b/server/plugins-available/apache2_plugin.inc.php @@ -266,7 +266,7 @@ function ssl($event_name, $data) { // load the server configuration options $app->uses('getconf'); $web_config = $app->getconf->get_server_config($conf['server_id'], 'web'); - if ($web_config['CA_path']!='' && !file_exists($web_config['CA_path'].'/openssl.cnf')) + if (isset($web_config['CA_path']) && $web_config['CA_path'] !='' && !file_exists($web_config['CA_path'].'/openssl.cnf')) $app->log("CA path error, file does not exist:".$web_config['CA_path'].'/openssl.cnf', LOGLEVEL_ERROR); //* Only vhosts can have a ssl cert @@ -1169,7 +1169,7 @@ function update($event_name, $data) { if(!is_dir($web_config['website_basedir'].'/conf')) $app->system->mkdir($web_config['website_basedir'].'/conf'); //* add open_basedir restriction to custom php.ini content, required for suphp only - if(!stristr($data['new']['custom_php_ini'], 'open_basedir') && $data['new']['php'] == 'suphp') { + if(isset($data['new']['custom_php_ini']) && !stristr($data['new']['custom_php_ini'], 'open_basedir') && $data['new']['php'] == 'suphp') { $data['new']['custom_php_ini'] .= "\nopen_basedir = '".$data['new']['php_open_basedir']."'\n"; } @@ -1194,7 +1194,7 @@ function update($event_name, $data) { //* Create custom php.ini # Because of custom default PHP directives from snippet # php.ini custom values order os: 1. general settings 2. Directive Snippets settings 3. custom php.ini settings defined in domain settings - if(trim($data['new']['custom_php_ini']) != '' || $data['new']['directive_snippets_id'] > "0") { + if((isset($data['new']['custom_php_ini']) && trim($data['new']['custom_php_ini']) != '') || $data['new']['directive_snippets_id'] > "0") { $has_custom_php_ini = true; $custom_sendmail_path = false; if(!is_dir($custom_php_ini_dir)) $app->system->mkdirpath($custom_php_ini_dir); @@ -1400,14 +1400,12 @@ function update($event_name, $data) { $server_alias = array(); - // get autoalias - $auto_alias = $web_config['website_autoalias']; - if($auto_alias != '') { + if(isset($web_config['website_autoalias']) && $web_config['website_autoalias'] != '') { // get the client username $client = $app->db->queryOneRecord("SELECT `username` FROM `client` WHERE `client_id` = ?", $client_id); $aa_search = array('[client_id]', '[website_id]', '[client_username]', '[website_domain]'); $aa_replace = array($client_id, $data['new']['domain_id'], $client['username'], $data['new']['domain']); - $auto_alias = str_replace($aa_search, $aa_replace, $auto_alias); + $auto_alias = str_replace($aa_search, $aa_replace, $web_config['website_autoalias']); unset($client); unset($aa_search); unset($aa_replace); @@ -1793,7 +1791,7 @@ function update($event_name, $data) { //if proxy protocol is enabled we need to add a new port to lsiten to if($web_config['vhost_proxy_protocol_enabled'] == 'y' && $data['new']['proxy_protocol'] == 'y'){ - if((int)$web_config['vhost_proxy_protocol_http_port'] > 0) { + if(isset($web_config['vhost_proxy_protocol_http_port']) && (int)$web_config['vhost_proxy_protocol_http_port'] > 0) { $tmp_vhost_arr['port'] = (int)$web_config['vhost_proxy_protocol_http_port']; $tmp_vhost_arr['use_proxy_protocol'] = $data['new']['proxy_protocol']; $vhosts[] = $tmp_vhost_arr; @@ -1942,7 +1940,7 @@ function update($event_name, $data) { unset($ht_file); if(!is_file($data['new']['document_root'].'/web/stats/.htpasswd_stats') || $data['new']['stats_password'] != $data['old']['stats_password']) { - if(trim($data['new']['stats_password']) != '') { + if(isset($data['new']['stats_password']) && trim($data['new']['stats_password']) != '') { $htp_file = 'admin:'.trim($data['new']['stats_password']); $app->system->web_folder_protection($data['new']['document_root'], false); $app->system->file_put_contents($data['new']['document_root'].'/web/stats/.htpasswd_stats', $htp_file); From 2133a9886a45448d63001049b58e1c8f32f693c8 Mon Sep 17 00:00:00 2001 From: Herman van Rink Date: Mon, 5 Dec 2022 21:26:55 +0100 Subject: [PATCH 039/621] Revert unlimited quota check for email, dovecot forces this to be 0. --- interface/web/dashboard/dashlets/templates/mailquota.htm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interface/web/dashboard/dashlets/templates/mailquota.htm b/interface/web/dashboard/dashlets/templates/mailquota.htm index 08834fa5ab..9013c7ac3b 100644 --- a/interface/web/dashboard/dashlets/templates/mailquota.htm +++ b/interface/web/dashboard/dashlets/templates/mailquota.htm @@ -16,7 +16,7 @@ {tmpl_var name='name'} {tmpl_var name='used'} {tmpl_var name='quota'} - {tmpl_if name="quota_raw" op="!=" value="-1"} + {tmpl_if name="quota_raw" op="!=" value="0"}
{tmpl_var name="used_percentage"}% {tmpl_var name='used'} {tmpl_var name='of_txt'} {tmpl_var name='quota'} From da608f7ff4dbcc3dddf8bc86d829496a38661cbc Mon Sep 17 00:00:00 2001 From: Stephan Kellermayr Date: Tue, 6 Dec 2022 15:22:04 +0000 Subject: [PATCH 040/621] Fixed typo. Wrong "subjectAltName" with leading dot when using self-signed certificates. --- server/plugins-available/nginx_plugin.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/plugins-available/nginx_plugin.inc.php b/server/plugins-available/nginx_plugin.inc.php index dd0ad58921..1a4b3336da 100644 --- a/server/plugins-available/nginx_plugin.inc.php +++ b/server/plugins-available/nginx_plugin.inc.php @@ -161,7 +161,7 @@ function ssl($event_name, $data) { subjectAltName = @alt_names [alt_names] - DNS.1 = .$domain"; + DNS.1 = $domain"; $ssl_cnf_file = $ssl_dir.'/openssl.conf'; $app->system->file_put_contents($ssl_cnf_file, $ssl_cnf); From 9648eaa80fbc00214feb570706d33c8b5b423585 Mon Sep 17 00:00:00 2001 From: Herman van Rink Date: Tue, 6 Dec 2022 22:55:46 +0100 Subject: [PATCH 041/621] -1 has no meaning for a mail_user quota, 0==unlimited and default. --- install/sql/incremental/upd_dev_collection.sql | 2 ++ install/sql/ispconfig3.sql | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/install/sql/incremental/upd_dev_collection.sql b/install/sql/incremental/upd_dev_collection.sql index e69de29bb2..c3d8c5b210 100644 --- a/install/sql/incremental/upd_dev_collection.sql +++ b/install/sql/incremental/upd_dev_collection.sql @@ -0,0 +1,2 @@ + +ALTER TABLE `mail_user` CHANGE `quota` `quota` BIGINT(20) NOT NULL DEFAULT '0'; diff --git a/install/sql/ispconfig3.sql b/install/sql/ispconfig3.sql index cf340bda01..e9ed67c86a 100644 --- a/install/sql/ispconfig3.sql +++ b/install/sql/ispconfig3.sql @@ -1070,7 +1070,7 @@ CREATE TABLE `mail_user` ( `gid` int(11) NOT NULL default '5000', `maildir` varchar(255) NOT NULL default '', `maildir_format` varchar(255) NOT NULL default 'maildir', - `quota` bigint(20) NOT NULL default '-1', + `quota` bigint(20) NOT NULL default '0', `cc` text, `forward_in_lda` enum('n','y') NOT NULL default 'n', `sender_cc` varchar(255) NOT NULL default '', From b5b8a5853103f823785b1e32482db682a1deeb46 Mon Sep 17 00:00:00 2001 From: Herman van Rink Date: Tue, 6 Dec 2022 23:03:34 +0100 Subject: [PATCH 042/621] -1 has no meaning for a mail_user quota, 0==unlimited and default. --- interface/web/mail/form/mail_user.tform.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interface/web/mail/form/mail_user.tform.php b/interface/web/mail/form/mail_user.tform.php index 32e58686e2..f513aeb9d3 100644 --- a/interface/web/mail/form/mail_user.tform.php +++ b/interface/web/mail/form/mail_user.tform.php @@ -166,7 +166,7 @@ 'regex' => '/^([0-9]{1,})$/', 'errmsg'=> 'quota_error_value'), ), - 'default' => '-1', + 'default' => '0', 'value' => '', 'width' => '30', 'maxlength' => '255' From 9ab8755e5df03081868a7c9ff875ad9484713e2d Mon Sep 17 00:00:00 2001 From: Till Brehm Date: Wed, 7 Dec 2022 09:12:30 +0000 Subject: [PATCH 043/621] Update backup.inc.php fixed syntax error in log function in older PHP versions --- server/lib/classes/backup.inc.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/server/lib/classes/backup.inc.php b/server/lib/classes/backup.inc.php index 2b6d21e57e..46618e2278 100644 --- a/server/lib/classes/backup.inc.php +++ b/server/lib/classes/backup.inc.php @@ -1076,11 +1076,10 @@ protected static function getReposArchives($backup_mode, $repos_path, $password, { global $app; if ( ! is_dir($repos_path)) { + $dbt = debug_backtrace(); + $dbt_info = $dbt[1]['file'] . ':' . $dbt[1]['line']; $app->log("Unknown path " . var_export($repos_path, TRUE) - . ' called from ' . (function() { - $dbt = debug_backtrace(); - return $dbt[1]['file'] . ':' . $dbt[1]['line']; - })(), LOGLEVEL_ERROR); + . ' called from ' . $dbt_info, LOGLEVEL_ERROR); return FALSE; } switch ($backup_mode) { From cc39cc617a6303826962d05d74598af844aae54e Mon Sep 17 00:00:00 2001 From: Krzysztof Baranowski Date: Wed, 14 Dec 2022 17:50:49 +0000 Subject: [PATCH 044/621] Update 300-quota_notify.inc.php Add all clients to array, use data when needed. --- .../classes/cron.d/300-quota_notify.inc.php | 75 ++++++++++--------- 1 file changed, 40 insertions(+), 35 deletions(-) diff --git a/server/lib/classes/cron.d/300-quota_notify.inc.php b/server/lib/classes/cron.d/300-quota_notify.inc.php index 08cd283ef7..2d8ddc5b86 100644 --- a/server/lib/classes/cron.d/300-quota_notify.inc.php +++ b/server/lib/classes/cron.d/300-quota_notify.inc.php @@ -57,11 +57,18 @@ public function onRunJob() { $web_config = $app->getconf->get_server_config($conf['server_id'], 'web'); - // Get client email and eventual reseller email - $client_group_id = $rec["sys_groupid"]; - $client = $app->db->queryOneRecord("SELECT client.email, client.parent_client_id FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = ?", $client_group_id); - if($client['parent_client_id'] > 0) { - $reseller = $app->db->queryOneRecord("SELECT email FROM client WHERE client_id = ?", $client['parent_client_id']); + // Get client email and eventual reseller email in array + $clients = []; + $sql = "SELECT client.email,client.parent_client_id, sys_group.groupid FROM sys_group, client WHERE sys_group.client_id = client.client_id"; + $records = $app->db->queryAllRecords($sql); + if(is_array($records)) { + foreach($records as $rec) { + $reseller = ($rec['parent_client_id'] > 0) ? $app->db->queryOneRecord("SELECT email FROM client WHERE client_id = ?", $rec['parent_client_id']) : ''; + $clients[$rec['groupid']] = [ + 'email' => $rec['email'], + 'reseller' => $reseller + ]; + } } //###################################################################################################### @@ -114,15 +121,15 @@ public function onRunJob() { //* Send email to reseller if($web_config['overtraffic_notify_reseller'] == 'y') { - if($reseller['email'] != '') { - $recipients[] = $reseller['email']; + if($clients[$rec['sys_groupid']]['reseller'] != '') { + $recipients[] = $clients[$rec['sys_groupid']]['reseller']; } } //* Send email to client if($web_config['overtraffic_notify_client'] == 'y') { - if($client['email'] != '') { - $recipients[] = $client['email']; + if($clients[$rec['sys_groupid']]['email'] != '') { + $recipients[] = $clients[$rec['sys_groupid']]['email']; } } @@ -245,15 +252,15 @@ public function onRunJob() { //* Send email to reseller if($web_config['overquota_notify_reseller'] == 'y') { - if($reseller['email'] != '') { - $recipients[] = $reseller['email']; + if($clients[$rec['sys_groupid']]['reseller'] != '') { + $recipients[] = $clients[$rec['sys_groupid']]['reseller']; } } //* Send email to client if($web_config['overquota_notify_client'] == 'y') { - if($client['email'] != '') { - $recipients[] = $client['email']; + if($clients[$rec['sys_groupid']]['email'] != '') { + $recipients[] = $clients[$rec['sys_groupid']]['email']; } } $this->_tools->send_notification_email('web_quota_ok_notification', $placeholders, $recipients); @@ -285,15 +292,15 @@ public function onRunJob() { //* Send email to reseller if($web_config['overquota_notify_reseller'] == 'y') { - if($reseller['email'] != '') { - $recipients[] = $reseller['email']; + if($clients[$rec['sys_groupid']]['reseller'] != '') { + $recipients[] = $clients[$rec['sys_groupid']]['reseller']; } } //* Send email to client if($web_config['overquota_notify_client'] == 'y') { - if($client['email'] != '') { - $recipients[] = $client['email']; + if($clients[$rec['sys_groupid']]['email'] != '') { + $recipients[] = $clients[$rec['sys_groupid']]['email']; } } $this->_tools->send_notification_email('web_quota_notification', $placeholders, $recipients); @@ -383,15 +390,15 @@ public function onRunJob() { //* Send email to reseller if($web_config['overquota_notify_reseller'] == 'y') { - if($reseller['email'] != '') { - $recipients[] = $reseller['email']; + if($clients[$rec['sys_groupid']]['reseller'] != '') { + $recipients[] = $clients[$rec['sys_groupid']]['reseller']; } } //* Send email to client if($mail_config['overquota_notify_client'] == 'y') { - if($client['email'] != '') { - $recipients[] = $client['email']; + if($clients[$rec['sys_groupid']]['email'] != '') { + $recipients[] = $clients[$rec['sys_groupid']]['email']; } } @@ -423,15 +430,15 @@ public function onRunJob() { //* Send email to reseller if($web_config['overquota_notify_reseller'] == 'y') { - if($reseller['email'] != '') { - $recipients[] = $reseller['email']; + if($clients[$rec['sys_groupid']]['reseller'] != '') { + $recipients[] = $clients[$rec['sys_groupid']]['reseller']; } } //* Send email to client if($mail_config['overquota_notify_client'] == 'y') { - if($client['email'] != '') { - $recipients[] = $client['email']; + if($clients[$rec['sys_groupid']]['email'] != '') { + $recipients[] = $clients[$rec['sys_groupid']]['email']; } } @@ -512,15 +519,15 @@ public function onRunJob() { //* Send email to reseller if($web_config['overquota_db_notify_reseller'] == 'y') { - if($reseller['email'] != '') { - $recipients[] = $reseller['email']; + if($clients[$rec['sys_groupid']]['reseller'] != '') { + $recipients[] = $clients[$rec['sys_groupid']]['reseller']; } } //* Send email to client if($web_config['overquota_db_notify_client'] == 'y') { - if($client['email'] != '') { - $recipients[] = $client['email']; + if($clients[$rec['sys_groupid']]['email'] != '') { + $recipients[] = $clients[$rec['sys_groupid']]['email']; } } $this->_tools->send_notification_email('db_quota_notification', $placeholders, $recipients); @@ -550,19 +557,17 @@ public function onRunJob() { //* Send email to reseller if($web_config['overquota_db_notify_reseller'] == 'y') { - if($reseller['email'] != '') { - $recipients[] = $reseller['email']; + if($clients[$rec['sys_groupid']]['reseller'] != '') { + $recipients[] = $clients[$rec['sys_groupid']]['reseller']; } } //* Send email to client if($mail_config['overquota_notify_client'] == 'y') { - if($client['email'] != '') { - $recipients[] = $client['email']; + if($clients[$rec['sys_groupid']]['email'] != '') { + $recipients[] = $clients[$rec['sys_groupid']]['email']; } } - - $this->_tools->send_notification_email('db_quota_ok_notification', $placeholders, $recipients); } From 17629b613c5209a6ad647dff644314b3a8fe3fa3 Mon Sep 17 00:00:00 2001 From: Till Brehm Date: Fri, 16 Dec 2022 16:01:10 +0000 Subject: [PATCH 045/621] Update interface/web/sites/database_edit.php --- interface/web/sites/database_edit.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/interface/web/sites/database_edit.php b/interface/web/sites/database_edit.php index 60b26bc767..55c582eeda 100644 --- a/interface/web/sites/database_edit.php +++ b/interface/web/sites/database_edit.php @@ -369,7 +369,7 @@ function onBeforeUpdate() { } else { $remote_ips = explode(",", $global_config['default_remote_dbserver']); } - if (!in_array($server_config['ip_address'], $default_remote_db)) { $remote_ips[] = $server_config['ip_address']; } + if (!in_array($server_config['ip_address'], $remote_ips)) { $remote_ips[] = $server_config['ip_address']; } if($server_config['ip_address']!='') { if($this->dataRecord['remote_access'] != 'y'){ @@ -459,7 +459,7 @@ function onBeforeInsert() { $remote_ips = explode(",", $global_config['default_remote_dbserver']); } - if (!in_array($server_config['ip_address'], $default_remote_db)) { $remote_ips[] = $server_config['ip_address']; } + if (!in_array($server_config['ip_address'], $remote_ips)) { $remote_ips[] = $server_config['ip_address']; } if($server_config['ip_address']!='') { if($this->dataRecord['remote_access'] != 'y'){ From a5845b137f32b9f5abe3baf435794af5aaf9b7ce Mon Sep 17 00:00:00 2001 From: Dimitri Date: Fri, 16 Dec 2022 22:29:13 +0000 Subject: [PATCH 046/621] fixes #6431 // make sure config file is deleted only during spamfilter_user event. --- server/plugins-available/rspamd_plugin.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/plugins-available/rspamd_plugin.inc.php b/server/plugins-available/rspamd_plugin.inc.php index 112020deb7..a5ffb237b1 100644 --- a/server/plugins-available/rspamd_plugin.inc.php +++ b/server/plugins-available/rspamd_plugin.inc.php @@ -281,7 +281,7 @@ function user_settings_update($event_name, $data, $internal = false) { $app->system->mkdirpath($this->users_config_dir); } - if((!$this->isValidEmail($app->functions->idn_encode($email_address))) || intval($data['new']['policy_id']) == 0) { + if((!$this->isValidEmail($app->functions->idn_encode($email_address))) || intval($data['new']['policy_id']) == 0 && $type == 'spamfilter_user') { if(is_file($settings_file)) { unlink($settings_file); } From 14032d8876fd44fc37897cbfa61afe524e3b8996 Mon Sep 17 00:00:00 2001 From: Dimitri Date: Fri, 16 Dec 2022 23:20:06 +0000 Subject: [PATCH 047/621] Revert "Merge branch '6431-rspamd-user-config-deleted-on-mail-user-changes' into 'develop'" This reverts merge request !1 --- server/plugins-available/rspamd_plugin.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/plugins-available/rspamd_plugin.inc.php b/server/plugins-available/rspamd_plugin.inc.php index a5ffb237b1..112020deb7 100644 --- a/server/plugins-available/rspamd_plugin.inc.php +++ b/server/plugins-available/rspamd_plugin.inc.php @@ -281,7 +281,7 @@ function user_settings_update($event_name, $data, $internal = false) { $app->system->mkdirpath($this->users_config_dir); } - if((!$this->isValidEmail($app->functions->idn_encode($email_address))) || intval($data['new']['policy_id']) == 0 && $type == 'spamfilter_user') { + if((!$this->isValidEmail($app->functions->idn_encode($email_address))) || intval($data['new']['policy_id']) == 0) { if(is_file($settings_file)) { unlink($settings_file); } From ace15083a35484e2ce025135960226fa2d8461a1 Mon Sep 17 00:00:00 2001 From: Dimitri Date: Fri, 16 Dec 2022 23:23:09 +0000 Subject: [PATCH 048/621] fixes #6431 // make sure config file is deleted only during spamfilter_user event. --- server/plugins-available/rspamd_plugin.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/plugins-available/rspamd_plugin.inc.php b/server/plugins-available/rspamd_plugin.inc.php index 112020deb7..a5ffb237b1 100644 --- a/server/plugins-available/rspamd_plugin.inc.php +++ b/server/plugins-available/rspamd_plugin.inc.php @@ -281,7 +281,7 @@ function user_settings_update($event_name, $data, $internal = false) { $app->system->mkdirpath($this->users_config_dir); } - if((!$this->isValidEmail($app->functions->idn_encode($email_address))) || intval($data['new']['policy_id']) == 0) { + if((!$this->isValidEmail($app->functions->idn_encode($email_address))) || intval($data['new']['policy_id']) == 0 && $type == 'spamfilter_user') { if(is_file($settings_file)) { unlink($settings_file); } From 4d2b2f5d1c870af97d396206187bd67eb668644a Mon Sep 17 00:00:00 2001 From: Webslice Date: Thu, 22 Dec 2022 09:43:56 +0100 Subject: [PATCH 049/621] Use PHP from path in server.sh --- server/server.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/server.sh b/server/server.sh index 9c92a868b0..3956d05b8b 100755 --- a/server/server.sh +++ b/server/server.sh @@ -15,14 +15,14 @@ if [ -f /usr/local/ispconfig/server/lib/php.ini ]; then fi cd /usr/local/ispconfig/server -/usr/bin/php -q \ +$(which php) -q \ -d disable_classes= \ -d disable_functions= \ -d open_basedir= \ /usr/local/ispconfig/server/server.php cd /usr/local/ispconfig/security -/usr/bin/php -q \ +$(which php) -q \ -d disable_classes= \ -d disable_functions= \ -d open_basedir= \ From e042d3ea8e81e6ca1f55512b77014bd65d474685 Mon Sep 17 00:00:00 2001 From: Herman van Rink Date: Fri, 23 Dec 2022 21:53:31 +0100 Subject: [PATCH 050/621] Avoid a warning is the dir does not exist --- server/plugins-available/mail_plugin.inc.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/plugins-available/mail_plugin.inc.php b/server/plugins-available/mail_plugin.inc.php index 53836a1392..08439fe798 100644 --- a/server/plugins-available/mail_plugin.inc.php +++ b/server/plugins-available/mail_plugin.inc.php @@ -429,7 +429,7 @@ function user_delete($event_name, $data) { $maildir_path_deleted = false; $old_maildir_path = $data['old']['maildir']; if($old_maildir_path != $mail_config['homedir_path'] && strlen($old_maildir_path) > strlen($mail_config['homedir_path']) && !stristr($old_maildir_path, '//') && !stristr($old_maildir_path, '..') && !stristr($old_maildir_path, '*') && strlen($old_maildir_path) >= 10) { - if ($mail_config['mailbox_soft_delete'] == 'y') { + if ($mail_config['mailbox_soft_delete'] == 'y' && is_dir($old_maildir_path)) { // Move it, adding a date based suffix. A cronjob should purge or archive. $thrash_maildir_path = $old_maildir_path . '-deleted-' . date("YmdHis"); $app->system->exec_safe('mv ? ?', $old_maildir_path, $thrash_maildir_path); @@ -484,7 +484,7 @@ function domain_delete($event_name, $data) { //* Delete maildomain path $old_maildomain_path = $mail_config['homedir_path'].'/'.$data['old']['domain']; if($old_maildomain_path != $mail_config['homedir_path'] && !stristr($old_maildomain_path, '//') && !stristr($old_maildomain_path, '..') && !stristr($old_maildomain_path, '*') && !stristr($old_maildomain_path, '&') && strlen($old_maildomain_path) >= 10 && !empty($data['old']['domain'])) { - if ($mail_config['mailbox_soft_delete'] == 'y') { + if ($mail_config['mailbox_soft_delete'] == 'y' && is_dir($old_maildomain_path)) { // Move it, adding a date based suffix. A cronjob should purge or archive. $thrash_maildomain_path = $old_maildomain_path . '-deleted-' . date("YmdHis"); $app->system->exec_safe('mv ? ?', $old_maildomain_path, $thrash_maildomain_path); From 667212e8d07b94f652c3b032aaf270b66d0d2785 Mon Sep 17 00:00:00 2001 From: Herman van Rink Date: Sat, 24 Dec 2022 23:37:17 +0100 Subject: [PATCH 051/621] Fix stale i character, #6434 --- interface/web/mail/templates/mail_user_mailbox_edit.htm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interface/web/mail/templates/mail_user_mailbox_edit.htm b/interface/web/mail/templates/mail_user_mailbox_edit.htm index 4b47b9ecc5..4bc77ac74d 100644 --- a/interface/web/mail/templates/mail_user_mailbox_edit.htm +++ b/interface/web/mail/templates/mail_user_mailbox_edit.htm @@ -12,7 +12,7 @@
From 093ad5040724af8e3ee4ba6be4e0565c4a9c5c5b Mon Sep 17 00:00:00 2001 From: Herman van Rink Date: Sun, 17 Apr 2022 22:51:55 +0200 Subject: [PATCH 052/621] Extra api example usage --- remoting_client/examples/sites_web_domain_get.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/remoting_client/examples/sites_web_domain_get.php b/remoting_client/examples/sites_web_domain_get.php index 7f5b22f6ac..47fe8cbd44 100644 --- a/remoting_client/examples/sites_web_domain_get.php +++ b/remoting_client/examples/sites_web_domain_get.php @@ -16,9 +16,14 @@ //* Set the function parameters. $domain_id = 2; + $domain_name = 'example.com'; + // Lookup by ID. $domain_record = $client->sites_web_domain_get($session_id, $domain_id); + // Lookup by name. + $domain_record = $client->sites_web_domain_get($session_id, array('domain' => $domain_name)); + print_r($domain_record); if($client->logout($session_id)) { From f9f235c1a9aaf8522959f22ac94084b3f87c5ca4 Mon Sep 17 00:00:00 2001 From: Herman van Rink Date: Sun, 24 Apr 2022 21:28:09 +0200 Subject: [PATCH 053/621] Fix comment + linewrap --- interface/lib/classes/db_mysql.inc.php | 7 ++++--- server/lib/classes/db_mysql.inc.php | 7 ++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/interface/lib/classes/db_mysql.inc.php b/interface/lib/classes/db_mysql.inc.php index 78eee8c997..6258b20f4d 100644 --- a/interface/lib/classes/db_mysql.inc.php +++ b/interface/lib/classes/db_mysql.inc.php @@ -825,12 +825,13 @@ public function datalogDelete($tablename, $index_field, $index_value) { return true; } - //** Deletes a record and saves the changes into the datalog + // Updates a datalog record to store an error state. public function datalogError($errormsg) { global $app; - if(isset($app->modules->current_datalog_id) && $app->modules->current_datalog_id > 0) $this->query("UPDATE sys_datalog set error = ? WHERE datalog_id = ?", $errormsg, $app->modules->current_datalog_id); - + if(isset($app->modules->current_datalog_id) && $app->modules->current_datalog_id > 0) { + $this->query("UPDATE sys_datalog set error = ? WHERE datalog_id = ?", $errormsg, $app->modules->current_datalog_id); + } return true; } diff --git a/server/lib/classes/db_mysql.inc.php b/server/lib/classes/db_mysql.inc.php index 3096a5b062..f2299de343 100644 --- a/server/lib/classes/db_mysql.inc.php +++ b/server/lib/classes/db_mysql.inc.php @@ -825,12 +825,13 @@ public function datalogDelete($tablename, $index_field, $index_value) { return true; } - //** Deletes a record and saves the changes into the datalog + // Updates a datalog record to store an error state. public function datalogError($errormsg) { global $app; - if(isset($app->modules->current_datalog_id) && $app->modules->current_datalog_id > 0) $this->query("UPDATE sys_datalog set error = ? WHERE datalog_id = ?", $errormsg, $app->modules->current_datalog_id); - + if(isset($app->modules->current_datalog_id) && $app->modules->current_datalog_id > 0) { + $this->query("UPDATE sys_datalog set error = ? WHERE datalog_id = ?", $errormsg, $app->modules->current_datalog_id); + } return true; } From 614e7bd65c002819ed2117fd1294927ca6397742 Mon Sep 17 00:00:00 2001 From: Herman van Rink Date: Thu, 26 May 2022 22:22:19 +0200 Subject: [PATCH 054/621] Indent for readability --- interface/lib/classes/db_mysql.inc.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/interface/lib/classes/db_mysql.inc.php b/interface/lib/classes/db_mysql.inc.php index 6258b20f4d..9ae929136b 100644 --- a/interface/lib/classes/db_mysql.inc.php +++ b/interface/lib/classes/db_mysql.inc.php @@ -845,7 +845,11 @@ public function datalogStatus($login = '') { $login = $_SESSION['s']['user']['username']; } - $result = $this->queryAllRecords("SELECT COUNT( * ) AS cnt, sys_datalog.action, sys_datalog.dbtable FROM sys_datalog, server WHERE server.server_id = sys_datalog.server_id AND sys_datalog.user = ? AND sys_datalog.datalog_id > server.updated GROUP BY sys_datalog.dbtable, sys_datalog.action", $login); + $result = $this->queryAllRecords("SELECT COUNT( * ) AS cnt, sys_datalog.action, sys_datalog.dbtable + FROM sys_datalog, server + WHERE server.server_id = sys_datalog.server_id AND sys_datalog.user = ? AND sys_datalog.datalog_id > server.updated + GROUP BY sys_datalog.dbtable, sys_datalog.action", + $login); foreach($result as $row) { if(!$row['dbtable'] || in_array($row['dbtable'], array('aps_instances', 'aps_instances_settings', 'mail_access', 'mail_content_filter'))) continue; // ignore some entries, maybe more to come $return['entries'][] = array('table' => $row['dbtable'], 'action' => $row['action'], 'count' => $row['cnt'], 'text' => $app->lng('datalog_status_' . $row['action'] . '_' . $row['dbtable'])); $return['count'] += $row['cnt']; From 8be92ac9206d689b842692cde7e3cb9f4e70f533 Mon Sep 17 00:00:00 2001 From: Herman van Rink Date: Tue, 29 Nov 2022 23:23:48 +0100 Subject: [PATCH 055/621] fix typo --- docs/autoinstall_samples/autoinstall.conf_sample.php | 2 +- docs/autoinstall_samples/autoinstall.ini.sample | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/autoinstall_samples/autoinstall.conf_sample.php b/docs/autoinstall_samples/autoinstall.conf_sample.php index c8bf209f9f..c8c374e4f0 100644 --- a/docs/autoinstall_samples/autoinstall.conf_sample.php +++ b/docs/autoinstall_samples/autoinstall.conf_sample.php @@ -61,7 +61,7 @@ $autoupdate['ispconfig_postfix_ssl_symlink'] = 'y'; $autoupdate['ispconfig_pureftpd_ssl_symlink'] = 'y'; -/* These are for service-detection (defaulting to old behaviour where alle changes were automatically accepted) */ +/* These are for service-detection (defaulting to old behaviour where all changes were automatically accepted) */ $autoupdate['svc_detect_change_mail_server'] = 'yes'; // yes (default), no $autoupdate['svc_detect_change_web_server'] = 'yes'; // yes (default), no $autoupdate['svc_detect_change_dns_server'] = 'yes'; // yes (default), no diff --git a/docs/autoinstall_samples/autoinstall.ini.sample b/docs/autoinstall_samples/autoinstall.ini.sample index bf47122074..9251d1eef0 100644 --- a/docs/autoinstall_samples/autoinstall.ini.sample +++ b/docs/autoinstall_samples/autoinstall.ini.sample @@ -60,7 +60,7 @@ ignore_hostname_dns=n ispconfig_postfix_ssl_symlink=y ispconfig_pureftpd_ssl_symlink=y -; These are for service-detection (defaulting to old behaviour where alle changes were automatically accepted) +; These are for service-detection (defaulting to old behaviour where all changes were automatically accepted) svc_detect_change_mail_server=yes svc_detect_change_web_server=yes svc_detect_change_dns_server=yes From 996a7d719f7a9ddaa4703584cea980e418cc3cdc Mon Sep 17 00:00:00 2001 From: Herman van Rink Date: Sun, 25 Dec 2022 19:17:08 +0100 Subject: [PATCH 056/621] Extend ignore file for vscode --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index c49a12edc1..ef9abd3d60 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ .idea /nbproject/private/ +.vscode .phplint-cache *.swp From a8d78f68d8b882a153b555e1207c2ca3004ba9f3 Mon Sep 17 00:00:00 2001 From: Herman van Rink Date: Sun, 25 Dec 2022 21:30:38 +0100 Subject: [PATCH 057/621] Move asking to sql root to the place where its needed, --- install/update.php | 53 ++++++++++++++++++++++++++-------------------- 1 file changed, 30 insertions(+), 23 deletions(-) diff --git a/install/update.php b/install/update.php index 37a0919999..d0b63d8605 100644 --- a/install/update.php +++ b/install/update.php @@ -276,33 +276,11 @@ //* initialize the master DB, if we have a multiserver setup if($conf['mysql']['master_slave_setup'] == 'y') { - //** Get MySQL root credentials - $finished = false; - do { - $tmp_mysql_server_host = $inst->free_query('MySQL master server hostname', $conf['mysql']['master_host'],'mysql_master_hostname'); - $tmp_mysql_server_port = $inst->free_query('MySQL master server port', $conf['mysql']['master_port'],'mysql_master_port'); - $tmp_mysql_server_admin_user = $inst->free_query('MySQL master server root username', $conf['mysql']['master_admin_user'],'mysql_master_root_user'); - $tmp_mysql_server_admin_password = $inst->free_query('MySQL master server root password', $conf['mysql']['master_admin_password'],'mysql_master_root_password'); - $tmp_mysql_server_database = $inst->free_query('MySQL master server database name', $conf['mysql']['master_database'],'mysql_master_database'); - - //* Initialize the MySQL server connection - if(@mysqli_connect($tmp_mysql_server_host, $tmp_mysql_server_admin_user, $tmp_mysql_server_admin_password, $tmp_mysql_server_database, (int)$tmp_mysql_server_port)) { - $conf['mysql']['master_host'] = $tmp_mysql_server_host; - $conf['mysql']['master_port'] = $tmp_mysql_server_port; - $conf['mysql']['master_admin_user'] = $tmp_mysql_server_admin_user; - $conf['mysql']['master_admin_password'] = $tmp_mysql_server_admin_password; - $conf['mysql']['master_database'] = $tmp_mysql_server_database; - $finished = true; - } else { - swriteln($inst->lng('Unable to connect to mysql server').' '.mysqli_connect_error()); - } - } while ($finished == false); - unset($finished); // initialize the connection to the master database $inst->dbmaster = new db(); if($inst->dbmaster->linkId) $inst->dbmaster->closeConn(); - $inst->dbmaster->setDBData($conf['mysql']["master_host"], $conf['mysql']["master_admin_user"], $conf['mysql']["master_admin_password"], $conf['mysql']["master_port"]); + $inst->dbmaster->setDBData($conf['mysql']["master_host"], $conf['mysql']["master_ispconfig_user"], $conf['mysql']["master_ispconfig_password"], $conf['mysql']["master_port"]); $inst->dbmaster->setDBName($conf['mysql']["master_database"]); } else { $inst->dbmaster = $inst->db; @@ -349,6 +327,35 @@ $reconfigure_master_database_rights_answer = $inst->simple_query('Reconfigure Permissions in master database?', array('yes', 'no'), 'no','reconfigure_permissions_in_master_database'); if($reconfigure_master_database_rights_answer == 'yes') { + //** Get MySQL root credentials, to upgrade the dbmaster connection. + $finished = false; + do { + $tmp_mysql_server_host = $inst->free_query('MySQL master server hostname', $conf['mysql']['master_host'],'mysql_master_hostname'); + $tmp_mysql_server_port = $inst->free_query('MySQL master server port', $conf['mysql']['master_port'],'mysql_master_port'); + $tmp_mysql_server_admin_user = $inst->free_query('MySQL master server root username', $conf['mysql']['master_admin_user'],'mysql_master_root_user'); + $tmp_mysql_server_admin_password = $inst->free_query('MySQL master server root password', $conf['mysql']['master_admin_password'],'mysql_master_root_password'); + $tmp_mysql_server_database = $inst->free_query('MySQL master server database name', $conf['mysql']['master_database'],'mysql_master_database'); + + //* Initialize the MySQL server connection + if(@mysqli_connect($tmp_mysql_server_host, $tmp_mysql_server_admin_user, $tmp_mysql_server_admin_password, $tmp_mysql_server_database, (int)$tmp_mysql_server_port)) { + $conf['mysql']['master_host'] = $tmp_mysql_server_host; + $conf['mysql']['master_port'] = $tmp_mysql_server_port; + $conf['mysql']['master_admin_user'] = $tmp_mysql_server_admin_user; + $conf['mysql']['master_admin_password'] = $tmp_mysql_server_admin_password; + $conf['mysql']['master_database'] = $tmp_mysql_server_database; + $finished = true; + } else { + swriteln($inst->lng('Unable to connect to mysql server').' '.mysqli_connect_error()); + } + } while ($finished == false); + unset($finished); + + // initialize the connection to the master database + $inst->dbmaster = new db(); + if($inst->dbmaster->linkId) $inst->dbmaster->closeConn(); + $inst->dbmaster->setDBData($conf['mysql']["master_host"], $conf['mysql']["master_admin_user"], $conf['mysql']["master_admin_password"], $conf['mysql']["master_port"]); + $inst->dbmaster->setDBName($conf['mysql']["master_database"]); + $inst->grant_master_database_rights(); } //} From f5defafcfb8fb5d771c62d9d0ad244ba9e6f82ce Mon Sep 17 00:00:00 2001 From: Herman van Rink Date: Sun, 25 Dec 2022 22:42:20 +0100 Subject: [PATCH 058/621] Default to the records tab for found dns zones, #6436 --- interface/web/capp.php | 2 +- interface/web/dashboard/ajax_get_json.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/interface/web/capp.php b/interface/web/capp.php index 71d3d9ba35..462f775f76 100644 --- a/interface/web/capp.php +++ b/interface/web/capp.php @@ -45,7 +45,7 @@ } if (!preg_match("/^[a-z]{2,20}$/i", $mod)) die('module name contains unallowed chars.'); -if ($redirect != '' && !preg_match("/^[a-z0-9]+\/[a-z0-9_\.\-]+\?id=[0-9]{1,9}(\&type=[a-z0-9_\.\-]+)?$/i", $redirect)) die('redirect contains unallowed chars.'); +if ($redirect != '' && !preg_match("/^[a-z0-9]+\/[a-z0-9_\.\-]+\?id=[0-9]{1,9}(\&type=[a-z0-9_\.\-]+)?(\&next_tab=[a-z0-9_\.\-]+)?$/i", $redirect)) die('redirect contains unallowed chars.'); //* Check if user may use the module. $user_modules = explode(",", $_SESSION["s"]["user"]["modules"]); diff --git a/interface/web/dashboard/ajax_get_json.php b/interface/web/dashboard/ajax_get_json.php index 76f284352b..4c6612888d 100644 --- a/interface/web/dashboard/ajax_get_json.php +++ b/interface/web/dashboard/ajax_get_json.php @@ -109,7 +109,7 @@ $result[] = _search('mail', 'mail_get'); // dns zones - $result[] = _search('dns', 'dns_soa'); + $result[] = _search('dns', 'dns_soa', '', 'next_tab=dns_records'); // secondary dns zones $result[] = _search('dns', 'dns_slave'); From bb0880560339d825ad586de28d8d03c2a5020125 Mon Sep 17 00:00:00 2001 From: Herman van Rink Date: Mon, 26 Dec 2022 10:36:40 +0100 Subject: [PATCH 059/621] an before a vowel --- interface/web/dns/lib/lang/ar_dns_slave.lng | 2 +- interface/web/dns/lib/lang/ar_dns_soa.lng | 2 +- interface/web/dns/lib/lang/bg_dns_soa.lng | 2 +- interface/web/dns/lib/lang/en_dns_slave.lng | 2 +- interface/web/dns/lib/lang/en_dns_soa.lng | 2 +- interface/web/dns/lib/lang/fi_dns_slave.lng | 2 +- interface/web/dns/lib/lang/hu_dns_slave.lng | 2 +- interface/web/dns/lib/lang/hu_dns_soa.lng | 2 +- interface/web/dns/lib/lang/ja_dns_slave.lng | 2 +- interface/web/dns/lib/lang/pt_dns_slave.lng | 2 +- interface/web/dns/lib/lang/ro_dns_slave.lng | 2 +- interface/web/dns/lib/lang/se_dns_slave.lng | 2 +- interface/web/dns/lib/lang/sk_dns_slave.lng | 2 +- 13 files changed, 13 insertions(+), 13 deletions(-) diff --git a/interface/web/dns/lib/lang/ar_dns_slave.lng b/interface/web/dns/lib/lang/ar_dns_slave.lng index 416e3d6e72..9e8aaa17f9 100644 --- a/interface/web/dns/lib/lang/ar_dns_slave.lng +++ b/interface/web/dns/lib/lang/ar_dns_slave.lng @@ -9,7 +9,7 @@ $wb['xfer_txt'] = 'Allow zone transfers to
these IPs (comma separated list $wb['server_id_error_empty'] = 'No server selected'; $wb['origin_error_empty'] = 'Zone empty.'; $wb['origin_error_unique'] = 'There is already a record for this zone.'; -$wb['origin_error_regex'] = 'Zone has a invalid format.'; +$wb['origin_error_regex'] = 'Zone has an invalid format.'; $wb['ns_error_regex'] = 'NS has a invalid format.'; $wb['eg_domain_tld'] = 'e.g. domain.tld.'; $wb['ipv4_form_txt'] = 'Separate multiple IPs with commas'; diff --git a/interface/web/dns/lib/lang/ar_dns_soa.lng b/interface/web/dns/lib/lang/ar_dns_soa.lng index 4333c3793a..ae2e022195 100644 --- a/interface/web/dns/lib/lang/ar_dns_soa.lng +++ b/interface/web/dns/lib/lang/ar_dns_soa.lng @@ -17,7 +17,7 @@ $wb['no_zone_perm'] = 'You do not have the permission to add a record to this DN $wb['server_id_error_empty'] = 'No server selected'; $wb['origin_error_empty'] = 'Zone empty.'; $wb['origin_error_unique'] = 'There is already a record for this zone.'; -$wb['origin_error_regex'] = 'Zone has a invalid format.'; +$wb['origin_error_regex'] = 'Zone has an invalid format.'; $wb['ns_error_regex'] = 'NS has a invalid format.'; $wb['mbox_error_empty'] = 'Email is empty.'; $wb['mbox_error_regex'] = 'Email format invalid.'; diff --git a/interface/web/dns/lib/lang/bg_dns_soa.lng b/interface/web/dns/lib/lang/bg_dns_soa.lng index c1e57edf8b..9e75200a63 100644 --- a/interface/web/dns/lib/lang/bg_dns_soa.lng +++ b/interface/web/dns/lib/lang/bg_dns_soa.lng @@ -17,7 +17,7 @@ $wb['no_zone_perm'] = 'Вие намате права да добавяте за $wb['server_id_error_empty'] = 'Няма избран сървър'; $wb['origin_error_empty'] = 'Зоната е празна.'; $wb['origin_error_unique'] = 'Вече има такъв запис в тази зона.'; -$wb['origin_error_regex'] = 'Zone has a invalid format.'; +$wb['origin_error_regex'] = 'Zone has an invalid format.'; $wb['ns_error_regex'] = 'NS запис ае в грешен формат.'; $wb['mbox_error_empty'] = 'Полето с емайл е празно.'; $wb['mbox_error_regex'] = 'Полето е емайл е в грешен формат.'; diff --git a/interface/web/dns/lib/lang/en_dns_slave.lng b/interface/web/dns/lib/lang/en_dns_slave.lng index 4de10b2769..3cc0aec72c 100644 --- a/interface/web/dns/lib/lang/en_dns_slave.lng +++ b/interface/web/dns/lib/lang/en_dns_slave.lng @@ -10,7 +10,7 @@ $wb['xfer_txt'] = 'Allow zone transfers to
these IPs (comma separated list $wb['server_id_error_empty'] = 'No server selected'; $wb['origin_error_empty'] = 'Zone empty.'; $wb['origin_error_unique'] = 'There is already a record for this zone.'; -$wb['origin_error_regex'] = 'Zone has a invalid format.'; +$wb['origin_error_regex'] = 'Zone has an invalid format.'; $wb['ns_error_regex'] = 'NS has a invalid format.'; $wb['eg_domain_tld'] = 'e.g. domain.tld.'; $wb['ipv4_form_txt'] = 'Separate multiple IPs with commas'; diff --git a/interface/web/dns/lib/lang/en_dns_soa.lng b/interface/web/dns/lib/lang/en_dns_soa.lng index a5f1adfae5..95a007fcd6 100644 --- a/interface/web/dns/lib/lang/en_dns_soa.lng +++ b/interface/web/dns/lib/lang/en_dns_soa.lng @@ -20,7 +20,7 @@ $wb['no_zone_perm'] = 'You do not have the permission to add a record to this DN $wb['server_id_error_empty'] = 'No server selected'; $wb['origin_error_empty'] = 'Zone empty.'; $wb['origin_error_unique'] = 'There is already a record for this zone.'; -$wb['origin_error_regex'] = 'Zone has a invalid format.'; +$wb['origin_error_regex'] = 'Zone has an invalid format.'; $wb['ns_error_regex'] = 'NS has a invalid format.'; $wb['mbox_error_empty'] = 'Email is empty.'; $wb['mbox_error_regex'] = 'Email format invalid.'; diff --git a/interface/web/dns/lib/lang/fi_dns_slave.lng b/interface/web/dns/lib/lang/fi_dns_slave.lng index 416e3d6e72..9e8aaa17f9 100644 --- a/interface/web/dns/lib/lang/fi_dns_slave.lng +++ b/interface/web/dns/lib/lang/fi_dns_slave.lng @@ -9,7 +9,7 @@ $wb['xfer_txt'] = 'Allow zone transfers to
these IPs (comma separated list $wb['server_id_error_empty'] = 'No server selected'; $wb['origin_error_empty'] = 'Zone empty.'; $wb['origin_error_unique'] = 'There is already a record for this zone.'; -$wb['origin_error_regex'] = 'Zone has a invalid format.'; +$wb['origin_error_regex'] = 'Zone has an invalid format.'; $wb['ns_error_regex'] = 'NS has a invalid format.'; $wb['eg_domain_tld'] = 'e.g. domain.tld.'; $wb['ipv4_form_txt'] = 'Separate multiple IPs with commas'; diff --git a/interface/web/dns/lib/lang/hu_dns_slave.lng b/interface/web/dns/lib/lang/hu_dns_slave.lng index 7bc27e3a51..64174c0fc2 100644 --- a/interface/web/dns/lib/lang/hu_dns_slave.lng +++ b/interface/web/dns/lib/lang/hu_dns_slave.lng @@ -9,7 +9,7 @@ $wb['xfer_txt'] = 'Allow zone transfers to
these IPs (comma separated list $wb['server_id_error_empty'] = 'No server selected'; $wb['origin_error_empty'] = 'Zone empty.'; $wb['origin_error_unique'] = 'There is already a record for this zone.'; -$wb['origin_error_regex'] = 'Zone has a invalid format.'; +$wb['origin_error_regex'] = 'Zone has an invalid format.'; $wb['ns_error_regex'] = 'NS has a invalid format.'; $wb['eg_domain_tld'] = 'e.g. domain.tld.'; $wb['ipv4_form_txt'] = 'Separate multiple IPs with commas'; diff --git a/interface/web/dns/lib/lang/hu_dns_soa.lng b/interface/web/dns/lib/lang/hu_dns_soa.lng index fdabdd99c2..81c730de76 100644 --- a/interface/web/dns/lib/lang/hu_dns_soa.lng +++ b/interface/web/dns/lib/lang/hu_dns_soa.lng @@ -17,7 +17,7 @@ $wb['no_zone_perm'] = 'You do not have the permission to add a record to this DN $wb['server_id_error_empty'] = 'No server selected'; $wb['origin_error_empty'] = 'Zone empty.'; $wb['origin_error_unique'] = 'There is already a record for this zone.'; -$wb['origin_error_regex'] = 'Zone has a invalid format.'; +$wb['origin_error_regex'] = 'Zone has an invalid format.'; $wb['ns_error_regex'] = 'NS has a invalid format.'; $wb['mbox_error_empty'] = 'Email is empty.'; $wb['mbox_error_regex'] = 'Email format invalid.'; diff --git a/interface/web/dns/lib/lang/ja_dns_slave.lng b/interface/web/dns/lib/lang/ja_dns_slave.lng index 416e3d6e72..9e8aaa17f9 100644 --- a/interface/web/dns/lib/lang/ja_dns_slave.lng +++ b/interface/web/dns/lib/lang/ja_dns_slave.lng @@ -9,7 +9,7 @@ $wb['xfer_txt'] = 'Allow zone transfers to
these IPs (comma separated list $wb['server_id_error_empty'] = 'No server selected'; $wb['origin_error_empty'] = 'Zone empty.'; $wb['origin_error_unique'] = 'There is already a record for this zone.'; -$wb['origin_error_regex'] = 'Zone has a invalid format.'; +$wb['origin_error_regex'] = 'Zone has an invalid format.'; $wb['ns_error_regex'] = 'NS has a invalid format.'; $wb['eg_domain_tld'] = 'e.g. domain.tld.'; $wb['ipv4_form_txt'] = 'Separate multiple IPs with commas'; diff --git a/interface/web/dns/lib/lang/pt_dns_slave.lng b/interface/web/dns/lib/lang/pt_dns_slave.lng index 416e3d6e72..9e8aaa17f9 100644 --- a/interface/web/dns/lib/lang/pt_dns_slave.lng +++ b/interface/web/dns/lib/lang/pt_dns_slave.lng @@ -9,7 +9,7 @@ $wb['xfer_txt'] = 'Allow zone transfers to
these IPs (comma separated list $wb['server_id_error_empty'] = 'No server selected'; $wb['origin_error_empty'] = 'Zone empty.'; $wb['origin_error_unique'] = 'There is already a record for this zone.'; -$wb['origin_error_regex'] = 'Zone has a invalid format.'; +$wb['origin_error_regex'] = 'Zone has an invalid format.'; $wb['ns_error_regex'] = 'NS has a invalid format.'; $wb['eg_domain_tld'] = 'e.g. domain.tld.'; $wb['ipv4_form_txt'] = 'Separate multiple IPs with commas'; diff --git a/interface/web/dns/lib/lang/ro_dns_slave.lng b/interface/web/dns/lib/lang/ro_dns_slave.lng index 416e3d6e72..9e8aaa17f9 100644 --- a/interface/web/dns/lib/lang/ro_dns_slave.lng +++ b/interface/web/dns/lib/lang/ro_dns_slave.lng @@ -9,7 +9,7 @@ $wb['xfer_txt'] = 'Allow zone transfers to
these IPs (comma separated list $wb['server_id_error_empty'] = 'No server selected'; $wb['origin_error_empty'] = 'Zone empty.'; $wb['origin_error_unique'] = 'There is already a record for this zone.'; -$wb['origin_error_regex'] = 'Zone has a invalid format.'; +$wb['origin_error_regex'] = 'Zone has an invalid format.'; $wb['ns_error_regex'] = 'NS has a invalid format.'; $wb['eg_domain_tld'] = 'e.g. domain.tld.'; $wb['ipv4_form_txt'] = 'Separate multiple IPs with commas'; diff --git a/interface/web/dns/lib/lang/se_dns_slave.lng b/interface/web/dns/lib/lang/se_dns_slave.lng index 416e3d6e72..9e8aaa17f9 100644 --- a/interface/web/dns/lib/lang/se_dns_slave.lng +++ b/interface/web/dns/lib/lang/se_dns_slave.lng @@ -9,7 +9,7 @@ $wb['xfer_txt'] = 'Allow zone transfers to
these IPs (comma separated list $wb['server_id_error_empty'] = 'No server selected'; $wb['origin_error_empty'] = 'Zone empty.'; $wb['origin_error_unique'] = 'There is already a record for this zone.'; -$wb['origin_error_regex'] = 'Zone has a invalid format.'; +$wb['origin_error_regex'] = 'Zone has an invalid format.'; $wb['ns_error_regex'] = 'NS has a invalid format.'; $wb['eg_domain_tld'] = 'e.g. domain.tld.'; $wb['ipv4_form_txt'] = 'Separate multiple IPs with commas'; diff --git a/interface/web/dns/lib/lang/sk_dns_slave.lng b/interface/web/dns/lib/lang/sk_dns_slave.lng index 416e3d6e72..9e8aaa17f9 100644 --- a/interface/web/dns/lib/lang/sk_dns_slave.lng +++ b/interface/web/dns/lib/lang/sk_dns_slave.lng @@ -9,7 +9,7 @@ $wb['xfer_txt'] = 'Allow zone transfers to
these IPs (comma separated list $wb['server_id_error_empty'] = 'No server selected'; $wb['origin_error_empty'] = 'Zone empty.'; $wb['origin_error_unique'] = 'There is already a record for this zone.'; -$wb['origin_error_regex'] = 'Zone has a invalid format.'; +$wb['origin_error_regex'] = 'Zone has an invalid format.'; $wb['ns_error_regex'] = 'NS has a invalid format.'; $wb['eg_domain_tld'] = 'e.g. domain.tld.'; $wb['ipv4_form_txt'] = 'Separate multiple IPs with commas'; From 5bb6e37a974506cfa343544807cd3c7be52ad7d1 Mon Sep 17 00:00:00 2001 From: Herman van Rink Date: Mon, 26 Dec 2022 12:41:04 +0100 Subject: [PATCH 060/621] Avoid php8.1 warning about shell_exec returning NULL --- install/lib/installer_base.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php index 3d49c23871..f3f5985e87 100644 --- a/install/lib/installer_base.lib.php +++ b/install/lib/installer_base.lib.php @@ -52,7 +52,7 @@ private function install_acme() { } public function update_acme() { - $acme = explode("\n", shell_exec('which acme.sh /usr/local/ispconfig/server/scripts/acme.sh /root/.acme.sh/acme.sh 2> /dev/null')); + $acme = explode("\n", (string)shell_exec('which acme.sh /usr/local/ispconfig/server/scripts/acme.sh /root/.acme.sh/acme.sh 2> /dev/null')); $acme = reset($acme); $val = 0; From a41468bf1c2ff19d9f9a9d87913e87103a1cbe9c Mon Sep 17 00:00:00 2001 From: Herman van Rink Date: Mon, 26 Dec 2022 14:21:36 +0100 Subject: [PATCH 061/621] Avoid Automatic conversion of false to array is deprecated in cron.d/200-logfiles.inc.php --- server/lib/classes/cron.d/200-ftplogfiles.inc.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/server/lib/classes/cron.d/200-ftplogfiles.inc.php b/server/lib/classes/cron.d/200-ftplogfiles.inc.php index a88a360ae2..430d8ce412 100644 --- a/server/lib/classes/cron.d/200-ftplogfiles.inc.php +++ b/server/lib/classes/cron.d/200-ftplogfiles.inc.php @@ -70,7 +70,7 @@ function parse_ftp_log($line){ function add_ftp_traffic(&$traffic_array, $parsed_line) { - if(is_array($traffic_array[$parsed_line['date']]) && array_key_exists($parsed_line['domain'], $traffic_array[$parsed_line['date']])) + if(isset($traffic_array[$parsed_line['date']]) && is_array($traffic_array[$parsed_line['date']]) && array_key_exists($parsed_line['domain'], $traffic_array[$parsed_line['date']])) { $traffic_array[$parsed_line['date']][$parsed_line['domain']][$parsed_line['direction']] += $parsed_line['size']; } @@ -89,13 +89,13 @@ function add_ftp_traffic(&$traffic_array, $parsed_line) while($line = fgets($fp)) { $parsed_line = parse_ftp_log($line); + if (!empty($parsed_line)) { + $sql = "SELECT wd.domain FROM ftp_user AS fu INNER JOIN web_domain AS wd ON fu.parent_domain_id = wd.domain_id WHERE fu.username = ? "; + $temp = $app->db->queryOneRecord($sql, $parsed_line['username'] ); + $parsed_line['domain'] = $temp['domain']; + add_ftp_traffic($ftp_traffic, $parsed_line); + } - $sql = "SELECT wd.domain FROM ftp_user AS fu INNER JOIN web_domain AS wd ON fu.parent_domain_id = wd.domain_id WHERE fu.username = ? "; - $temp = $app->db->queryOneRecord($sql, $parsed_line['username'] ); - - $parsed_line['domain'] = $temp['domain']; - - add_ftp_traffic($ftp_traffic, $parsed_line); } fclose($fp); From 4a099343840dbab9ad929becf674fea2d047127a Mon Sep 17 00:00:00 2001 From: Herman van Rink Date: Mon, 26 Dec 2022 14:30:58 +0100 Subject: [PATCH 062/621] Fix loginc error, backup_download_dir was not initialized in time Fround by: PHP Deprecated: is_dir(): Passing null to parameter #1 ($filename) of type string is deprecated in /usr/local/ispconfig/server/lib/classes/backup.inc.php on line 1311 --- server/lib/classes/backup.inc.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/lib/classes/backup.inc.php b/server/lib/classes/backup.inc.php index 46618e2278..57f264ec44 100644 --- a/server/lib/classes/backup.inc.php +++ b/server/lib/classes/backup.inc.php @@ -1305,13 +1305,13 @@ protected static function backups_garbage_collection($server_id, $backup_type = foreach ($domains as $rec) { $domain_id = $rec['domain_id']; $domain_backup_dir = $backup_dir . '/web' . $domain_id; + $web_path = $rec['document_root']; + $backup_download_dir = $web_path . '/backup'; // Remove backupdir symlink and create as directory instead if (is_link($backup_download_dir) || !is_dir($backup_download_dir)) { - $web_path = $rec['document_root']; $app->system->web_folder_protection($web_path, false); - $backup_download_dir = $web_path . '/backup'; if (is_link($backup_download_dir)) { unlink($backup_download_dir); } From 6eef0af54622de710c52cdf835d1e353fc81081f Mon Sep 17 00:00:00 2001 From: Herman van Rink Date: Fri, 13 Jan 2023 22:54:17 +0100 Subject: [PATCH 063/621] Move install.log into the ispconfig_log_dir --- install/install.php | 13 ++++++++----- install/lib/installer_base.lib.php | 3 --- install/update.php | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/install/install.php b/install/install.php index 64d05feecd..6b8386db4f 100644 --- a/install/install.php +++ b/install/install.php @@ -85,8 +85,6 @@ chdir( realpath(dirname(__FILE__)) ); } -//** Install logfile -define('ISPC_LOG_FILE', '/var/log/ispconfig_install.log'); define('ISPC_INSTALL_ROOT', realpath(dirname(__FILE__).'/../')); //** Include the templating lib @@ -155,9 +153,9 @@ swriteln($inst->lng(' Default values are in [brackets] and can be accepted with .')); swriteln($inst->lng(' Tap in "quit" (without the quotes) to stop the installer.'."\n\n")); -//** Check log file is writable (probably not root or sudo) -if(!is_writable(dirname(ISPC_LOG_FILE))){ - die("ERROR: Cannot write to the ".dirname(ISPC_LOG_FILE)." directory. Are you root or sudo ?\n\n"); +//** Check install dir is writable (probably not root or sudo) +if(!is_writable(dirname('/usr/local/ispconfig'))){ + die("ERROR: Cannot write to the /usr/local/ispconfig directory. Are you root or sudo ?\n\n"); } //** Check for ISPConfig 2.x versions @@ -304,6 +302,11 @@ $inst->dbmaster = $inst->db; } +if(!is_dir($conf['ispconfig_log_dir'])) { + mkdir($conf['ispconfig_log_dir'], 0755, true); +} +define('ISPC_LOG_FILE', $conf['ispconfig_log_dir'] . '/install.log'); + //* Create the mysql database $inst->configure_database(); diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php index 3d49c23871..f54eed5ad1 100644 --- a/install/lib/installer_base.lib.php +++ b/install/lib/installer_base.lib.php @@ -2982,9 +2982,6 @@ public function make_ispconfig_ssl_cert() { } swriteln('Using certificate path ' . $acme_cert_dir); - if(!is_dir($conf['ispconfig_log_dir'])) { - mkdir($conf['ispconfig_log_dir'], 0755, true); - } $acme_log = $conf['ispconfig_log_dir'] . '/acme.log'; $ip_address_match = false; diff --git a/install/update.php b/install/update.php index 37a0919999..df4a5751c1 100644 --- a/install/update.php +++ b/install/update.php @@ -88,7 +88,6 @@ if(realpath(dirname(__FILE__)) != $cur_dir) die("Please run installation/update from _inside_ the install directory!\n"); //** Install logfile -define('ISPC_LOG_FILE', '/var/log/ispconfig_install.log'); define('ISPC_INSTALL_ROOT', realpath(dirname(__FILE__).'/../')); //** Include the templating lib @@ -112,6 +111,7 @@ include_once "/usr/local/ispconfig/server/lib/config.inc.php"; $conf_old = $conf; unset($conf); +define('ISPC_LOG_FILE', $old_conf['ispconfig_log_dir'] . '/update.log'); if($dist['id'] == '') die('Linux distribution or version not recognized.'); From 2e8f525e590352dc33277a3efc93c6f3486e8a49 Mon Sep 17 00:00:00 2001 From: Herman van Rink Date: Mon, 16 Jan 2023 21:48:28 +0100 Subject: [PATCH 064/621] Fix php 8.2 deprecation warnings, #6444 --- install/lib/installer_base.lib.php | 42 +++++++++++++++--------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php index 3d49c23871..0cca703bf8 100644 --- a/install/lib/installer_base.lib.php +++ b/install/lib/installer_base.lib.php @@ -838,9 +838,9 @@ public function process_postfix_config($configfile) { $addr_cleanup = "'%u'"; foreach (str_split($out[0]) as $delim) { $recipient_delimiter = $this->db->escape( str_replace('%', '%%', $delim) ); - $addr_cleanup = "SUBSTRING_INDEX(${addr_cleanup}, '${recipient_delimiter}', 1)"; + $addr_cleanup = "SUBSTRING_INDEX({$addr_cleanup}, '{$recipient_delimiter}', 1)"; } - $no_addr_extension = "CONCAT(${addr_cleanup}, '@%d')"; + $no_addr_extension = "CONCAT({$addr_cleanup}, '@%d')"; } else { $no_addr_extension = "''"; } @@ -1525,7 +1525,7 @@ public function configure_dovecot() { foreach ($options as $value) { $value = trim($value); if ($value == '') continue; - if (preg_match("|check_recipient_access\s+proxy:mysql:${quoted_config_dir}/mysql-verify_recipients.cf|", $value)) { + if (preg_match("|check_recipient_access\s+proxy:mysql:{$quoted_config_dir}/mysql-verify_recipients.cf|", $value)) { continue; } $new_options[] = $value; @@ -1533,7 +1533,7 @@ public function configure_dovecot() { if ($configure_lmtp && (!isset($conf['mail']['content_filter']) || $conf['mail']['content_filter'] === 'amavisd')) { for ($i = 0; isset($new_options[$i]); $i++) { if ($new_options[$i] == 'reject_unlisted_recipient') { - array_splice($new_options, $i+1, 0, array("check_recipient_access proxy:mysql:${config_dir}/mysql-verify_recipients.cf")); + array_splice($new_options, $i+1, 0, array("check_recipient_access proxy:mysql:{$config_dir}/mysql-verify_recipients.cf")); break; } } @@ -1712,7 +1712,7 @@ public function configure_amavis() { // Check for amavisd -> pure webserver with postfix for mailing without antispam if ($conf['amavis']['installed']) { $content_filter_service = ($configure_lmtp) ? 'lmtp' : 'amavis'; - $postconf_commands[] = "content_filter = ${content_filter_service}:[127.0.0.1]:10024"; + $postconf_commands[] = "content_filter = {$content_filter_service}:[127.0.0.1]:10024"; $postconf_commands[] = 'receive_override_options = no_address_mappings'; $postconf_commands[] = 'address_verify_virtual_transport = smtp:[127.0.0.1]:10025'; $postconf_commands[] = 'address_verify_transport_maps = static:smtp:[127.0.0.1]:10025'; @@ -1723,7 +1723,7 @@ public function configure_amavis() { foreach ($options as $value) { $value = trim($value); if ($value == '') continue; - if (preg_match("|check_recipient_access\s+proxy:mysql:${quoted_config_dir}/mysql-verify_recipients.cf|", $value)) { + if (preg_match("|check_recipient_access\s+proxy:mysql:{$quoted_config_dir}/mysql-verify_recipients.cf|", $value)) { continue; } $new_options[] = $value; @@ -1731,7 +1731,7 @@ public function configure_amavis() { if ($configure_lmtp) { for ($i = 0; isset($new_options[$i]); $i++) { if ($new_options[$i] == 'reject_unlisted_recipient') { - array_splice($new_options, $i+1, 0, array("check_recipient_access proxy:mysql:${config_dir}/mysql-verify_recipients.cf")); + array_splice($new_options, $i+1, 0, array("check_recipient_access proxy:mysql:{$config_dir}/mysql-verify_recipients.cf")); break; } } @@ -1868,7 +1868,7 @@ public function configure_rspamd() { if (preg_match('/check_policy_service\s+inet:127.0.0.1:10023/', $value)) { continue; } - if (preg_match("|check_recipient_access\s+proxy:mysql:${quoted_config_dir}/mysql-verify_recipients.cf|", $value)) { + if (preg_match("|check_recipient_access\s+proxy:mysql:{$quoted_config_dir}/mysql-verify_recipients.cf|", $value)) { continue; } $new_options[] = $value; @@ -1935,10 +1935,10 @@ public function configure_rspamd() { ); foreach ($local_d as $f) { $tpl = new tpl(); - if (file_exists($conf['ispconfig_install_dir']."/server/conf-custom/install/rspamd_${f}.master")) { - $tpl->newTemplate($conf['ispconfig_install_dir']."/server/conf-custom/install/rspamd_${f}.master"); + if (file_exists($conf['ispconfig_install_dir']."/server/conf-custom/install/rspamd_{$f}.master")) { + $tpl->newTemplate($conf['ispconfig_install_dir']."/server/conf-custom/install/rspamd_{$f}.master"); } else { - $tpl->newTemplate("rspamd_${f}.master"); + $tpl->newTemplate("rspamd_{$f}.master"); } $tpl->setVar('dkim_path', $mail_config['dkim_path']); @@ -1950,7 +1950,7 @@ public function configure_rspamd() { $tpl->setLoop('local_addrs', $local_addrs); } - wf("/etc/rspamd/local.d/${f}", $tpl->grab()); + wf("/etc/rspamd/local.d/{$f}", $tpl->grab()); } @@ -1967,10 +1967,10 @@ public function configure_rspamd() { 'arc.conf', ); foreach ($local_d as $f) { - if(file_exists($conf['ispconfig_install_dir']."/server/conf-custom/install/rspamd_${f}.master")) { - exec('cp '.$conf['ispconfig_install_dir']."/server/conf-custom/install/rspamd_${f}.master /etc/rspamd/local.d/${f}"); + if(file_exists($conf['ispconfig_install_dir']."/server/conf-custom/install/rspamd_{$f}.master")) { + exec('cp '.$conf['ispconfig_install_dir']."/server/conf-custom/install/rspamd_{$f}.master /etc/rspamd/local.d/{$f}"); } else { - exec("cp tpl/rspamd_${f}.master /etc/rspamd/local.d/${f}"); + exec("cp tpl/rspamd_{$f}.master /etc/rspamd/local.d/{$f}"); } } @@ -1980,10 +1980,10 @@ public function configure_rspamd() { 'surbl_group.conf', ); foreach ($override_d as $f) { - if(file_exists($conf['ispconfig_install_dir']."/server/conf-custom/install/rspamd_${f}.master")) { - exec('cp '.$conf['ispconfig_install_dir']."/server/conf-custom/install/rspamd_${f}.master /etc/rspamd/override.d/${f}"); + if(file_exists($conf['ispconfig_install_dir']."/server/conf-custom/install/rspamd_{$f}.master")) { + exec('cp '.$conf['ispconfig_install_dir']."/server/conf-custom/install/rspamd_{$f}.master /etc/rspamd/override.d/{$f}"); } else { - exec("cp tpl/rspamd_${f}.master /etc/rspamd/override.d/${f}"); + exec("cp tpl/rspamd_{$f}.master /etc/rspamd/override.d/{$f}"); } } @@ -1995,10 +1995,10 @@ public function configure_rspamd() { 'spf_whitelist.inc.ispc', ); foreach ($maps_d as $f) { - if(file_exists($conf['ispconfig_install_dir']."/server/conf-custom/install/rspamd_${f}.master")) { - exec('cp '.$conf['ispconfig_install_dir']."/server/conf-custom/install/rspamd_${f}.master /etc/rspamd/local.d/maps.d/${f}"); + if(file_exists($conf['ispconfig_install_dir']."/server/conf-custom/install/rspamd_{$f}.master")) { + exec('cp '.$conf['ispconfig_install_dir']."/server/conf-custom/install/rspamd_{$f}.master /etc/rspamd/local.d/maps.d/{$f}"); } else { - exec("cp tpl/rspamd_${f}.master /etc/rspamd/local.d/maps.d/${f}"); + exec("cp tpl/rspamd_{$f}.master /etc/rspamd/local.d/maps.d/{$f}"); } } From 39d95d1641c60ff9051d3c0eafcf425a29aecdda Mon Sep 17 00:00:00 2001 From: Herman van Rink Date: Tue, 17 Jan 2023 13:58:27 +0100 Subject: [PATCH 065/621] Early return when no LE domains remain, #6446 --- server/lib/classes/letsencrypt.inc.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/server/lib/classes/letsencrypt.inc.php b/server/lib/classes/letsencrypt.inc.php index bce4e7b84a..6a1d2d02ac 100644 --- a/server/lib/classes/letsencrypt.inc.php +++ b/server/lib/classes/letsencrypt.inc.php @@ -406,6 +406,10 @@ public function request_certificates($data, $server_type = 'apache') { $app->log("There were " . $le_domain_count . " domains in the domain list. LE only supports 100, so we strip the rest.", LOGLEVEL_WARN); } + if ($le_domain_count == 0) { + return false; + } + // unset useless data unset($subdomains); unset($aliasdomains); From fc675e2684004c124b1c96f172f0e44e100c4413 Mon Sep 17 00:00:00 2001 From: Herman van Rink Date: Wed, 18 Jan 2023 08:48:41 +0100 Subject: [PATCH 066/621] Show mail_domain status in list on mail_user_edit, #6449 --- interface/web/mail/lib/lang/ar.lng | 1 + interface/web/mail/lib/lang/bg.lng | 1 + interface/web/mail/lib/lang/br.lng | 1 + interface/web/mail/lib/lang/ca.lng | 1 + interface/web/mail/lib/lang/cz.lng | 1 + interface/web/mail/lib/lang/de.lng | 1 + interface/web/mail/lib/lang/dk.lng | 1 + interface/web/mail/lib/lang/el.lng | 1 + interface/web/mail/lib/lang/en.lng | 1 + interface/web/mail/lib/lang/es.lng | 1 + interface/web/mail/lib/lang/fi.lng | 1 + interface/web/mail/lib/lang/fr.lng | 1 + interface/web/mail/lib/lang/hr.lng | 1 + interface/web/mail/lib/lang/hu.lng | 1 + interface/web/mail/lib/lang/id.lng | 1 + interface/web/mail/lib/lang/it.lng | 1 + interface/web/mail/lib/lang/ja.lng | 1 + interface/web/mail/lib/lang/nl.lng | 1 + interface/web/mail/lib/lang/pl.lng | 1 + interface/web/mail/lib/lang/pt.lng | 1 + interface/web/mail/lib/lang/ro.lng | 1 + interface/web/mail/lib/lang/ru.lng | 1 + interface/web/mail/lib/lang/se.lng | 1 + interface/web/mail/lib/lang/sk.lng | 1 + interface/web/mail/lib/lang/tr.lng | 1 + interface/web/mail/mail_user_edit.php | 5 +++-- 26 files changed, 28 insertions(+), 2 deletions(-) diff --git a/interface/web/mail/lib/lang/ar.lng b/interface/web/mail/lib/lang/ar.lng index 3d15a518a1..0139aab017 100644 --- a/interface/web/mail/lib/lang/ar.lng +++ b/interface/web/mail/lib/lang/ar.lng @@ -47,4 +47,5 @@ $wb['Relay Recipients'] = 'Relay Recipients'; $wb['Mailbox quota'] = 'Mailbox quota'; $wb['add_header_txt'] = 'Header (adds \"X-Spam: Yes\")'; $wb['rewrite_subject_txt'] = 'Subject (adds \"***SPAM***\" at the beginning)'; +$wb['inactive'] = 'inactive'; ?> diff --git a/interface/web/mail/lib/lang/bg.lng b/interface/web/mail/lib/lang/bg.lng index c117c863a2..bc55f2cd31 100644 --- a/interface/web/mail/lib/lang/bg.lng +++ b/interface/web/mail/lib/lang/bg.lng @@ -47,4 +47,5 @@ $wb['Relay Recipients'] = 'Relay Recipients'; $wb['Mailbox quota'] = 'Mailbox quota'; $wb['add_header_txt'] = 'Header (adds \"X-Spam: Yes\")'; $wb['rewrite_subject_txt'] = 'Subject (adds \"***SPAM***\" at the beginning)'; +$wb['inactive'] = 'inactive'; ?> diff --git a/interface/web/mail/lib/lang/br.lng b/interface/web/mail/lib/lang/br.lng index 4fafa1b507..f48798198f 100644 --- a/interface/web/mail/lib/lang/br.lng +++ b/interface/web/mail/lib/lang/br.lng @@ -51,3 +51,4 @@ $wb['Relay Recipients'] = 'Destinatários de retransmissão'; $wb['Mailbox quota'] = 'Cotas das contas de email'; $wb['add_header_txt'] = 'Cabeçalho (adicionar "X-Spam: Yes")'; $wb['rewrite_subject_txt'] = 'Assunto (adicionar "***SPAM***" no início)'; +$wb['inactive'] = 'inactive'; diff --git a/interface/web/mail/lib/lang/ca.lng b/interface/web/mail/lib/lang/ca.lng index 0531f19bd0..568f82afeb 100644 --- a/interface/web/mail/lib/lang/ca.lng +++ b/interface/web/mail/lib/lang/ca.lng @@ -47,4 +47,5 @@ $wb['Relay Recipients'] = 'Destinataires de relais'; $wb['Mailbox quota'] = 'Quota courriel'; $wb['add_header_txt'] = 'Header (adds \"X-Spam: Yes\")'; $wb['rewrite_subject_txt'] = 'Subject (adds \"***SPAM***\" at the beginning)'; +$wb['inactive'] = 'inactive'; ?> diff --git a/interface/web/mail/lib/lang/cz.lng b/interface/web/mail/lib/lang/cz.lng index b393f56798..6f0d48ebd2 100644 --- a/interface/web/mail/lib/lang/cz.lng +++ b/interface/web/mail/lib/lang/cz.lng @@ -47,3 +47,4 @@ $wb['Statistics'] = 'Statistiky'; $wb['Mailbox quota'] = 'Kvóty pro e-mailové schránky'; $wb['add_header_txt'] = 'Do záhlaví (přidat \"X-Spam: Yes\")'; $wb['rewrite_subject_txt'] = 'Do předmětu (přidat \"***SPAM***\" na začátek)'; +$wb['inactive'] = 'inactive'; diff --git a/interface/web/mail/lib/lang/de.lng b/interface/web/mail/lib/lang/de.lng index e0f1e7cd3b..69067b5a52 100644 --- a/interface/web/mail/lib/lang/de.lng +++ b/interface/web/mail/lib/lang/de.lng @@ -47,4 +47,5 @@ $wb['Relay Recipients'] = 'Relay Empfänger'; $wb['Mailbox quota'] = 'E-Mail Konto Speichernutzung'; $wb['add_header_txt'] = 'Header (adds \"X-Spam: Yes\")'; $wb['rewrite_subject_txt'] = 'Subject (adds \"***SPAM***\" at the beginning)'; +$wb['inactive'] = 'inactive'; ?> diff --git a/interface/web/mail/lib/lang/dk.lng b/interface/web/mail/lib/lang/dk.lng index 3fe8d568ae..2c0789a3d0 100644 --- a/interface/web/mail/lib/lang/dk.lng +++ b/interface/web/mail/lib/lang/dk.lng @@ -47,4 +47,5 @@ $wb['Relay Recipients'] = 'Relay Modtagere'; $wb['Mailbox quota'] = 'Postboks kvota'; $wb['add_header_txt'] = 'Header (adds \"X-Spam: Yes\")'; $wb['rewrite_subject_txt'] = 'Subject (adds \"***SPAM***\" at the beginning)'; +$wb['inactive'] = 'inactive'; ?> diff --git a/interface/web/mail/lib/lang/el.lng b/interface/web/mail/lib/lang/el.lng index cb873eac2a..3374233feb 100644 --- a/interface/web/mail/lib/lang/el.lng +++ b/interface/web/mail/lib/lang/el.lng @@ -47,4 +47,5 @@ $wb['Relay Recipients'] = 'Παραλήπτες Relay'; $wb['Mailbox quota'] = 'Mailbox quota'; $wb['add_header_txt'] = 'Header (adds \"X-Spam: Yes\")'; $wb['rewrite_subject_txt'] = 'Subject (adds \"***SPAM***\" at the beginning)'; +$wb['inactive'] = 'inactive'; ?> diff --git a/interface/web/mail/lib/lang/en.lng b/interface/web/mail/lib/lang/en.lng index c251fc1b2b..d90e575be1 100644 --- a/interface/web/mail/lib/lang/en.lng +++ b/interface/web/mail/lib/lang/en.lng @@ -50,3 +50,4 @@ $wb['Relay Recipients'] = 'Relay Recipients'; $wb['Mailbox quota'] = 'Mailbox quota'; $wb['add_header_txt'] = 'Header (adds "X-Spam: Yes")'; $wb['rewrite_subject_txt'] = 'Subject (adds "***SPAM***" at the beginning)'; +$wb['inactive'] = 'inactive'; diff --git a/interface/web/mail/lib/lang/es.lng b/interface/web/mail/lib/lang/es.lng index fdf4e5b00d..982a51d567 100644 --- a/interface/web/mail/lib/lang/es.lng +++ b/interface/web/mail/lib/lang/es.lng @@ -47,4 +47,5 @@ $wb['Users'] = 'Usuarios'; $wb['Whitelist'] = 'Lista blanca'; $wb['add_header_txt'] = 'Header (adds \"X-Spam: Yes\")'; $wb['rewrite_subject_txt'] = 'Subject (adds \"***SPAM***\" at the beginning)'; +$wb['inactive'] = 'inactive'; ?> diff --git a/interface/web/mail/lib/lang/fi.lng b/interface/web/mail/lib/lang/fi.lng index 78a4328336..dc5314a38f 100644 --- a/interface/web/mail/lib/lang/fi.lng +++ b/interface/web/mail/lib/lang/fi.lng @@ -47,4 +47,5 @@ $wb['Relay Recipients'] = 'Välityksen vastaanottajat'; $wb['Mailbox quota'] = 'Mailbox quota'; $wb['add_header_txt'] = 'Header (adds \"X-Spam: Yes\")'; $wb['rewrite_subject_txt'] = 'Subject (adds \"***SPAM***\" at the beginning)'; +$wb['inactive'] = 'inactive'; ?> diff --git a/interface/web/mail/lib/lang/fr.lng b/interface/web/mail/lib/lang/fr.lng index a70f080295..539c2a3c53 100644 --- a/interface/web/mail/lib/lang/fr.lng +++ b/interface/web/mail/lib/lang/fr.lng @@ -47,4 +47,5 @@ $wb['Mailbox quota'] = 'Mailbox quota'; $wb['Email'] = 'Email'; $wb['add_header_txt'] = 'Header (adds \"X-Spam: Yes\")'; $wb['rewrite_subject_txt'] = 'Subject (adds \"***SPAM***\" at the beginning)'; +$wb['inactive'] = 'inactive'; ?> diff --git a/interface/web/mail/lib/lang/hr.lng b/interface/web/mail/lib/lang/hr.lng index 877f8827f5..14649665cd 100644 --- a/interface/web/mail/lib/lang/hr.lng +++ b/interface/web/mail/lib/lang/hr.lng @@ -47,4 +47,5 @@ $wb['Mailbox quota'] = 'Mailbox quota'; $wb['Domain'] = 'Domain'; $wb['add_header_txt'] = 'Header (adds \"X-Spam: Yes\")'; $wb['rewrite_subject_txt'] = 'Subject (adds \"***SPAM***\" at the beginning)'; +$wb['inactive'] = 'inactive'; ?> diff --git a/interface/web/mail/lib/lang/hu.lng b/interface/web/mail/lib/lang/hu.lng index f3ffa4aef0..688d6d0c25 100644 --- a/interface/web/mail/lib/lang/hu.lng +++ b/interface/web/mail/lib/lang/hu.lng @@ -47,4 +47,5 @@ $wb['Server'] = 'Server'; $wb['Mailbox quota'] = 'Mailbox quota'; $wb['add_header_txt'] = 'Header (adds \"X-Spam: Yes\")'; $wb['rewrite_subject_txt'] = 'Subject (adds \"***SPAM***\" at the beginning)'; +$wb['inactive'] = 'inactive'; ?> diff --git a/interface/web/mail/lib/lang/id.lng b/interface/web/mail/lib/lang/id.lng index 3a2b5dfe45..8a6931ce70 100644 --- a/interface/web/mail/lib/lang/id.lng +++ b/interface/web/mail/lib/lang/id.lng @@ -47,4 +47,5 @@ $wb['Relay Recipients'] = 'Penerima Relay'; $wb['Mailbox quota'] = 'Mailbox quota'; $wb['add_header_txt'] = 'Header (adds \"X-Spam: Yes\")'; $wb['rewrite_subject_txt'] = 'Subject (adds \"***SPAM***\" at the beginning)'; +$wb['inactive'] = 'inactive'; ?> diff --git a/interface/web/mail/lib/lang/it.lng b/interface/web/mail/lib/lang/it.lng index 15bc87ea3f..fcd15c2b1b 100644 --- a/interface/web/mail/lib/lang/it.lng +++ b/interface/web/mail/lib/lang/it.lng @@ -47,4 +47,5 @@ $wb['Relay Recipients'] = 'Destinatari inoltro'; $wb['Mailbox quota'] = 'Quota Casella di Posta'; $wb['add_header_txt'] = 'Header (adds \"X-Spam: Yes\")'; $wb['rewrite_subject_txt'] = 'Subject (adds \"***SPAM***\" at the beginning)'; +$wb['inactive'] = 'inactive'; ?> diff --git a/interface/web/mail/lib/lang/ja.lng b/interface/web/mail/lib/lang/ja.lng index 818a3ed126..dddd49c87b 100644 --- a/interface/web/mail/lib/lang/ja.lng +++ b/interface/web/mail/lib/lang/ja.lng @@ -47,4 +47,5 @@ $wb['Relay Recipients'] = 'Relay Recipients'; $wb['Mailbox quota'] = 'Mailbox quota'; $wb['add_header_txt'] = 'Header (adds \"X-Spam: Yes\")'; $wb['rewrite_subject_txt'] = 'Subject (adds \"***SPAM***\" at the beginning)'; +$wb['inactive'] = 'inactive'; ?> diff --git a/interface/web/mail/lib/lang/nl.lng b/interface/web/mail/lib/lang/nl.lng index 6664809b46..19272584bd 100644 --- a/interface/web/mail/lib/lang/nl.lng +++ b/interface/web/mail/lib/lang/nl.lng @@ -47,4 +47,5 @@ $wb['Relay Recipients'] = 'Relay ontvangers'; $wb['Mailbox quota'] = 'Mailbox quota'; $wb['add_header_txt'] = 'Header (adds \"X-Spam: Yes\")'; $wb['rewrite_subject_txt'] = 'Subject (adds \"***SPAM***\" at the beginning)'; +$wb['inactive'] = 'inactive'; ?> diff --git a/interface/web/mail/lib/lang/pl.lng b/interface/web/mail/lib/lang/pl.lng index 17b7701992..c6050a6fe2 100644 --- a/interface/web/mail/lib/lang/pl.lng +++ b/interface/web/mail/lib/lang/pl.lng @@ -47,4 +47,5 @@ $wb['Relay Recipients'] = 'Odbiorcy przekierowania'; $wb['Mailbox quota'] = 'Użycie skrzynek email'; $wb['add_header_txt'] = 'Header (adds \"X-Spam: Yes\")'; $wb['rewrite_subject_txt'] = 'Subject (adds \"***SPAM***\" at the beginning)'; +$wb['inactive'] = 'inactive'; ?> diff --git a/interface/web/mail/lib/lang/pt.lng b/interface/web/mail/lib/lang/pt.lng index d47eb6183b..1fbc55240a 100644 --- a/interface/web/mail/lib/lang/pt.lng +++ b/interface/web/mail/lib/lang/pt.lng @@ -47,4 +47,5 @@ $wb['Relay Recipients'] = 'Recipientes de Relay'; $wb['Mailbox quota'] = 'Mailbox quota'; $wb['add_header_txt'] = 'Header (adds \"X-Spam: Yes\")'; $wb['rewrite_subject_txt'] = 'Subject (adds \"***SPAM***\" at the beginning)'; +$wb['inactive'] = 'inactive'; ?> diff --git a/interface/web/mail/lib/lang/ro.lng b/interface/web/mail/lib/lang/ro.lng index 0c0e85995e..51c4bdbdc2 100644 --- a/interface/web/mail/lib/lang/ro.lng +++ b/interface/web/mail/lib/lang/ro.lng @@ -47,4 +47,5 @@ $wb['Relay Recipients'] = 'Relay Recipients'; $wb['Mailbox quota'] = 'Mailbox quota'; $wb['add_header_txt'] = 'Header (adds \"X-Spam: Yes\")'; $wb['rewrite_subject_txt'] = 'Subject (adds \"***SPAM***\" at the beginning)'; +$wb['inactive'] = 'inactive'; ?> diff --git a/interface/web/mail/lib/lang/ru.lng b/interface/web/mail/lib/lang/ru.lng index 1b7995e024..8c8a0c3c54 100644 --- a/interface/web/mail/lib/lang/ru.lng +++ b/interface/web/mail/lib/lang/ru.lng @@ -47,4 +47,5 @@ $wb['Relay Recipients'] = 'Relay получатели'; $wb['Mailbox quota'] = 'Квота почтового ящика'; $wb['add_header_txt'] = 'Header (adds \"X-Spam: Yes\")'; $wb['rewrite_subject_txt'] = 'Subject (adds \"***SPAM***\" at the beginning)'; +$wb['inactive'] = 'inactive'; ?> diff --git a/interface/web/mail/lib/lang/se.lng b/interface/web/mail/lib/lang/se.lng index 7a415aa901..88689b0d79 100644 --- a/interface/web/mail/lib/lang/se.lng +++ b/interface/web/mail/lib/lang/se.lng @@ -47,4 +47,5 @@ $wb['Relay Recipients'] = 'Relay Recipients'; $wb['Mailbox quota'] = 'Mailbox quota'; $wb['add_header_txt'] = 'Header (adds \"X-Spam: Yes\")'; $wb['rewrite_subject_txt'] = 'Subject (adds \"***SPAM***\" at the beginning)'; +$wb['inactive'] = 'inactive'; ?> diff --git a/interface/web/mail/lib/lang/sk.lng b/interface/web/mail/lib/lang/sk.lng index 7b00f9d52c..ddef1ae73d 100644 --- a/interface/web/mail/lib/lang/sk.lng +++ b/interface/web/mail/lib/lang/sk.lng @@ -47,4 +47,5 @@ $wb['Relay Recipients'] = 'Relay Recipients'; $wb['Mailbox quota'] = 'Mailbox quota'; $wb['add_header_txt'] = 'Header (adds \"X-Spam: Yes\")'; $wb['rewrite_subject_txt'] = 'Subject (adds \"***SPAM***\" at the beginning)'; +$wb['inactive'] = 'inactive'; ?> diff --git a/interface/web/mail/lib/lang/tr.lng b/interface/web/mail/lib/lang/tr.lng index 52d1868b3e..e574f999d1 100644 --- a/interface/web/mail/lib/lang/tr.lng +++ b/interface/web/mail/lib/lang/tr.lng @@ -48,4 +48,5 @@ $wb['Global Filters'] = 'Genel Süzgeçler'; $wb['Domain Alias'] = 'Takma Etki Alanı'; $wb['Relay Recipients'] = 'Aktarılan Alıcılar'; $wb['Mailbox quota'] = 'E-posta Kutusu Kotası'; +$wb['inactive'] = 'inactive'; ?> diff --git a/interface/web/mail/mail_user_edit.php b/interface/web/mail/mail_user_edit.php index 1c2bc47313..b5c7ef293b 100644 --- a/interface/web/mail/mail_user_edit.php +++ b/interface/web/mail/mail_user_edit.php @@ -91,14 +91,15 @@ function onShowEnd() { // Getting Domains of the user // $sql = "SELECT domain, server_id FROM mail_domain WHERE ".$app->tform->getAuthSQL('r').' ORDER BY domain'; - $sql = "SELECT domain, server_id FROM mail_domain WHERE (".$app->tform->getAuthSQL('r').") AND domain NOT IN (SELECT SUBSTR(source,2) FROM mail_forwarding WHERE type = 'aliasdomain') ORDER BY domain"; + $sql = "SELECT domain, server_id, active FROM mail_domain WHERE (".$app->tform->getAuthSQL('r').") AND domain NOT IN (SELECT SUBSTR(source,2) FROM mail_forwarding WHERE type = 'aliasdomain') ORDER BY domain"; $domains = $app->db->queryAllRecords($sql); $domain_select = ''; if(is_array($domains)) { foreach( $domains as $domain) { $domain['domain'] = $app->functions->idn_decode($domain['domain']); $selected = ($domain["domain"] == @$email_parts[1])?'SELECTED':''; - $domain_select .= "\r\n"; + $domain_select .= "\r\n"; } } $app->tpl->setVar("email_domain", $domain_select); From 94a926f0d027723674f434f701642a5810630aed Mon Sep 17 00:00:00 2001 From: Herman van Rink Date: Wed, 18 Jan 2023 14:31:33 +0100 Subject: [PATCH 067/621] Show DNSSEC status in soa list --- interface/web/dns/list/dns_soa.list.php | 10 ++++++++++ interface/web/dns/templates/dns_soa_admin_list.htm | 2 +- interface/web/dns/templates/dns_soa_list.htm | 2 +- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/interface/web/dns/list/dns_soa.list.php b/interface/web/dns/list/dns_soa.list.php index c08a3802cb..d992a12d59 100644 --- a/interface/web/dns/list/dns_soa.list.php +++ b/interface/web/dns/list/dns_soa.list.php @@ -61,6 +61,16 @@ 'width' => "", 'value' => array('Y' => $app->lng('yes_txt'), 'N' => $app->lng('no_txt'))); +$liste["item"][] = array( 'field' => "dnssec_initialized", + 'datatype' => "VARCHAR", + 'formtype' => "TEXT", + 'op' => "=", + 'prefix' => "", + 'suffix' => "", + 'width' => "", + 'value' => '', +); + $liste["item"][] = array( 'field' => "server_id", 'datatype' => "VARCHAR", diff --git a/interface/web/dns/templates/dns_soa_admin_list.htm b/interface/web/dns/templates/dns_soa_admin_list.htm index fe381eaac3..72450a3518 100644 --- a/interface/web/dns/templates/dns_soa_admin_list.htm +++ b/interface/web/dns/templates/dns_soa_admin_list.htm @@ -57,7 +57,7 @@

- {tmpl_var name="active"} + {tmpl_var name="active"} {tmpl_var name="sys_groupid"} {tmpl_var name="server_id"} {tmpl_var name="origin"} diff --git a/interface/web/dns/templates/dns_soa_list.htm b/interface/web/dns/templates/dns_soa_list.htm index ec23975175..0d8af18338 100644 --- a/interface/web/dns/templates/dns_soa_list.htm +++ b/interface/web/dns/templates/dns_soa_list.htm @@ -55,7 +55,7 @@

- {tmpl_var name="active"} + {tmpl_var name="active"} {tmpl_var name="server_id"} {tmpl_var name="origin"} {tmpl_var name="ns"} From f818412d0462dc734e1b6f463233f7a3cddfe065 Mon Sep 17 00:00:00 2001 From: Herman van Rink Date: Wed, 18 Jan 2023 15:38:50 +0100 Subject: [PATCH 068/621] Selecting a dnssec algarithm should imply wanting to sign the zone, #6451 --- interface/lib/classes/tform_base.inc.php | 6 +++++- interface/web/dns/form/dns_soa.tform.php | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/interface/lib/classes/tform_base.inc.php b/interface/lib/classes/tform_base.inc.php index 3b35a722d2..5dd837a136 100644 --- a/interface/lib/classes/tform_base.inc.php +++ b/interface/lib/classes/tform_base.inc.php @@ -560,8 +560,12 @@ function getHTML($record, $tab, $action = 'NEW') { foreach($vals as $tvl) { if(trim($tvl) == trim($k)) $checked = ' CHECKED'; } + $datacheckfields = ''; + if (isset($field['data-check-fields'])) { + $datacheckfields = " data-check-fields=\"{$field['data-check-fields']}\""; + } // $out .= "\r\n"; - $out .= ""; + $out .= ""; if (isset($field['render_inline']) && $field['render_inline'] == 'n') { $out .= "
\r\n"; } diff --git a/interface/web/dns/form/dns_soa.tform.php b/interface/web/dns/form/dns_soa.tform.php index 6259cceddb..7deb109456 100644 --- a/interface/web/dns/form/dns_soa.tform.php +++ b/interface/web/dns/form/dns_soa.tform.php @@ -302,6 +302,7 @@ 'separator' => ',', 'default' => 'ECDSAP256SHA256', 'value' => array('NSEC3RSASHA1' => '7 (NSEC3RSASHA1)','ECDSAP256SHA256' => '13 (ECDSAP256SHA256)'), + 'data-check-fields' => 'dnssec_wanted', 'width' => '30', 'maxlength' => '255' ), From dddf3e5bd0d31c7066b051ed84e4fb493a3ad14a Mon Sep 17 00:00:00 2001 From: Till Brehm Date: Fri, 20 Jan 2023 06:14:53 +0000 Subject: [PATCH 069/621] Update server/plugins-available/shelluser_base_plugin.inc.php --- server/plugins-available/shelluser_base_plugin.inc.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/server/plugins-available/shelluser_base_plugin.inc.php b/server/plugins-available/shelluser_base_plugin.inc.php index 2fc4f0dfc7..cb46843197 100755 --- a/server/plugins-available/shelluser_base_plugin.inc.php +++ b/server/plugins-available/shelluser_base_plugin.inc.php @@ -477,7 +477,11 @@ private function _setup_ssh_rsa() { // Remove duplicate keys $existing_keys = @file($sshkeys, FILE_IGNORE_NEW_LINES); $new_keys = explode("\n", $userkey); - $final_keys_arr = @array_merge($existing_keys, $new_keys); + if(is_array($existing_keys)) { + $final_keys_arr = @array_merge($existing_keys, $new_keys); + } else { + $final_keys_arr = $new_keys; + } $new_final_keys_arr = array(); if(is_array($final_keys_arr) && !empty($final_keys_arr)){ foreach($final_keys_arr as $key => $val){ From 79637839cb40bd18966606297c78e0a6da85a404 Mon Sep 17 00:00:00 2001 From: Till Brehm Date: Fri, 20 Jan 2023 10:13:31 +0000 Subject: [PATCH 070/621] Fixed Undefined variable $new_lines in /usr/local/ispconfig/server/lib/classes/file.inc.php on line 126 --- server/lib/classes/file.inc.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server/lib/classes/file.inc.php b/server/lib/classes/file.inc.php index 28757d0dd5..d3117c36dc 100644 --- a/server/lib/classes/file.inc.php +++ b/server/lib/classes/file.inc.php @@ -118,12 +118,13 @@ function remove_blank_lines($input, $file = 1){ $content = $input; } $lines = explode("\n", $content); + $new_lines = array(); if(!empty($lines)){ foreach($lines as $line){ if(trim($line) != '') $new_lines[] = $line; } } - if(is_array($new_lines)){ + if(!empty($new_lines)){ $content = implode("\n", $new_lines); } else { $content = ''; From e3f14f75a7e8910ff03a83454a32ca7fefc94d0b Mon Sep 17 00:00:00 2001 From: Till Brehm Date: Fri, 20 Jan 2023 10:19:10 +0000 Subject: [PATCH 071/621] Fixed Uncaught TypeError: array_merge(): Argument #1 must be of type array, bool given in /usr/local/ispconfig/server/plugins-available/shelluser_jailkit_plugin.inc.php:530 --- server/plugins-available/shelluser_jailkit_plugin.inc.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/server/plugins-available/shelluser_jailkit_plugin.inc.php b/server/plugins-available/shelluser_jailkit_plugin.inc.php index dbc3d8041b..1b2ff74db9 100755 --- a/server/plugins-available/shelluser_jailkit_plugin.inc.php +++ b/server/plugins-available/shelluser_jailkit_plugin.inc.php @@ -318,6 +318,8 @@ function _setup_jailkit_chroot() $options = array('hardlink'); } elseif ($this->jailkit_config['jailkit_hardlinks'] == 'no') { $options = array(); + } else { + $options = array(); } } else { $options = array('allow_hardlink'); @@ -527,7 +529,11 @@ private function _setup_ssh_rsa() { // Remove duplicate keys $existing_keys = @file($sshkeys, FILE_IGNORE_NEW_LINES); $new_keys = explode("\n", $userkey); - $final_keys_arr = @array_merge($existing_keys, $new_keys); + if(is_array($existing_keys)) { + $final_keys_arr = @array_merge($existing_keys, $new_keys); + } else { + $final_keys_arr = $new_keys; + } $new_final_keys_arr = array(); if(is_array($final_keys_arr) && !empty($final_keys_arr)){ foreach($final_keys_arr as $key => $val){ From 27fea5f289300e361a755f7526ce9540ede57fbc Mon Sep 17 00:00:00 2001 From: Herman van Rink Date: Fri, 27 Jan 2023 22:32:51 +0100 Subject: [PATCH 072/621] Avoid Deprecation warning PHP Deprecated: substr(): Passing null to parameter #1 ($string) of type string is deprecated in /usr/local/ispconfig/server/plugins-available/bind_plugin.inc.php on line 397 --- server/plugins-available/bind_plugin.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/plugins-available/bind_plugin.inc.php b/server/plugins-available/bind_plugin.inc.php index 643f34e618..15fe062648 100644 --- a/server/plugins-available/bind_plugin.inc.php +++ b/server/plugins-available/bind_plugin.inc.php @@ -393,7 +393,7 @@ function soa_update($event_name, $data) { //} //* Delete old domain file, if domain name has been changed - if($data['old']['origin'] != $data['new']['origin']) { + if(!empty($data['old']['origin']) && $data['old']['origin'] != $data['new']['origin']) { $filename = $dns_config['bind_zonefiles_dir'].'/' . $this->zone_file_prefix() . str_replace("/", "_", substr($data['old']['origin'], 0, -1)); if(is_file($filename)) unlink($filename); From 39b6810cf9c42713fe543120e5d03a393a6f32ab Mon Sep 17 00:00:00 2001 From: Till Brehm Date: Mon, 30 Jan 2023 19:38:45 +0000 Subject: [PATCH 073/621] Update install/lib/installer_base.lib.php --- install/lib/installer_base.lib.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php index 3d49c23871..20c847b2b6 100644 --- a/install/lib/installer_base.lib.php +++ b/install/lib/installer_base.lib.php @@ -3145,11 +3145,11 @@ public function make_ispconfig_ssl_cert() { $out = null; $ret = null; if($conf['nginx']['installed'] == true || $conf['apache']['installed'] == true) { - exec("$acme --issue --log $acme_log -w /usr/local/ispconfig/interface/acme -d " . escapeshellarg($hostname) . " $renew_hook", $out, $ret); + exec("$acme --issue --keylength 4096 --log $acme_log -w /usr/local/ispconfig/interface/acme -d " . escapeshellarg($hostname) . " $renew_hook", $out, $ret); } // Else, it is not webserver, so we use standalone else { - exec("$acme --issue --log $acme_log --standalone -d " . escapeshellarg($hostname) . " $hook", $out, $ret); + exec("$acme --issue --keylength 4096 --log $acme_log --standalone -d " . escapeshellarg($hostname) . " $hook", $out, $ret); } if($ret == 0 || ($ret == 2 && file_exists($check_acme_file))) { From 79770a899467464c114b2a49fcc15d0ebc98f5be Mon Sep 17 00:00:00 2001 From: Herman van Rink Date: Wed, 1 Feb 2023 16:33:02 +0100 Subject: [PATCH 074/621] Add otp_email_override support UI is still to be implemented --- interface/web/login/otp.php | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/interface/web/login/otp.php b/interface/web/login/otp.php index 8b80691da6..c8630b0817 100644 --- a/interface/web/login/otp.php +++ b/interface/web/login/otp.php @@ -157,13 +157,21 @@ function finish_2fa_success($msg = '') { $app->ispcmail->setOptions($mail_config); } - $clientuser = $app->db->queryOneRecord('SELECT email FROM sys_user u LEFT JOIN client c ON (u.client_id=c.client_id) WHERE u.userid = ?', $_SESSION['s_pending']['user']['userid']); - if (!empty($clientuser['email'])) { - $email_to = $clientuser['email']; + $sys_user = $app->db->queryOneRecord('SELECT otp_data FROM sys_user WHERE userid = ?', $_SESSION['s_pending']['user']['userid']); + $data = json_decode($sys_user['otp_data'], TRUE); + + if (!empty($data['otp_email_override'] )) { + $email_to = $data['otp_email_override']; } else { - // Admin users are not related to a client, thus use the globally configured email address. - $email_to = $mail_config['admin_mail']; + $clientuser = $app->db->queryOneRecord('SELECT email FROM sys_user u LEFT JOIN client c ON (u.client_id=c.client_id) WHERE u.userid = ?', $_SESSION['s_pending']['user']['userid']); + if (!empty($clientuser['email'])) { + $email_to = $clientuser['email']; + } + else { + // Admin users are not related to a client, thus use the globally configured email address. + $email_to = $mail_config['admin_mail']; + } } $app->ispcmail->setSender($mail_config['admin_mail'], $mail_config['admin_name']); From 7cb697a8f8bf59542ee40f96e3a50730a9ae2735 Mon Sep 17 00:00:00 2001 From: Herman van Rink Date: Thu, 19 May 2022 13:36:11 +0200 Subject: [PATCH 075/621] Fix indend and add comment --- interface/web/login/otp.php | 1 + 1 file changed, 1 insertion(+) diff --git a/interface/web/login/otp.php b/interface/web/login/otp.php index c8630b0817..86a941add9 100644 --- a/interface/web/login/otp.php +++ b/interface/web/login/otp.php @@ -161,6 +161,7 @@ function finish_2fa_success($msg = '') { $data = json_decode($sys_user['otp_data'], TRUE); if (!empty($data['otp_email_override'] )) { + // Handle otp_email_override. $email_to = $data['otp_email_override']; } else { From 3ddebfe99470c34bab240aeb42fe9dc42772c7ad Mon Sep 17 00:00:00 2001 From: Herman van Rink Date: Wed, 1 Feb 2023 16:56:05 +0100 Subject: [PATCH 076/621] Extra error when No mail address available to sent an OTP code to --- interface/web/login/otp.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/interface/web/login/otp.php b/interface/web/login/otp.php index 86a941add9..a0a4c0c6eb 100644 --- a/interface/web/login/otp.php +++ b/interface/web/login/otp.php @@ -169,10 +169,13 @@ function finish_2fa_success($msg = '') { if (!empty($clientuser['email'])) { $email_to = $clientuser['email']; } - else { + elseif(!empty($mail_config['admin_mail'])) { // Admin users are not related to a client, thus use the globally configured email address. $email_to = $mail_config['admin_mail']; } + else { + $app->error('No mail address available to sent an OTP code to.', 'index.php'); + } } $app->ispcmail->setSender($mail_config['admin_mail'], $mail_config['admin_name']); From 38103c00c1444d67f48d455c0e45fb22e15a8ce0 Mon Sep 17 00:00:00 2001 From: Demian Date: Mon, 6 Feb 2023 16:17:52 +0100 Subject: [PATCH 077/621] Fixed regex for dkim_selector to match only valid entires #6459 before the regex matched empty entries and entries starting with a number. --- interface/web/mail/form/mail_domain.tform.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interface/web/mail/form/mail_domain.tform.php b/interface/web/mail/form/mail_domain.tform.php index 6e768193e0..30212be00e 100644 --- a/interface/web/mail/form/mail_domain.tform.php +++ b/interface/web/mail/form/mail_domain.tform.php @@ -132,7 +132,7 @@ 'width' => '20', 'maxlength' => '63', 'validators' => array ( 0 => array ( 'type' => 'REGEX', - 'regex' => '/^[a-z0-9]{0,63}$/', + 'regex' => '/^[a-z][a-z0-9]{1,63}$/', 'errmsg'=> 'dkim_selector_error'), ), ), From 280c16b99970d06334bd8950913512f25540de29 Mon Sep 17 00:00:00 2001 From: Demian Date: Tue, 7 Feb 2023 08:35:37 +0100 Subject: [PATCH 078/621] Fixed regex to match the dkim_slector RFC compliant #6459 The dkim_select can start with a number, but has to contain atleast 1 letter and has to be between 1 and 63 characters long. --- interface/web/mail/form/mail_domain.tform.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interface/web/mail/form/mail_domain.tform.php b/interface/web/mail/form/mail_domain.tform.php index 30212be00e..4a042abf2e 100644 --- a/interface/web/mail/form/mail_domain.tform.php +++ b/interface/web/mail/form/mail_domain.tform.php @@ -132,7 +132,7 @@ 'width' => '20', 'maxlength' => '63', 'validators' => array ( 0 => array ( 'type' => 'REGEX', - 'regex' => '/^[a-z][a-z0-9]{1,63}$/', + 'regex' => '/^(?=.*[a-z])[a-z0-9]{1,63}$/', 'errmsg'=> 'dkim_selector_error'), ), ), From 07d37a4a8ef21fa8b5e899f72b53835fbdb88352 Mon Sep 17 00:00:00 2001 From: Herman van Rink Date: Wed, 8 Feb 2023 21:41:53 +0100 Subject: [PATCH 079/621] account root should be owned by root, #6462 --- server/plugins-available/shelluser_base_plugin.inc.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/server/plugins-available/shelluser_base_plugin.inc.php b/server/plugins-available/shelluser_base_plugin.inc.php index 2fc4f0dfc7..07c069c33b 100755 --- a/server/plugins-available/shelluser_base_plugin.inc.php +++ b/server/plugins-available/shelluser_base_plugin.inc.php @@ -147,9 +147,8 @@ function insert($event_name, $data) { } } - $app->system->chown($data['new']['dir'],$data['new']['username'],false); - $app->system->chgrp($data['new']['dir'],$data['new']['pgroup'],false); - + $app->system->chown($data['new']['dir'], 'root', false); + $app->system->chgrp($data['new']['dir'], 'root', false); // call the ssh-rsa update function $app->uses("getconf"); From 344b6bc6fcb7ea48bfbf3a19181c80300397b3fd Mon Sep 17 00:00:00 2001 From: Herman van Rink Date: Wed, 8 Feb 2023 22:02:04 +0100 Subject: [PATCH 080/621] Initialize new_lines array, #6463 --- install/lib/install.lib.php | 9 ++++----- server/lib/classes/file.inc.php | 9 ++++----- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/install/lib/install.lib.php b/install/lib/install.lib.php index 10de1d8fbf..5a0b0ceaf5 100644 --- a/install/lib/install.lib.php +++ b/install/lib/install.lib.php @@ -547,16 +547,15 @@ function remove_blank_lines($input, $file = 1){ $content = $input; } $lines = explode("\n", $content); + $new_lines = array(); if(!empty($lines)){ foreach($lines as $line){ if(trim($line) != '') $new_lines[] = $line; } } - if(is_array($new_lines)){ - $content = implode("\n", $new_lines); - } else { - $content = ''; - } + + $content = implode("\n", $new_lines); + if($file){ wf($input, $content); }else{ diff --git a/server/lib/classes/file.inc.php b/server/lib/classes/file.inc.php index 28757d0dd5..0cfdf6f2ed 100644 --- a/server/lib/classes/file.inc.php +++ b/server/lib/classes/file.inc.php @@ -118,16 +118,15 @@ function remove_blank_lines($input, $file = 1){ $content = $input; } $lines = explode("\n", $content); + $new_lines = array(); if(!empty($lines)){ foreach($lines as $line){ if(trim($line) != '') $new_lines[] = $line; } } - if(is_array($new_lines)){ - $content = implode("\n", $new_lines); - } else { - $content = ''; - } + + $content = implode("\n", $new_lines); + if($file){ $this->wf($input, $content); } else { From 1955d826405e6be0e5299d2ea4a369aa9437a12b Mon Sep 17 00:00:00 2001 From: Demian Date: Thu, 9 Feb 2023 15:48:21 +0100 Subject: [PATCH 081/621] fix checkDomainModuleDomain call on dns zone imports #6345 before we handed over domain_name instead of domain_id to the checkDomainModuleDomain function, which resulted in nothing. This fixes the call by querying the database for the domain_id for the given domain_name. --- interface/web/dns/dns_import.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/interface/web/dns/dns_import.php b/interface/web/dns/dns_import.php index b0c19bfff0..711e237db1 100644 --- a/interface/web/dns/dns_import.php +++ b/interface/web/dns/dns_import.php @@ -622,7 +622,11 @@ function fqdn_name( $owner, $origin ) { $error[] = $wb['zone_file_soa_parser']; $error[] = print_r( $soa, true ); } - if ($settings['use_domain_module'] == 'y' && ! $app->tools_sites->checkDomainModuleDomain($soa['name']) ) { + + $tmp_soa_name = trim($soa['name'], "."); + $tmp_domain_id = $app->db->queryOneRecord('SELECT domain_id FROM domain where domain = ?', $tmp_soa_name); + + if ($settings['use_domain_module'] == 'y' && ! $app->tools_sites->checkDomainModuleDomain($tmp_domain_id['domain_id']) ) { $valid_zone_file = false; $error[] = $wb['zone_not_allowed']; } From 7632c8ea346f4e0495a1cc45233cdaf23f674de3 Mon Sep 17 00:00:00 2001 From: Mladen B Date: Mon, 13 Feb 2023 09:52:13 +0000 Subject: [PATCH 082/621] Add docs for remote call monitor_jobqueue_count() --- .../API-docs/monitor_jobqueue_count.html | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 remoting_client/API-docs/monitor_jobqueue_count.html diff --git a/remoting_client/API-docs/monitor_jobqueue_count.html b/remoting_client/API-docs/monitor_jobqueue_count.html new file mode 100644 index 0000000000..81a98292ab --- /dev/null +++ b/remoting_client/API-docs/monitor_jobqueue_count.html @@ -0,0 +1,27 @@ + +ISPCOnfig 3 remote API documentation + + + + + + + + + + +
+

monitor_jobqueue_count($session_id, $server_id = 0);

+
+

Description:

+

Get the number of pending jobs from jobqueue.


+

Input Variables:

+

$session_id, $server_id

+

Parameters (in $params):

+

None

+

Output:

+

Returns the number of pending jobs from jobqueue.

+
+ + From 537caeb28eccbd2d3c7ec92f84abb4011d658a4e Mon Sep 17 00:00:00 2001 From: Petar Date: Tue, 14 Feb 2023 07:49:57 +0000 Subject: [PATCH 083/621] BUG doman>domain web_childdomain.tform.php --- interface/web/sites/form/web_childdomain.tform.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interface/web/sites/form/web_childdomain.tform.php b/interface/web/sites/form/web_childdomain.tform.php index 6d4f96e437..36718f5c9d 100644 --- a/interface/web/sites/form/web_childdomain.tform.php +++ b/interface/web/sites/form/web_childdomain.tform.php @@ -168,7 +168,7 @@ 'datatype' => 'VARCHAR', 'formtype' => 'SELECT', 'default' => '', - 'value' => array('' => 'no_redirect_txt', 'non_www_to_www' => 'domain.tld => www.domain.tld', 'www_to_non_www' => 'www.domain.tld => domain.tld', '*_domain_tld_to_domain_tld' => '*.doman.tld => domain.tld', '*_domain_tld_to_www_domain_tld' => '*.domain.tld => www.domain.tld', '*_to_domain_tld' => '* => domain.tld', '*_to_www_domain_tld' => '* => www.domain.tld') + 'value' => array('' => 'no_redirect_txt', 'non_www_to_www' => 'domain.tld => www.domain.tld', 'www_to_non_www' => 'www.domain.tld => domain.tld', '*_domain_tld_to_domain_tld' => '*.domain.tld => domain.tld', '*_domain_tld_to_www_domain_tld' => '*.domain.tld => www.domain.tld', '*_to_domain_tld' => '* => domain.tld', '*_to_www_domain_tld' => '* => www.domain.tld') ); } From bf853e67b8f6774b9e952a1760419f32c27af0d7 Mon Sep 17 00:00:00 2001 From: Petar Date: Tue, 14 Feb 2023 07:52:05 +0000 Subject: [PATCH 084/621] BUG doman>domain Update web_vhost_domain.tform.php --- interface/web/sites/form/web_vhost_domain.tform.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interface/web/sites/form/web_vhost_domain.tform.php b/interface/web/sites/form/web_vhost_domain.tform.php index 5c26f8254d..ba0d86f3eb 100644 --- a/interface/web/sites/form/web_vhost_domain.tform.php +++ b/interface/web/sites/form/web_vhost_domain.tform.php @@ -417,7 +417,7 @@ 'datatype' => 'VARCHAR', 'formtype' => 'SELECT', 'default' => '', - 'value' => array('' => 'no_redirect_txt', 'non_www_to_www' => 'domain.tld => www.domain.tld', 'www_to_non_www' => 'www.domain.tld => domain.tld', '*_domain_tld_to_domain_tld' => '*.doman.tld => domain.tld', '*_domain_tld_to_www_domain_tld' => '*.domain.tld => www.domain.tld', '*_to_domain_tld' => '* => domain.tld', '*_to_www_domain_tld' => '* => www.domain.tld') + 'value' => array('' => 'no_redirect_txt', 'non_www_to_www' => 'domain.tld => www.domain.tld', 'www_to_non_www' => 'www.domain.tld => domain.tld', '*_domain_tld_to_domain_tld' => '*.domain.tld => domain.tld', '*_domain_tld_to_www_domain_tld' => '*.domain.tld => www.domain.tld', '*_to_domain_tld' => '* => domain.tld', '*_to_www_domain_tld' => '* => www.domain.tld') ), 'rewrite_rules' => array ( 'datatype' => 'TEXT', From 5e9a4fec54fd199004c240f483c7fa531ee30ec8 Mon Sep 17 00:00:00 2001 From: Andreas Palm Date: Tue, 28 Feb 2023 22:49:24 +0100 Subject: [PATCH 085/621] include minor number in apache version for vhost.conf.master, #6471 --- server/plugins-available/apache2_plugin.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/plugins-available/apache2_plugin.inc.php b/server/plugins-available/apache2_plugin.inc.php index d411cc74dc..1d3d036583 100644 --- a/server/plugins-available/apache2_plugin.inc.php +++ b/server/plugins-available/apache2_plugin.inc.php @@ -1341,7 +1341,7 @@ function update($event_name, $data) { $vhost_data['custom_sendmail_path'] = (isset($custom_sendmail_path) && $custom_sendmail_path) ? 'y' : 'n'; $tpl->setVar($vhost_data); - $tpl->setVar('apache_version', $app->system->getapacheversion()); + $tpl->setVar('apache_version', $app->system->getapacheversion(true)); // Rewrite rules $rewrite_rules = array(); From 30a569bade1717fd3c5e70acc62fdcecef37290c Mon Sep 17 00:00:00 2001 From: Michael Seevogel Date: Thu, 9 Mar 2023 14:04:48 +0100 Subject: [PATCH 086/621] fixes displaying server_name in single server setups --- interface/web/admin/server_config_edit.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interface/web/admin/server_config_edit.php b/interface/web/admin/server_config_edit.php index 32aa270893..c19433b0e4 100644 --- a/interface/web/admin/server_config_edit.php +++ b/interface/web/admin/server_config_edit.php @@ -125,7 +125,7 @@ function onShowEdit() { function onShowEnd() { global $app; - $tmp = $app->db->queryOneRecord("SELECT server_name FROM server WHERE server_id = ? AND ((SELECT COUNT(*) FROM server) > 1)", $this->id); + $tmp = $app->db->queryOneRecord("SELECT server_name FROM server WHERE server_id = ? AND ((SELECT COUNT(*) FROM server) >= 1)", $this->id); $app->tpl->setVar('server_name', $app->functions->htmlentities($tmp['server_name'])); unset($tmp); From 942b3cb0840c458f69b1ff47b49c42c83d4874f1 Mon Sep 17 00:00:00 2001 From: Till Brehm Date: Thu, 9 Mar 2023 13:46:43 +0000 Subject: [PATCH 087/621] Update interface/lib/classes/listform_actions.inc.php --- interface/lib/classes/listform_actions.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interface/lib/classes/listform_actions.inc.php b/interface/lib/classes/listform_actions.inc.php index 7ffc84c32b..a40ace3c42 100644 --- a/interface/lib/classes/listform_actions.inc.php +++ b/interface/lib/classes/listform_actions.inc.php @@ -226,7 +226,7 @@ public function getQueryString($no_limit = false) { } $sql_where = $app->listform->getSearchSQL($sql_where); - if(isset($app->listform->listDef['join_sql'])) $sql_where .= ' AND '.$app->listform->listDef['join_sql']; + if(isset($app->listform->listDef['join_sql']) && $app->listform->listDef['join_sql'] != '') $sql_where .= ' AND '.$app->listform->listDef['join_sql']; $app->tpl->setVar($app->listform->searchValues); $order_by_sql = $this->SQLOrderBy; From 62a6d04f0b279f6419e2422e7f22d39329dc0952 Mon Sep 17 00:00:00 2001 From: Andreas Palm Date: Fri, 10 Mar 2023 15:06:25 +0100 Subject: [PATCH 088/621] make #6471 backwards compatible by keeping the old variable --- server/conf/vhost.conf.master | 2 +- server/plugins-available/apache2_plugin.inc.php | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/server/conf/vhost.conf.master b/server/conf/vhost.conf.master index f687bee839..ea1c847344 100644 --- a/server/conf/vhost.conf.master +++ b/server/conf/vhost.conf.master @@ -13,7 +13,7 @@ - + RemoteIPProxyProtocol On diff --git a/server/plugins-available/apache2_plugin.inc.php b/server/plugins-available/apache2_plugin.inc.php index 1d3d036583..d829b5979e 100644 --- a/server/plugins-available/apache2_plugin.inc.php +++ b/server/plugins-available/apache2_plugin.inc.php @@ -1341,7 +1341,8 @@ function update($event_name, $data) { $vhost_data['custom_sendmail_path'] = (isset($custom_sendmail_path) && $custom_sendmail_path) ? 'y' : 'n'; $tpl->setVar($vhost_data); - $tpl->setVar('apache_version', $app->system->getapacheversion(true)); + $tpl->setVar('apache_version', $app->system->getapacheversion()); + $tpl->setVar('apache_full_version', $app->system->getapacheversion(true)); // Rewrite rules $rewrite_rules = array(); From 1d5d2fd6e54b460b7e0f63b23bb077cfd8566e3c Mon Sep 17 00:00:00 2001 From: Andreas Palm Date: Tue, 14 Mar 2023 23:01:57 +0100 Subject: [PATCH 089/621] add new config options for PROXY protocol in server_config web section #6477 --- install/tpl/server.ini.master | 4 ++++ .../web/admin/form/server_config.tform.php | 19 +++++++++++++++++-- .../web/admin/lib/lang/ar_server_config.lng | 1 + .../web/admin/lib/lang/bg_server_config.lng | 1 + .../web/admin/lib/lang/br_server_config.lng | 1 + .../web/admin/lib/lang/ca_server_config.lng | 1 + .../web/admin/lib/lang/cz_server_config.lng | 1 + .../web/admin/lib/lang/de_server_config.lng | 1 + .../web/admin/lib/lang/dk_server_config.lng | 1 + .../web/admin/lib/lang/el_server_config.lng | 1 + .../web/admin/lib/lang/en_server_config.lng | 1 + .../web/admin/lib/lang/es_server_config.lng | 1 + .../web/admin/lib/lang/fi_server_config.lng | 1 + .../web/admin/lib/lang/fr_server_config.lng | 1 + .../web/admin/lib/lang/hr_server_config.lng | 1 + .../web/admin/lib/lang/hu_server_config.lng | 1 + .../web/admin/lib/lang/id_server_config.lng | 1 + .../web/admin/lib/lang/it_server_config.lng | 1 + .../web/admin/lib/lang/ja_server_config.lng | 1 + .../web/admin/lib/lang/nl_server_config.lng | 1 + .../web/admin/lib/lang/pl_server_config.lng | 1 + .../web/admin/lib/lang/pt_server_config.lng | 1 + .../web/admin/lib/lang/ro_server_config.lng | 1 + .../web/admin/lib/lang/ru_server_config.lng | 1 + .../web/admin/lib/lang/se_server_config.lng | 1 + .../web/admin/lib/lang/sk_server_config.lng | 1 + .../web/admin/lib/lang/tr_server_config.lng | 1 + .../templates/server_config_web_edit.htm | 12 +++++++++++- 28 files changed, 57 insertions(+), 3 deletions(-) diff --git a/install/tpl/server.ini.master b/install/tpl/server.ini.master index c9949c2793..a9168355eb 100644 --- a/install/tpl/server.ini.master +++ b/install/tpl/server.ini.master @@ -136,6 +136,10 @@ overquota_notify_onok=n logging=yes php_fpm_reload_mode=reload php_fpm_default_chroot=n +vhost_proxy_protocol_enabled=n +vhost_proxy_protocol_protocols=ipv4 +vhost_proxy_protocol_http_port=880 +vhost_proxy_protocol_https_port=8443 [dns] bind_user=root diff --git a/interface/web/admin/form/server_config.tform.php b/interface/web/admin/form/server_config.tform.php index 679ebb2b7f..f1bda56033 100644 --- a/interface/web/admin/form/server_config.tform.php +++ b/interface/web/admin/form/server_config.tform.php @@ -926,10 +926,25 @@ ), 'vhost_proxy_protocol_enabled' => array ( 'datatype' => 'VARCHAR', - 'formtype' => 'CHECKBOX', + 'formtype' => 'SELECT', 'default' => 'n', - 'value' => array(0 => 'n',1 => 'y') + 'value' => array( + 'n' => 'Disabled', + 'y' => 'Enabled (per site)', + 'all' => 'Enabled (all sites)' + ) ), + 'vhost_proxy_protocol_protocols' => array( + 'datatype' => 'VARCHAR', + 'formtype' => 'SELECT', + 'value' => array( + 'none' => 'None', + 'ipv4' => 'IPv4', + 'ipv6' => 'IPv6', + 'ipv4,ipv6' => 'IPv4 + IPv6' + ), + 'default' => 'ipv4' + ), 'vhost_proxy_protocol_http_port' => array( 'datatype' => 'VARCHAR', 'formtype' => 'TEXT', diff --git a/interface/web/admin/lib/lang/ar_server_config.lng b/interface/web/admin/lib/lang/ar_server_config.lng index a58dbaaf44..3858a5a095 100644 --- a/interface/web/admin/lib/lang/ar_server_config.lng +++ b/interface/web/admin/lib/lang/ar_server_config.lng @@ -333,6 +333,7 @@ $wb['tooltip_rspamd_redis_bayes_servers_txt'] = 'Redis server(s) which Rspamd wi $wb['rspamd_redis_bayes_password_txt'] = 'Redis Password for Bayes'; $wb['tooltip_rspamd_redis_bayes_password_txt'] = 'Password for Bayes Redis Server (leave blank if unused).'; $wb['vhost_proxy_protocol_enabled_txt'] = 'Enable PROXY Protocol'; +$wb['vhost_proxy_protocol_protocols_txt'] = 'Use PROXY Protocol on'; $wb['vhost_proxy_protocol_http_port_txt'] = 'PROXY Protocol HTTP Port'; $wb['vhost_proxy_protocol_https_port_txt'] = 'PROXY Protocol HTTPS Port'; $wb['jailkit_chroot_authorized_keys_template_txt'] = 'Jailkit authorized_keys template'; diff --git a/interface/web/admin/lib/lang/bg_server_config.lng b/interface/web/admin/lib/lang/bg_server_config.lng index c856e7640f..0d46f65e4d 100644 --- a/interface/web/admin/lib/lang/bg_server_config.lng +++ b/interface/web/admin/lib/lang/bg_server_config.lng @@ -333,6 +333,7 @@ $wb['tooltip_rspamd_redis_bayes_servers_txt'] = 'Redis server(s) which Rspamd wi $wb['rspamd_redis_bayes_password_txt'] = 'Redis Password for Bayes'; $wb['tooltip_rspamd_redis_bayes_password_txt'] = 'Password for Bayes Redis Server (leave blank if unused).'; $wb['vhost_proxy_protocol_enabled_txt'] = 'Enable PROXY Protocol'; +$wb['vhost_proxy_protocol_protocols_txt'] = 'Use PROXY Protocol on'; $wb['vhost_proxy_protocol_http_port_txt'] = 'PROXY Protocol HTTP Port'; $wb['vhost_proxy_protocol_https_port_txt'] = 'PROXY Protocol HTTPS Port'; $wb['jailkit_chroot_authorized_keys_template_txt'] = 'Jailkit authorized_keys template'; diff --git a/interface/web/admin/lib/lang/br_server_config.lng b/interface/web/admin/lib/lang/br_server_config.lng index 1041676ceb..d90e835828 100644 --- a/interface/web/admin/lib/lang/br_server_config.lng +++ b/interface/web/admin/lib/lang/br_server_config.lng @@ -333,6 +333,7 @@ $wb['tooltip_rspamd_redis_bayes_servers_txt'] = 'Redis server(s) which Rspamd wi $wb['rspamd_redis_bayes_password_txt'] = 'Redis Password for Bayes'; $wb['tooltip_rspamd_redis_bayes_password_txt'] = 'Password for Bayes Redis Server (leave blank if unused).'; $wb['vhost_proxy_protocol_enabled_txt'] = 'Habilitar protocolo PROXY'; +$wb['vhost_proxy_protocol_protocols_txt'] = 'Use PROXY Protocol on'; $wb['vhost_proxy_protocol_http_port_txt'] = 'Porta HTTP protocolo PROXY'; $wb['vhost_proxy_protocol_https_port_txt'] = 'Porta HTTPS protocolo PROXY'; $wb['jailkit_chroot_authorized_keys_template_txt'] = 'Gabarito authorized_keys Jailkit'; diff --git a/interface/web/admin/lib/lang/ca_server_config.lng b/interface/web/admin/lib/lang/ca_server_config.lng index 3d4ad3a70c..4f0abe2ee0 100644 --- a/interface/web/admin/lib/lang/ca_server_config.lng +++ b/interface/web/admin/lib/lang/ca_server_config.lng @@ -333,6 +333,7 @@ $wb['tooltip_rspamd_redis_bayes_servers_txt'] = 'Redis server(s) which Rspamd wi $wb['rspamd_redis_bayes_password_txt'] = 'Redis Password for Bayes'; $wb['tooltip_rspamd_redis_bayes_password_txt'] = 'Password for Bayes Redis Server (leave blank if unused).'; $wb['vhost_proxy_protocol_enabled_txt'] = 'Enable PROXY Protocol'; +$wb['vhost_proxy_protocol_protocols_txt'] = 'Use PROXY Protocol on'; $wb['vhost_proxy_protocol_http_port_txt'] = 'PROXY Protocol HTTP Port'; $wb['vhost_proxy_protocol_https_port_txt'] = 'PROXY Protocol HTTPS Port'; $wb['jailkit_chroot_authorized_keys_template_txt'] = 'Jailkit authorized_keys template'; diff --git a/interface/web/admin/lib/lang/cz_server_config.lng b/interface/web/admin/lib/lang/cz_server_config.lng index bdc1152cbc..f716027e4e 100644 --- a/interface/web/admin/lib/lang/cz_server_config.lng +++ b/interface/web/admin/lib/lang/cz_server_config.lng @@ -333,6 +333,7 @@ $wb['tooltip_rspamd_redis_bayes_servers_txt'] = 'Redis server(s) which Rspamd wi $wb['rspamd_redis_bayes_password_txt'] = 'Redis Password for Bayes'; $wb['tooltip_rspamd_redis_bayes_password_txt'] = 'Password for Bayes Redis Server (leave blank if unused).'; $wb['vhost_proxy_protocol_enabled_txt'] = 'Enable PROXY Protocol'; +$wb['vhost_proxy_protocol_protocols_txt'] = 'Use PROXY Protocol on'; $wb['vhost_proxy_protocol_http_port_txt'] = 'PROXY Protocol HTTP Port'; $wb['vhost_proxy_protocol_https_port_txt'] = 'PROXY Protocol HTTPS Port'; $wb['jailkit_chroot_authorized_keys_template_txt'] = 'Jailkit authorized_keys template'; diff --git a/interface/web/admin/lib/lang/de_server_config.lng b/interface/web/admin/lib/lang/de_server_config.lng index 42046a2e44..e3e1fb8abe 100644 --- a/interface/web/admin/lib/lang/de_server_config.lng +++ b/interface/web/admin/lib/lang/de_server_config.lng @@ -333,6 +333,7 @@ $wb['tooltip_rspamd_redis_bayes_servers_txt'] = 'Redis server(s) which Rspamd wi $wb['rspamd_redis_bayes_password_txt'] = 'Redis Password for Bayes'; $wb['tooltip_rspamd_redis_bayes_password_txt'] = 'Password for Bayes Redis Server (leave blank if unused).'; $wb['vhost_proxy_protocol_enabled_txt'] = 'Enable PROXY Protocol'; +$wb['vhost_proxy_protocol_protocols_txt'] = 'Use PROXY Protocol on'; $wb['vhost_proxy_protocol_http_port_txt'] = 'PROXY Protocol HTTP Port'; $wb['vhost_proxy_protocol_https_port_txt'] = 'PROXY Protocol HTTPS Port'; $wb['jailkit_chroot_authorized_keys_template_txt'] = 'Jailkit authorized_keys Template'; diff --git a/interface/web/admin/lib/lang/dk_server_config.lng b/interface/web/admin/lib/lang/dk_server_config.lng index d7b081150d..a3cd8b22be 100644 --- a/interface/web/admin/lib/lang/dk_server_config.lng +++ b/interface/web/admin/lib/lang/dk_server_config.lng @@ -333,6 +333,7 @@ $wb['tooltip_rspamd_redis_bayes_servers_txt'] = 'Redis server(s) which Rspamd wi $wb['rspamd_redis_bayes_password_txt'] = 'Redis Password for Bayes'; $wb['tooltip_rspamd_redis_bayes_password_txt'] = 'Password for Bayes Redis Server (leave blank if unused).'; $wb['vhost_proxy_protocol_enabled_txt'] = 'Enable PROXY Protocol'; +$wb['vhost_proxy_protocol_protocols_txt'] = 'Use PROXY Protocol on'; $wb['vhost_proxy_protocol_http_port_txt'] = 'PROXY Protocol HTTP Port'; $wb['vhost_proxy_protocol_https_port_txt'] = 'PROXY Protocol HTTPS Port'; $wb['jailkit_chroot_authorized_keys_template_txt'] = 'Jailkit authorized_keys template'; diff --git a/interface/web/admin/lib/lang/el_server_config.lng b/interface/web/admin/lib/lang/el_server_config.lng index 40af42057f..4dd7275e04 100644 --- a/interface/web/admin/lib/lang/el_server_config.lng +++ b/interface/web/admin/lib/lang/el_server_config.lng @@ -333,6 +333,7 @@ $wb['tooltip_rspamd_redis_bayes_servers_txt'] = 'Redis server(s) which Rspamd wi $wb['rspamd_redis_bayes_password_txt'] = 'Redis Password for Bayes'; $wb['tooltip_rspamd_redis_bayes_password_txt'] = 'Password for Bayes Redis Server (leave blank if unused).'; $wb['vhost_proxy_protocol_enabled_txt'] = 'Enable PROXY Protocol'; +$wb['vhost_proxy_protocol_protocols_txt'] = 'Use PROXY Protocol on'; $wb['vhost_proxy_protocol_http_port_txt'] = 'PROXY Protocol HTTP Port'; $wb['vhost_proxy_protocol_https_port_txt'] = 'PROXY Protocol HTTPS Port'; $wb['jailkit_chroot_authorized_keys_template_txt'] = 'Jailkit authorized_keys template'; diff --git a/interface/web/admin/lib/lang/en_server_config.lng b/interface/web/admin/lib/lang/en_server_config.lng index 363f528fba..f93598b749 100644 --- a/interface/web/admin/lib/lang/en_server_config.lng +++ b/interface/web/admin/lib/lang/en_server_config.lng @@ -344,6 +344,7 @@ $wb['tooltip_rspamd_redis_bayes_servers_txt'] = 'Redis server(s) which Rspamd wi $wb['rspamd_redis_bayes_password_txt'] = 'Redis Password for Bayes'; $wb['tooltip_rspamd_redis_bayes_password_txt'] = 'Password for Bayes Redis Server (leave blank if unused).'; $wb['vhost_proxy_protocol_enabled_txt'] = 'Enable PROXY Protocol'; +$wb['vhost_proxy_protocol_protocols_txt'] = 'Use PROXY Protocol on'; $wb['vhost_proxy_protocol_http_port_txt'] = 'PROXY Protocol HTTP Port'; $wb['vhost_proxy_protocol_https_port_txt'] = 'PROXY Protocol HTTPS Port'; $wb['jailkit_hardlinks_txt'] = 'Hardlinks within Jailkit chroot'; diff --git a/interface/web/admin/lib/lang/es_server_config.lng b/interface/web/admin/lib/lang/es_server_config.lng index 528dfe36af..dec63be52f 100644 --- a/interface/web/admin/lib/lang/es_server_config.lng +++ b/interface/web/admin/lib/lang/es_server_config.lng @@ -333,6 +333,7 @@ $wb['tooltip_rspamd_redis_bayes_servers_txt'] = 'Redis server(s) which Rspamd wi $wb['rspamd_redis_bayes_password_txt'] = 'Redis Password for Bayes'; $wb['tooltip_rspamd_redis_bayes_password_txt'] = 'Password for Bayes Redis Server (leave blank if unused).'; $wb['vhost_proxy_protocol_enabled_txt'] = 'Enable PROXY Protocol'; +$wb['vhost_proxy_protocol_protocols_txt'] = 'Use PROXY Protocol on'; $wb['vhost_proxy_protocol_http_port_txt'] = 'PROXY Protocol HTTP Port'; $wb['vhost_proxy_protocol_https_port_txt'] = 'PROXY Protocol HTTPS Port'; $wb['jailkit_chroot_authorized_keys_template_txt'] = 'Jailkit authorized_keys template'; diff --git a/interface/web/admin/lib/lang/fi_server_config.lng b/interface/web/admin/lib/lang/fi_server_config.lng index 906013f785..96dc050503 100644 --- a/interface/web/admin/lib/lang/fi_server_config.lng +++ b/interface/web/admin/lib/lang/fi_server_config.lng @@ -333,6 +333,7 @@ $wb['tooltip_rspamd_redis_bayes_servers_txt'] = 'Redis server(s) which Rspamd wi $wb['rspamd_redis_bayes_password_txt'] = 'Redis Password for Bayes'; $wb['tooltip_rspamd_redis_bayes_password_txt'] = 'Password for Bayes Redis Server (leave blank if unused).'; $wb['vhost_proxy_protocol_enabled_txt'] = 'Enable PROXY Protocol'; +$wb['vhost_proxy_protocol_protocols_txt'] = 'Use PROXY Protocol on'; $wb['vhost_proxy_protocol_http_port_txt'] = 'PROXY Protocol HTTP Port'; $wb['vhost_proxy_protocol_https_port_txt'] = 'PROXY Protocol HTTPS Port'; $wb['jailkit_chroot_authorized_keys_template_txt'] = 'Jailkit authorized_keys template'; diff --git a/interface/web/admin/lib/lang/fr_server_config.lng b/interface/web/admin/lib/lang/fr_server_config.lng index 274c2b6804..1733bcdbd7 100644 --- a/interface/web/admin/lib/lang/fr_server_config.lng +++ b/interface/web/admin/lib/lang/fr_server_config.lng @@ -333,6 +333,7 @@ $wb['tooltip_rspamd_redis_bayes_servers_txt'] = 'Redis server(s) which Rspamd wi $wb['rspamd_redis_bayes_password_txt'] = 'Redis Password for Bayes'; $wb['tooltip_rspamd_redis_bayes_password_txt'] = 'Password for Bayes Redis Server (leave blank if unused).'; $wb['vhost_proxy_protocol_enabled_txt'] = 'Enable PROXY Protocol'; +$wb['vhost_proxy_protocol_protocols_txt'] = 'Use PROXY Protocol on'; $wb['vhost_proxy_protocol_http_port_txt'] = 'PROXY Protocol HTTP Port'; $wb['vhost_proxy_protocol_https_port_txt'] = 'PROXY Protocol HTTPS Port'; $wb['jailkit_chroot_authorized_keys_template_txt'] = 'Jailkit authorized_keys template'; diff --git a/interface/web/admin/lib/lang/hr_server_config.lng b/interface/web/admin/lib/lang/hr_server_config.lng index 5d35d0d33f..b0ec440b5d 100644 --- a/interface/web/admin/lib/lang/hr_server_config.lng +++ b/interface/web/admin/lib/lang/hr_server_config.lng @@ -333,6 +333,7 @@ $wb['tooltip_rspamd_redis_bayes_servers_txt'] = 'Redis server(s) which Rspamd wi $wb['rspamd_redis_bayes_password_txt'] = 'Redis Password for Bayes'; $wb['tooltip_rspamd_redis_bayes_password_txt'] = 'Password for Bayes Redis Server (leave blank if unused).'; $wb['vhost_proxy_protocol_enabled_txt'] = 'Enable PROXY Protocol'; +$wb['vhost_proxy_protocol_protocols_txt'] = 'Use PROXY Protocol on'; $wb['vhost_proxy_protocol_http_port_txt'] = 'PROXY Protocol HTTP Port'; $wb['vhost_proxy_protocol_https_port_txt'] = 'PROXY Protocol HTTPS Port'; $wb['jailkit_chroot_authorized_keys_template_txt'] = 'Jailkit authorized_keys template'; diff --git a/interface/web/admin/lib/lang/hu_server_config.lng b/interface/web/admin/lib/lang/hu_server_config.lng index 74a5b15701..2dab5571b9 100644 --- a/interface/web/admin/lib/lang/hu_server_config.lng +++ b/interface/web/admin/lib/lang/hu_server_config.lng @@ -333,6 +333,7 @@ $wb['tooltip_rspamd_redis_bayes_servers_txt'] = 'Redis server(s) which Rspamd wi $wb['rspamd_redis_bayes_password_txt'] = 'Redis Password for Bayes'; $wb['tooltip_rspamd_redis_bayes_password_txt'] = 'Password for Bayes Redis Server (leave blank if unused).'; $wb['vhost_proxy_protocol_enabled_txt'] = 'Enable PROXY Protocol'; +$wb['vhost_proxy_protocol_protocols_txt'] = 'Use PROXY Protocol on'; $wb['vhost_proxy_protocol_http_port_txt'] = 'PROXY Protocol HTTP Port'; $wb['vhost_proxy_protocol_https_port_txt'] = 'PROXY Protocol HTTPS Port'; $wb['jailkit_chroot_authorized_keys_template_txt'] = 'Jailkit authorized_keys template'; diff --git a/interface/web/admin/lib/lang/id_server_config.lng b/interface/web/admin/lib/lang/id_server_config.lng index 2419ee63f1..3bbc2cb620 100644 --- a/interface/web/admin/lib/lang/id_server_config.lng +++ b/interface/web/admin/lib/lang/id_server_config.lng @@ -333,6 +333,7 @@ $wb['tooltip_rspamd_redis_bayes_servers_txt'] = 'Redis server(s) which Rspamd wi $wb['rspamd_redis_bayes_password_txt'] = 'Redis Password for Bayes'; $wb['tooltip_rspamd_redis_bayes_password_txt'] = 'Password for Bayes Redis Server (leave blank if unused).'; $wb['vhost_proxy_protocol_enabled_txt'] = 'Enable PROXY Protocol'; +$wb['vhost_proxy_protocol_protocols_txt'] = 'Use PROXY Protocol on'; $wb['vhost_proxy_protocol_http_port_txt'] = 'PROXY Protocol HTTP Port'; $wb['vhost_proxy_protocol_https_port_txt'] = 'PROXY Protocol HTTPS Port'; $wb['jailkit_chroot_authorized_keys_template_txt'] = 'Jailkit authorized_keys template'; diff --git a/interface/web/admin/lib/lang/it_server_config.lng b/interface/web/admin/lib/lang/it_server_config.lng index 4d01d70b22..ae62590e52 100644 --- a/interface/web/admin/lib/lang/it_server_config.lng +++ b/interface/web/admin/lib/lang/it_server_config.lng @@ -332,6 +332,7 @@ $wb['tooltip_rspamd_redis_bayes_servers_txt'] = 'Redis server(s) che Rspamd user $wb['rspamd_redis_bayes_password_txt'] = 'Redis Password per Bayes'; $wb['tooltip_rspamd_redis_bayes_password_txt'] = 'Password per Bayes Redis Server (lasciare vuoto se non usato).'; $wb['vhost_proxy_protocol_enabled_txt'] = 'Abilita protocollo PROXY'; +$wb['vhost_proxy_protocol_protocols_txt'] = 'Use PROXY Protocol on'; $wb['vhost_proxy_protocol_http_port_txt'] = 'Porta HHTP per il protocollo PROXY'; $wb['vhost_proxy_protocol_https_port_txt'] = 'Porta HHTPS per il protocollo PROXY'; $wb['jailkit_chroot_authorized_keys_template_txt'] = 'modello Jailkit authorized_keys'; diff --git a/interface/web/admin/lib/lang/ja_server_config.lng b/interface/web/admin/lib/lang/ja_server_config.lng index 66d505562b..3ab9fb5b94 100644 --- a/interface/web/admin/lib/lang/ja_server_config.lng +++ b/interface/web/admin/lib/lang/ja_server_config.lng @@ -333,6 +333,7 @@ $wb['tooltip_rspamd_redis_bayes_servers_txt'] = 'Redis server(s) which Rspamd wi $wb['rspamd_redis_bayes_password_txt'] = 'Redis Password for Bayes'; $wb['tooltip_rspamd_redis_bayes_password_txt'] = 'Password for Bayes Redis Server (leave blank if unused).'; $wb['vhost_proxy_protocol_enabled_txt'] = 'Enable PROXY Protocol'; +$wb['vhost_proxy_protocol_protocols_txt'] = 'Use PROXY Protocol on'; $wb['vhost_proxy_protocol_http_port_txt'] = 'PROXY Protocol HTTP Port'; $wb['vhost_proxy_protocol_https_port_txt'] = 'PROXY Protocol HTTPS Port'; $wb['jailkit_chroot_authorized_keys_template_txt'] = 'Jailkit authorized_keys template'; diff --git a/interface/web/admin/lib/lang/nl_server_config.lng b/interface/web/admin/lib/lang/nl_server_config.lng index 8ea60a21a8..845ddd018d 100644 --- a/interface/web/admin/lib/lang/nl_server_config.lng +++ b/interface/web/admin/lib/lang/nl_server_config.lng @@ -333,6 +333,7 @@ $wb['tooltip_rspamd_redis_bayes_servers_txt'] = 'Redis server(s) which Rspamd wi $wb['rspamd_redis_bayes_password_txt'] = 'Redis Password for Bayes'; $wb['tooltip_rspamd_redis_bayes_password_txt'] = 'Password for Bayes Redis Server (leave blank if unused).'; $wb['vhost_proxy_protocol_enabled_txt'] = 'Enable PROXY Protocol'; +$wb['vhost_proxy_protocol_protocols_txt'] = 'Use PROXY Protocol on'; $wb['vhost_proxy_protocol_http_port_txt'] = 'PROXY Protocol HTTP Port'; $wb['vhost_proxy_protocol_https_port_txt'] = 'PROXY Protocol HTTPS Port'; $wb['jailkit_chroot_authorized_keys_template_txt'] = 'Jailkit authorized_keys template'; diff --git a/interface/web/admin/lib/lang/pl_server_config.lng b/interface/web/admin/lib/lang/pl_server_config.lng index c186f5d2a6..bd7df00c12 100644 --- a/interface/web/admin/lib/lang/pl_server_config.lng +++ b/interface/web/admin/lib/lang/pl_server_config.lng @@ -333,6 +333,7 @@ $wb['tooltip_rspamd_redis_bayes_servers_txt'] = 'Redis server(s) which Rspamd wi $wb['rspamd_redis_bayes_password_txt'] = 'Redis Password for Bayes'; $wb['tooltip_rspamd_redis_bayes_password_txt'] = 'Password for Bayes Redis Server (leave blank if unused).'; $wb['vhost_proxy_protocol_enabled_txt'] = 'Enable PROXY Protocol'; +$wb['vhost_proxy_protocol_protocols_txt'] = 'Use PROXY Protocol on'; $wb['vhost_proxy_protocol_http_port_txt'] = 'PROXY Protocol HTTP Port'; $wb['vhost_proxy_protocol_https_port_txt'] = 'PROXY Protocol HTTPS Port'; $wb['jailkit_chroot_authorized_keys_template_txt'] = 'Jailkit authorized_keys template'; diff --git a/interface/web/admin/lib/lang/pt_server_config.lng b/interface/web/admin/lib/lang/pt_server_config.lng index 2e398500db..977bb97f8e 100644 --- a/interface/web/admin/lib/lang/pt_server_config.lng +++ b/interface/web/admin/lib/lang/pt_server_config.lng @@ -333,6 +333,7 @@ $wb['tooltip_rspamd_redis_bayes_servers_txt'] = 'Redis server(s) which Rspamd wi $wb['rspamd_redis_bayes_password_txt'] = 'Redis Password for Bayes'; $wb['tooltip_rspamd_redis_bayes_password_txt'] = 'Password for Bayes Redis Server (leave blank if unused).'; $wb['vhost_proxy_protocol_enabled_txt'] = 'Enable PROXY Protocol'; +$wb['vhost_proxy_protocol_protocols_txt'] = 'Use PROXY Protocol on'; $wb['vhost_proxy_protocol_http_port_txt'] = 'PROXY Protocol HTTP Port'; $wb['vhost_proxy_protocol_https_port_txt'] = 'PROXY Protocol HTTPS Port'; $wb['jailkit_chroot_authorized_keys_template_txt'] = 'Jailkit authorized_keys template'; diff --git a/interface/web/admin/lib/lang/ro_server_config.lng b/interface/web/admin/lib/lang/ro_server_config.lng index 2756ae7acd..783f444027 100644 --- a/interface/web/admin/lib/lang/ro_server_config.lng +++ b/interface/web/admin/lib/lang/ro_server_config.lng @@ -333,6 +333,7 @@ $wb['tooltip_rspamd_redis_bayes_servers_txt'] = 'Redis server(s) which Rspamd wi $wb['rspamd_redis_bayes_password_txt'] = 'Redis Password for Bayes'; $wb['tooltip_rspamd_redis_bayes_password_txt'] = 'Password for Bayes Redis Server (leave blank if unused).'; $wb['vhost_proxy_protocol_enabled_txt'] = 'Enable PROXY Protocol'; +$wb['vhost_proxy_protocol_protocols_txt'] = 'Use PROXY Protocol on'; $wb['vhost_proxy_protocol_http_port_txt'] = 'PROXY Protocol HTTP Port'; $wb['vhost_proxy_protocol_https_port_txt'] = 'PROXY Protocol HTTPS Port'; $wb['jailkit_chroot_authorized_keys_template_txt'] = 'Jailkit authorized_keys template'; diff --git a/interface/web/admin/lib/lang/ru_server_config.lng b/interface/web/admin/lib/lang/ru_server_config.lng index 2fbf9cf7d6..a0a8005316 100644 --- a/interface/web/admin/lib/lang/ru_server_config.lng +++ b/interface/web/admin/lib/lang/ru_server_config.lng @@ -333,6 +333,7 @@ $wb['tooltip_rspamd_redis_bayes_servers_txt'] = 'Redis server(s) which Rspamd wi $wb['rspamd_redis_bayes_password_txt'] = 'Redis Password for Bayes'; $wb['tooltip_rspamd_redis_bayes_password_txt'] = 'Password for Bayes Redis Server (leave blank if unused).'; $wb['vhost_proxy_protocol_enabled_txt'] = 'Enable PROXY Protocol'; +$wb['vhost_proxy_protocol_protocols_txt'] = 'Use PROXY Protocol on'; $wb['vhost_proxy_protocol_http_port_txt'] = 'PROXY Protocol HTTP Port'; $wb['vhost_proxy_protocol_https_port_txt'] = 'PROXY Protocol HTTPS Port'; $wb['jailkit_chroot_authorized_keys_template_txt'] = 'Jailkit authorized_keys template'; diff --git a/interface/web/admin/lib/lang/se_server_config.lng b/interface/web/admin/lib/lang/se_server_config.lng index e21017769c..a9b26af274 100644 --- a/interface/web/admin/lib/lang/se_server_config.lng +++ b/interface/web/admin/lib/lang/se_server_config.lng @@ -333,6 +333,7 @@ $wb['tooltip_rspamd_redis_bayes_servers_txt'] = 'Redis server(s) which Rspamd wi $wb['rspamd_redis_bayes_password_txt'] = 'Redis Password for Bayes'; $wb['tooltip_rspamd_redis_bayes_password_txt'] = 'Password for Bayes Redis Server (leave blank if unused).'; $wb['vhost_proxy_protocol_enabled_txt'] = 'Enable PROXY Protocol'; +$wb['vhost_proxy_protocol_protocols_txt'] = 'Use PROXY Protocol on'; $wb['vhost_proxy_protocol_http_port_txt'] = 'PROXY Protocol HTTP Port'; $wb['vhost_proxy_protocol_https_port_txt'] = 'PROXY Protocol HTTPS Port'; $wb['jailkit_chroot_authorized_keys_template_txt'] = 'Jailkit authorized_keys template'; diff --git a/interface/web/admin/lib/lang/sk_server_config.lng b/interface/web/admin/lib/lang/sk_server_config.lng index 9ec5367be5..a868390d86 100644 --- a/interface/web/admin/lib/lang/sk_server_config.lng +++ b/interface/web/admin/lib/lang/sk_server_config.lng @@ -333,6 +333,7 @@ $wb['tooltip_rspamd_redis_bayes_servers_txt'] = 'Redis server(s) which Rspamd wi $wb['rspamd_redis_bayes_password_txt'] = 'Redis Password for Bayes'; $wb['tooltip_rspamd_redis_bayes_password_txt'] = 'Password for Bayes Redis Server (leave blank if unused).'; $wb['vhost_proxy_protocol_enabled_txt'] = 'Enable PROXY Protocol'; +$wb['vhost_proxy_protocol_protocols_txt'] = 'Use PROXY Protocol on'; $wb['vhost_proxy_protocol_http_port_txt'] = 'PROXY Protocol HTTP Port'; $wb['vhost_proxy_protocol_https_port_txt'] = 'PROXY Protocol HTTPS Port'; $wb['jailkit_chroot_authorized_keys_template_txt'] = 'Jailkit authorized_keys template'; diff --git a/interface/web/admin/lib/lang/tr_server_config.lng b/interface/web/admin/lib/lang/tr_server_config.lng index 29ccbe6129..a4cbd91ed6 100644 --- a/interface/web/admin/lib/lang/tr_server_config.lng +++ b/interface/web/admin/lib/lang/tr_server_config.lng @@ -330,6 +330,7 @@ $wb['tooltip_rspamd_redis_bayes_servers_txt'] = 'Redis server(s) which Rspamd wi $wb['rspamd_redis_bayes_password_txt'] = 'Redis Password for Bayes'; $wb['tooltip_rspamd_redis_bayes_password_txt'] = 'Password for Bayes Redis Server (leave blank if unused).'; $wb['vhost_proxy_protocol_enabled_txt'] = 'Enable PROXY Protocol'; +$wb['vhost_proxy_protocol_protocols_txt'] = 'Use PROXY Protocol on'; $wb['vhost_proxy_protocol_http_port_txt'] = 'PROXY Protocol HTTP Port'; $wb['vhost_proxy_protocol_https_port_txt'] = 'PROXY Protocol HTTPS Port'; $wb['jailkit_chroot_authorized_keys_template_txt'] = 'Jailkit authorized_keys template'; diff --git a/interface/web/admin/templates/server_config_web_edit.htm b/interface/web/admin/templates/server_config_web_edit.htm index 2161907cb5..1f8185f2b9 100644 --- a/interface/web/admin/templates/server_config_web_edit.htm +++ b/interface/web/admin/templates/server_config_web_edit.htm @@ -54,7 +54,17 @@

- {tmpl_var name='vhost_proxy_protocol_enabled'} + +
+
+
+ +
+
From da8798a60dafdf6f5c02250c07a24efedfe3d0de Mon Sep 17 00:00:00 2001 From: Andreas Palm Date: Tue, 21 Mar 2023 22:49:42 +0100 Subject: [PATCH 090/621] use new options in apache2 and nginx plugins #6477 --- server/conf/nginx_vhost.conf.master | 10 ++++ .../plugins-available/apache2_plugin.inc.php | 46 +++++++++++++------ server/plugins-available/nginx_plugin.inc.php | 20 ++++---- 3 files changed, 51 insertions(+), 25 deletions(-) diff --git a/server/conf/nginx_vhost.conf.master b/server/conf/nginx_vhost.conf.master index 400d9b9af2..d09f181ebf 100644 --- a/server/conf/nginx_vhost.conf.master +++ b/server/conf/nginx_vhost.conf.master @@ -7,6 +7,11 @@ server { listen []:; + + + listen []: proxy_protocol; + + listen [::]:; @@ -28,6 +33,11 @@ server { # ssl_prefer_server_ciphers on; listen []: ssl http2; + + + listen []: ssl http2 proxy_protocol; + + listen [::]: ssl http2; diff --git a/server/plugins-available/apache2_plugin.inc.php b/server/plugins-available/apache2_plugin.inc.php index d411cc74dc..eae31d0535 100644 --- a/server/plugins-available/apache2_plugin.inc.php +++ b/server/plugins-available/apache2_plugin.inc.php @@ -1773,6 +1773,13 @@ function update($event_name, $data) { //* create empty vhost array $vhosts = array(); + $proxy_protocol_protocols = explode(',', $web_config['vhost_proxy_protocol_protocols']); + $proxy_protocol_ipv4 = in_array('ipv4', $proxy_protocol_protocols); + $proxy_protocol_ipv6 = in_array('ipv6', $proxy_protocol_protocols); + $proxy_protocol_site = $web_config['vhost_proxy_protocol_enabled'] == 'all'; + $proxy_protocol_site |= $web_config['vhost_proxy_protocol_enabled'] == 'y' && $data['new']['proxy_protocol'] == 'y'; + $proxy_protocol_http_port = isset($web_config['vhost_proxy_protocol_http_port']) ? (int)$web_config['vhost_proxy_protocol_http_port'] : 0; + $proxy_protocol_https_port = isset($web_config['vhost_proxy_protocol_https_port']) ? (int)$web_config['vhost_proxy_protocol_https_port'] : 0; //* Add vhost for ipv4 IP @@ -1789,13 +1796,11 @@ function update($event_name, $data) { if(count($alias_seo_redirects) > 0) $tmp_vhost_arr = $tmp_vhost_arr + array('alias_seo_redirects' => $alias_seo_redirects); $vhosts[] = $tmp_vhost_arr; - //if proxy protocol is enabled we need to add a new port to lsiten to - if($web_config['vhost_proxy_protocol_enabled'] == 'y' && $data['new']['proxy_protocol'] == 'y'){ - if(isset($web_config['vhost_proxy_protocol_http_port']) && (int)$web_config['vhost_proxy_protocol_http_port'] > 0) { - $tmp_vhost_arr['port'] = (int)$web_config['vhost_proxy_protocol_http_port']; - $tmp_vhost_arr['use_proxy_protocol'] = $data['new']['proxy_protocol']; - $vhosts[] = $tmp_vhost_arr; - } + //if proxy protocol is enabled we need to add a new port to listen to + if ($proxy_protocol_site && $proxy_protocol_ipv4 && $proxy_protocol_http_port > 0) { + $tmp_vhost_arr['port'] = $proxy_protocol_http_port; + $tmp_vhost_arr['use_proxy_protocol'] = 'y'; + $vhosts[] = $tmp_vhost_arr; } unset($tmp_vhost_arr); @@ -1813,13 +1818,11 @@ function update($event_name, $data) { if(count($ipv4_ssl_alias_seo_redirects) > 0) $tmp_vhost_arr = $tmp_vhost_arr + array('alias_seo_redirects' => $ipv4_ssl_alias_seo_redirects); $vhosts[] = $tmp_vhost_arr; - //if proxy protocol is enabled we need to add a new port to lsiten to - if($web_config['vhost_proxy_protocol_enabled'] == 'y' && $data['new']['proxy_protocol'] == 'y'){ - if((int)$web_config['vhost_proxy_protocol_https_port'] > 0) { - $tmp_vhost_arr['port'] = (int)$web_config['vhost_proxy_protocol_https_port']; - $tmp_vhost_arr['use_proxy_protocol'] = $data['new']['proxy_protocol']; - $vhosts[] = $tmp_vhost_arr; - } + //if proxy protocol is enabled we need to add a new port to listen to + if ($proxy_protocol_site && $proxy_protocol_ipv4 && $proxy_protocol_https_port > 0) { + $tmp_vhost_arr['port'] = $proxy_protocol_https_port; + $tmp_vhost_arr['use_proxy_protocol'] = 'y'; + $vhosts[] = $tmp_vhost_arr; } unset($tmp_vhost_arr, $ipv4_ssl_alias_seo_redirects); @@ -1845,6 +1848,13 @@ function update($event_name, $data) { if(count($rewrite_rules) > 0) $tmp_vhost_arr = $tmp_vhost_arr + array('redirects' => $rewrite_rules); if(count($alias_seo_redirects) > 0) $tmp_vhost_arr = $tmp_vhost_arr + array('alias_seo_redirects' => $alias_seo_redirects); $vhosts[] = $tmp_vhost_arr; + + //if proxy protocol is enabled we need to add a new port to listen to + if ($proxy_protocol_site && $proxy_protocol_ipv6 && $proxy_protocol_http_port > 0) { + $tmp_vhost_arr['port'] = $proxy_protocol_http_port; + $tmp_vhost_arr['use_proxy_protocol'] = 'y'; + $vhosts[] = $tmp_vhost_arr; + } unset($tmp_vhost_arr); //* Add vhost for ipv6 IP with SSL @@ -1859,6 +1869,14 @@ function update($event_name, $data) { } if(count($ipv6_ssl_alias_seo_redirects) > 0) $tmp_vhost_arr = $tmp_vhost_arr + array('alias_seo_redirects' => $ipv6_ssl_alias_seo_redirects); $vhosts[] = $tmp_vhost_arr; + + //if proxy protocol is enabled we need to add a new port to listen to + if ($proxy_protocol_site && $proxy_protocol_ipv6 && $proxy_protocol_https_port > 0) { + $tmp_vhost_arr['port'] = $proxy_protocol_https_port; + $tmp_vhost_arr['use_proxy_protocol'] = 'y'; + $vhosts[] = $tmp_vhost_arr; + } + unset($tmp_vhost_arr, $ipv6_ssl_alias_seo_redirects); $app->log('Enable SSL for IPv6: '.$domain, LOGLEVEL_DEBUG); } diff --git a/server/plugins-available/nginx_plugin.inc.php b/server/plugins-available/nginx_plugin.inc.php index 1a4b3336da..cf9473035c 100644 --- a/server/plugins-available/nginx_plugin.inc.php +++ b/server/plugins-available/nginx_plugin.inc.php @@ -1599,17 +1599,15 @@ function update($event_name, $data) { } //proxy protocol settings - if($web_config['vhost_proxy_protocol_enabled'] == "y"){ - if((int)$web_config['vhost_proxy_protocol_https_port'] > 0) { - $vhost_data['use_proxy_protocol'] = $data['new']['proxy_protocol']; - $vhost_data['proxy_protocol_http'] = (int)$web_config['vhost_proxy_protocol_http_port']; - $vhost_data['proxy_protocol_https'] = (int)$web_config['vhost_proxy_protocol_https_port']; - } else { - $vhost_data['use_proxy_protocol'] = "n"; - } - }else{ - $vhost_data['use_proxy_protocol'] = "n"; - } + $proxy_protocol_protocols = explode(',', $web_config['vhost_proxy_protocol_protocols']); + $proxy_protocol_ipv4 = in_array('ipv4', $proxy_protocol_protocols); + $proxy_protocol_ipv6 = in_array('ipv6', $proxy_protocol_protocols); + $proxy_protocol_site = $web_config['vhost_proxy_protocol_enabled'] == 'all'; + $proxy_protocol_site |= $web_config['vhost_proxy_protocol_enabled'] == 'y' && $data['new']['proxy_protocol'] == 'y'; + $vhost_data['proxy_protocol_http'] = isset($web_config['vhost_proxy_protocol_http_port']) ? (int)$web_config['vhost_proxy_protocol_http_port'] : 0; + $vhost_data['proxy_protocol_https'] = isset($web_config['vhost_proxy_protocol_https_port']) ? (int)$web_config['vhost_proxy_protocol_https_port'] : 0; + $vhost_data['use_proxy_protocol'] = ($proxy_protocol_site && $proxy_protocol_ipv4) ? 'y' : 'n'; + $vhost_data['use_proxy_protocol_ipv6'] = ($proxy_protocol_site && $proxy_protocol_ipv6) ? 'y' : 'n'; // set logging variable $vhost_data['logging'] = $web_config['logging']; From a5dce2356a39b70d98257d8ff5fedd0b16f69fd9 Mon Sep 17 00:00:00 2001 From: Andreas Palm Date: Wed, 22 Mar 2023 09:47:08 +0100 Subject: [PATCH 091/621] remove useless option for internet protocols #6477 --- interface/web/admin/form/server_config.tform.php | 1 - 1 file changed, 1 deletion(-) diff --git a/interface/web/admin/form/server_config.tform.php b/interface/web/admin/form/server_config.tform.php index f1bda56033..1ab7c97458 100644 --- a/interface/web/admin/form/server_config.tform.php +++ b/interface/web/admin/form/server_config.tform.php @@ -938,7 +938,6 @@ 'datatype' => 'VARCHAR', 'formtype' => 'SELECT', 'value' => array( - 'none' => 'None', 'ipv4' => 'IPv4', 'ipv6' => 'IPv6', 'ipv4,ipv6' => 'IPv4 + IPv6' From 694e06598f630ce652ec2fd9347b6673b0b98535 Mon Sep 17 00:00:00 2001 From: Joel Kuder Date: Sun, 26 Mar 2023 13:34:15 +0000 Subject: [PATCH 092/621] Update 100-monitor_hd_quota.inc.php --- server/lib/classes/cron.d/100-monitor_hd_quota.inc.php | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/server/lib/classes/cron.d/100-monitor_hd_quota.inc.php b/server/lib/classes/cron.d/100-monitor_hd_quota.inc.php index 311378c138..b45f252b32 100644 --- a/server/lib/classes/cron.d/100-monitor_hd_quota.inc.php +++ b/server/lib/classes/cron.d/100-monitor_hd_quota.inc.php @@ -70,7 +70,6 @@ public function onRunJob() { //* The state of the harddisk_quota. $state = 'ok'; -<<<<<<< server/lib/classes/cron.d/100-monitor_hd_quota.inc.php if(!$app->system->is_installed('setquota')) { //* No Quota on this System ... @@ -89,7 +88,7 @@ public function onRunJob() { //* ignore the first 5 lines, process the rest for ($i = 0; $i <= sizeof($df); $i++) { - if ($df[$i] != '') { + if (isset($df[$i]) && $df[$i] != '') { //* Make a array of the data $s1 = preg_split('/[\s]+/', $df[$i]); $s2 = preg_split('/\//', $s1[1]); @@ -157,7 +156,6 @@ public function onRunJob() { $data['user'][$username]['hard'] = $s[4]; $data['user'][$username]['files'] = $s[5]; } -======= //* Fetch the data for all users $dfData = shell_exec('repquota -au 2>/dev/null'); @@ -181,12 +179,10 @@ public function onRunJob() { $data['user'][$username]['soft'] = $s[3]; $data['user'][$username]['hard'] = $s[4]; $data['user'][$username]['files'] = $s[5]; ->>>>>>> server/lib/classes/cron.d/100-monitor_hd_quota.inc.php } } } -<<<<<<< server/lib/classes/cron.d/100-monitor_hd_quota.inc.php //** Fetch the data for all users $dfData = shell_exec('repquota -ag 2>/dev/null'); @@ -195,7 +191,7 @@ public function onRunJob() { //* ignore the first 5 lines, process the rest for ($i = 5; $i <= sizeof($df); $i++) { - if ($df[$i] != '') { + if (isset($df[$i]) && $df[$i] != '') { //* Make a array of the data $s = preg_split('/[\s]+/', $df[$i]); $groupname = $s[0]; @@ -209,7 +205,6 @@ public function onRunJob() { $data['group'][$groupname]['soft'] = $s[3]; $data['group'][$groupname]['hard'] = $s[4]; } -======= //** Fetch the data for all users $dfData = shell_exec('repquota -ag 2>/dev/null'); @@ -231,7 +226,6 @@ public function onRunJob() { $data['group'][$groupname]['used'] = $s[2]; $data['group'][$groupname]['soft'] = $s[3]; $data['group'][$groupname]['hard'] = $s[4]; ->>>>>>> server/lib/classes/cron.d/100-monitor_hd_quota.inc.php } } } From 56c5fc58d7c47b1d1d14844eb5c3ef09d464e45f Mon Sep 17 00:00:00 2001 From: Till Brehm Date: Mon, 27 Mar 2023 15:51:07 +0000 Subject: [PATCH 093/621] Update modules.inc.php --- server/lib/classes/modules.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/lib/classes/modules.inc.php b/server/lib/classes/modules.inc.php index 3fd788d0a9..9b92199fd8 100644 --- a/server/lib/classes/modules.inc.php +++ b/server/lib/classes/modules.inc.php @@ -186,7 +186,7 @@ function processDatalog() { $app->db->query($sql, $d['dbtable'], $idx[0], $idx[1]); if($app->db->errorNumber > 0) { $replication_error = true; - $app->log("Replication failed. Error: (" . $d[dbtable] . ") " . $app->db->errorMessage . " # SQL: " . $sql, LOGLEVEL_ERROR); + $app->log("Replication failed. Error: (" . $d['dbtable'] . ") " . $app->db->errorMessage . " # SQL: " . $sql, LOGLEVEL_ERROR); } $log = $app->db->_build_query_string($sql, $d['dbtable'], $idx[0], $idx[1]); $app->log('Replicated from master: '.$log, LOGLEVEL_DEBUG); From 03bce8232b607106195cc105304747246142e0a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A6=99=E6=AD=A3=E7=81=B0?= Date: Wed, 29 Mar 2023 01:48:36 +0800 Subject: [PATCH 094/621] Add Simplified Chinese translations for ISPConfig --- interface/lib/lang/cn.lng | 178 +++++++++ interface/web/admin/lib/lang/cn.lng | 60 +++ .../admin/lib/lang/cn_directive_snippets.lng | 15 + .../lib/lang/cn_directive_snippets_list.lng | 8 + interface/web/admin/lib/lang/cn_firewall.lng | 11 + .../web/admin/lib/lang/cn_firewall_list.lng | 8 + interface/web/admin/lib/lang/cn_groups.lng | 5 + .../web/admin/lib/lang/cn_groups_list.lng | 7 + interface/web/admin/lib/lang/cn_iptables.lng | 15 + .../web/admin/lib/lang/cn_iptables_list.lng | 17 + .../web/admin/lib/lang/cn_language_add.lng | 8 + .../admin/lib/lang/cn_language_complete.lng | 7 + .../web/admin/lib/lang/cn_language_edit.lng | 8 + .../web/admin/lib/lang/cn_language_export.lng | 6 + .../web/admin/lib/lang/cn_language_import.lng | 9 + .../web/admin/lib/lang/cn_language_list.lng | 7 + .../web/admin/lib/lang/cn_package_install.lng | 7 + .../web/admin/lib/lang/cn_remote_action.lng | 12 + .../web/admin/lib/lang/cn_remote_user.lng | 52 +++ .../admin/lib/lang/cn_remote_user_list.lng | 7 + interface/web/admin/lib/lang/cn_server.lng | 16 + .../web/admin/lib/lang/cn_server_config.lng | 354 ++++++++++++++++++ .../admin/lib/lang/cn_server_config_list.lng | 4 + interface/web/admin/lib/lang/cn_server_ip.lng | 13 + .../web/admin/lib/lang/cn_server_ip_list.lng | 10 + .../web/admin/lib/lang/cn_server_ip_map.lng | 14 + .../admin/lib/lang/cn_server_ip_map_list.lng | 7 + .../web/admin/lib/lang/cn_server_list.lng | 14 + .../web/admin/lib/lang/cn_server_php.lng | 20 + .../web/admin/lib/lang/cn_server_php_list.lng | 9 + .../web/admin/lib/lang/cn_system_config.lng | 110 ++++++ .../admin/lib/lang/cn_tpl_default_admin.lng | 18 + interface/web/admin/lib/lang/cn_users.lng | 42 +++ .../web/admin/lib/lang/cn_users_list.lng | 9 + interface/web/client/lib/lang/cn.lng | 31 ++ interface/web/client/lib/lang/cn_client.lng | 210 +++++++++++ .../web/client/lib/lang/cn_client_circle.lng | 9 + .../client/lib/lang/cn_client_circle_list.lng | 10 + .../web/client/lib/lang/cn_client_del.lng | 10 + .../web/client/lib/lang/cn_client_message.lng | 20 + .../lib/lang/cn_client_message_template.lng | 13 + .../lang/cn_client_message_template_list.lng | 5 + .../client/lib/lang/cn_client_template.lng | 131 +++++++ .../lib/lang/cn_client_template_list.lng | 7 + .../web/client/lib/lang/cn_clients_list.lng | 14 + interface/web/client/lib/lang/cn_domain.lng | 6 + .../web/client/lib/lang/cn_domain_list.lng | 6 + interface/web/client/lib/lang/cn_reseller.lng | 216 +++++++++++ .../web/client/lib/lang/cn_resellers_list.lng | 11 + interface/web/dashboard/lib/lang/cn.lng | 4 + .../lib/lang/cn_dashlet_customer.lng | 4 + .../lib/lang/cn_dashlet_databasequota.lng | 7 + .../dashboard/lib/lang/cn_dashlet_donate.lng | 7 + .../cn_dashlet_invoice_client_settings.lng | 4 + .../lib/lang/cn_dashlet_invoices.lng | 18 + .../dashboard/lib/lang/cn_dashlet_limits.lng | 34 ++ .../lib/lang/cn_dashlet_mailquota.lng | 8 + .../dashboard/lib/lang/cn_dashlet_modules.lng | 4 + .../lib/lang/cn_dashlet_products.lng | 9 + .../dashboard/lib/lang/cn_dashlet_quota.lng | 8 + .../dashboard/lib/lang/cn_dashlet_shop.lng | 8 + interface/web/dns/lib/lang/cn.lng | 23 ++ interface/web/dns/lib/lang/cn_dns_a.lng | 17 + interface/web/dns/lib/lang/cn_dns_a_list.lng | 15 + interface/web/dns/lib/lang/cn_dns_aaaa.lng | 17 + interface/web/dns/lib/lang/cn_dns_alias.lng | 17 + interface/web/dns/lib/lang/cn_dns_caa.lng | 18 + interface/web/dns/lib/lang/cn_dns_cname.lng | 17 + interface/web/dns/lib/lang/cn_dns_dkim.lng | 13 + interface/web/dns/lib/lang/cn_dns_dmarc.lng | 50 +++ interface/web/dns/lib/lang/cn_dns_dname.lng | 17 + interface/web/dns/lib/lang/cn_dns_ds.lng | 18 + interface/web/dns/lib/lang/cn_dns_hinfo.lng | 16 + interface/web/dns/lib/lang/cn_dns_import.lng | 25 ++ interface/web/dns/lib/lang/cn_dns_loc.lng | 16 + interface/web/dns/lib/lang/cn_dns_mx.lng | 18 + interface/web/dns/lib/lang/cn_dns_naptr.lng | 21 ++ interface/web/dns/lib/lang/cn_dns_ns.lng | 16 + interface/web/dns/lib/lang/cn_dns_ptr.lng | 16 + interface/web/dns/lib/lang/cn_dns_rp.lng | 16 + interface/web/dns/lib/lang/cn_dns_slave.lng | 17 + .../dns/lib/lang/cn_dns_slave_admin_list.lng | 10 + .../web/dns/lib/lang/cn_dns_slave_list.lng | 9 + interface/web/dns/lib/lang/cn_dns_soa.lng | 47 +++ .../dns/lib/lang/cn_dns_soa_admin_list.lng | 12 + .../web/dns/lib/lang/cn_dns_soa_list.lng | 11 + interface/web/dns/lib/lang/cn_dns_spf.lng | 30 ++ interface/web/dns/lib/lang/cn_dns_srv.lng | 20 + interface/web/dns/lib/lang/cn_dns_sshfp.lng | 16 + .../web/dns/lib/lang/cn_dns_template.lng | 7 + .../web/dns/lib/lang/cn_dns_template_list.lng | 6 + interface/web/dns/lib/lang/cn_dns_tlsa.lng | 16 + interface/web/dns/lib/lang/cn_dns_txt.lng | 19 + interface/web/dns/lib/lang/cn_dns_wizard.lng | 45 +++ interface/web/help/lib/lang/cn.lng | 15 + interface/web/help/lib/lang/cn_faq_form.lng | 6 + .../lib/lang/cn_faq_manage_questions_list.lng | 9 + .../help/lib/lang/cn_faq_sections_form.lng | 3 + .../web/help/lib/lang/cn_help_faq_list.lng | 3 + .../lib/lang/cn_help_faq_sections_list.lng | 8 + .../web/help/lib/lang/cn_support_message.lng | 16 + .../help/lib/lang/cn_support_message_list.lng | 7 + interface/web/login/lib/lang/cn.lng | 43 +++ interface/web/login/lib/lang/cn_login_as.lng | 15 + interface/web/mail/lib/lang/cn.lng | 52 +++ .../mail/lib/lang/cn_backup_stats_list.lng | 9 + interface/web/mail/lib/lang/cn_mail_alias.lng | 16 + .../web/mail/lib/lang/cn_mail_alias_list.lng | 8 + .../web/mail/lib/lang/cn_mail_aliasdomain.lng | 11 + .../lib/lang/cn_mail_aliasdomain_list.lng | 8 + .../web/mail/lib/lang/cn_mail_backup_list.lng | 16 + .../web/mail/lib/lang/cn_mail_blacklist.lng | 12 + .../mail/lib/lang/cn_mail_blacklist_list.lng | 10 + .../mail/lib/lang/cn_mail_content_filter.lng | 9 + .../lib/lang/cn_mail_content_filter_list.lng | 8 + .../web/mail/lib/lang/cn_mail_domain.lng | 25 ++ .../lib/lang/cn_mail_domain_admin_list.lng | 8 + .../mail/lib/lang/cn_mail_domain_catchall.lng | 14 + .../lib/lang/cn_mail_domain_catchall_list.lng | 9 + .../web/mail/lib/lang/cn_mail_domain_list.lng | 7 + .../web/mail/lib/lang/cn_mail_forward.lng | 15 + .../mail/lib/lang/cn_mail_forward_list.lng | 8 + interface/web/mail/lib/lang/cn_mail_get.lng | 19 + .../web/mail/lib/lang/cn_mail_get_list.lng | 9 + .../web/mail/lib/lang/cn_mail_mailinglist.lng | 23 ++ .../lib/lang/cn_mail_mailinglist_list.lng | 5 + .../mail/lib/lang/cn_mail_relay_domain.lng | 9 + .../lib/lang/cn_mail_relay_domain_list.lng | 7 + .../mail/lib/lang/cn_mail_relay_recipient.lng | 9 + .../lib/lang/cn_mail_relay_recipient_list.lng | 9 + .../web/mail/lib/lang/cn_mail_spamfilter.lng | 17 + .../mail/lib/lang/cn_mail_spamfilter_list.lng | 8 + .../web/mail/lib/lang/cn_mail_transport.lng | 11 + .../mail/lib/lang/cn_mail_transport_list.lng | 9 + interface/web/mail/lib/lang/cn_mail_user.lng | 77 ++++ .../web/mail/lib/lang/cn_mail_user_filter.lng | 31 ++ .../lib/lang/cn_mail_user_filter_list.lng | 7 + .../web/mail/lib/lang/cn_mail_user_list.lng | 13 + .../mail/lib/lang/cn_mail_user_stats_list.lng | 8 + .../web/mail/lib/lang/cn_mail_whitelist.lng | 12 + .../mail/lib/lang/cn_mail_whitelist_list.lng | 10 + .../mail/lib/lang/cn_spamfilter_blacklist.lng | 12 + .../lib/lang/cn_spamfilter_blacklist_list.lng | 9 + .../mail/lib/lang/cn_spamfilter_config.lng | 20 + .../lib/lang/cn_spamfilter_config_list.lng | 5 + .../mail/lib/lang/cn_spamfilter_policy.lng | 51 +++ .../lib/lang/cn_spamfilter_policy_list.lng | 9 + .../web/mail/lib/lang/cn_spamfilter_users.lng | 13 + .../lib/lang/cn_spamfilter_users_list.lng | 10 + .../mail/lib/lang/cn_spamfilter_whitelist.lng | 12 + .../lib/lang/cn_spamfilter_whitelist_list.lng | 9 + .../lib/lang/cn_user_quota_stats_list.lng | 8 + .../web/mail/lib/lang/cn_xmpp_domain.lng | 62 +++ .../lib/lang/cn_xmpp_domain_admin_list.lng | 8 + .../web/mail/lib/lang/cn_xmpp_domain_list.lng | 7 + interface/web/mail/lib/lang/cn_xmpp_user.lng | 15 + .../web/mail/lib/lang/cn_xmpp_user_list.lng | 8 + interface/web/mailuser/lib/lang/cn.lng | 9 + interface/web/mailuser/lib/lang/cn_index.lng | 12 + .../lib/lang/cn_mail_user_autoresponder.lng | 13 + .../web/mailuser/lib/lang/cn_mail_user_cc.lng | 11 + .../mailuser/lib/lang/cn_mail_user_filter.lng | 26 ++ .../lib/lang/cn_mail_user_filter_list.lng | 8 + .../lib/lang/cn_mail_user_password.lng | 11 + .../lib/lang/cn_mail_user_spamfilter.lng | 7 + interface/web/monitor/lib/lang/cn.lng | 168 +++++++++ .../web/monitor/lib/lang/cn_datalog_list.lng | 8 + .../lib/lang/cn_dataloghistory_list.lng | 9 + .../lib/lang/cn_dataloghistory_undo.lng | 7 + .../lib/lang/cn_dataloghistory_view.lng | 27 ++ .../web/monitor/lib/lang/cn_syslog_list.lng | 10 + interface/web/sites/lib/lang/cn.lng | 35 ++ interface/web/sites/lib/lang/cn_aps.lng | 63 ++++ .../sites/lib/lang/cn_aps_instances_list.lng | 11 + .../sites/lib/lang/cn_aps_packages_list.lng | 8 + .../lib/lang/cn_aps_update_packagelist.lng | 7 + .../sites/lib/lang/cn_backup_stats_list.lng | 10 + interface/web/sites/lib/lang/cn_cron.lng | 26 ++ interface/web/sites/lib/lang/cn_cron_list.lng | 13 + interface/web/sites/lib/lang/cn_database.lng | 50 +++ .../sites/lib/lang/cn_database_admin_list.lng | 12 + .../web/sites/lib/lang/cn_database_list.lng | 11 + .../lib/lang/cn_database_quota_stats_list.lng | 9 + .../web/sites/lib/lang/cn_database_user.lng | 25 ++ .../lib/lang/cn_database_user_admin_list.lng | 6 + .../sites/lib/lang/cn_database_user_list.lng | 5 + .../lib/lang/cn_ftp_sites_stats_list.lng | 10 + interface/web/sites/lib/lang/cn_ftp_user.lng | 36 ++ .../web/sites/lib/lang/cn_ftp_user_list.lng | 8 + .../web/sites/lib/lang/cn_shell_user.lng | 36 ++ .../web/sites/lib/lang/cn_shell_user_list.lng | 8 + .../lib/lang/cn_user_quota_stats_list.lng | 10 + .../web/sites/lib/lang/cn_web_aliasdomain.lng | 118 ++++++ .../lib/lang/cn_web_aliasdomain_list.lng | 14 + .../web/sites/lib/lang/cn_web_backup_list.lng | 54 +++ .../web/sites/lib/lang/cn_web_childdomain.lng | 124 ++++++ .../lib/lang/cn_web_childdomain_list.lng | 18 + .../lib/lang/cn_web_directive_snippets.lng | 3 + .../web/sites/lib/lang/cn_web_domain.lng | 141 +++++++ .../lib/lang/cn_web_domain_admin_list.lng | 9 + .../web/sites/lib/lang/cn_web_domain_list.lng | 8 + .../web/sites/lib/lang/cn_web_folder.lng | 8 + .../web/sites/lib/lang/cn_web_folder_list.lng | 8 + .../web/sites/lib/lang/cn_web_folder_user.lng | 14 + .../lib/lang/cn_web_folder_user_list.lng | 7 + .../lib/lang/cn_web_sites_stats_list.lng | 10 + .../web/sites/lib/lang/cn_web_subdomain.lng | 54 +++ .../sites/lib/lang/cn_web_subdomain_list.lng | 8 + .../sites/lib/lang/cn_web_vhost_domain.lng | 209 +++++++++++ .../lang/cn_web_vhost_domain_admin_list.lng | 14 + .../lib/lang/cn_web_vhost_domain_list.lng | 14 + .../sites/lib/lang/cn_web_vhost_subdomain.lng | 136 +++++++ .../lib/lang/cn_web_vhost_subdomain_list.lng | 8 + .../web/sites/lib/lang/cn_webdav_user.lng | 21 ++ .../sites/lib/lang/cn_webdav_user_list.lng | 8 + .../lib/lang/cn_strengthmeter.lng | 8 + interface/web/tools/lib/lang/cn.lng | 13 + .../tools/lib/lang/cn_import_ispconfig.lng | 25 ++ .../web/tools/lib/lang/cn_import_vpopmail.lng | 8 + interface/web/tools/lib/lang/cn_index.lng | 4 + interface/web/tools/lib/lang/cn_resync.lng | 53 +++ .../web/tools/lib/lang/cn_tpl_default.lng | 7 + .../web/tools/lib/lang/cn_usersettings.lng | 20 + interface/web/vm/lib/lang/cn.lng | 7 + .../web/vm/lib/lang/cn_openvz_action.lng | 17 + interface/web/vm/lib/lang/cn_openvz_ip.lng | 9 + .../web/vm/lib/lang/cn_openvz_ip_list.lng | 7 + .../web/vm/lib/lang/cn_openvz_ostemplate.lng | 10 + .../vm/lib/lang/cn_openvz_ostemplate_list.lng | 8 + .../web/vm/lib/lang/cn_openvz_template.lng | 97 +++++ interface/web/vm/lib/lang/cn_openvz_vm.lng | 45 +++ .../web/vm/lib/lang/cn_openvz_vm_list.lng | 10 + 232 files changed, 5534 insertions(+) create mode 100644 interface/lib/lang/cn.lng create mode 100644 interface/web/admin/lib/lang/cn.lng create mode 100644 interface/web/admin/lib/lang/cn_directive_snippets.lng create mode 100644 interface/web/admin/lib/lang/cn_directive_snippets_list.lng create mode 100644 interface/web/admin/lib/lang/cn_firewall.lng create mode 100644 interface/web/admin/lib/lang/cn_firewall_list.lng create mode 100644 interface/web/admin/lib/lang/cn_groups.lng create mode 100644 interface/web/admin/lib/lang/cn_groups_list.lng create mode 100644 interface/web/admin/lib/lang/cn_iptables.lng create mode 100644 interface/web/admin/lib/lang/cn_iptables_list.lng create mode 100644 interface/web/admin/lib/lang/cn_language_add.lng create mode 100644 interface/web/admin/lib/lang/cn_language_complete.lng create mode 100644 interface/web/admin/lib/lang/cn_language_edit.lng create mode 100644 interface/web/admin/lib/lang/cn_language_export.lng create mode 100644 interface/web/admin/lib/lang/cn_language_import.lng create mode 100644 interface/web/admin/lib/lang/cn_language_list.lng create mode 100644 interface/web/admin/lib/lang/cn_package_install.lng create mode 100644 interface/web/admin/lib/lang/cn_remote_action.lng create mode 100644 interface/web/admin/lib/lang/cn_remote_user.lng create mode 100644 interface/web/admin/lib/lang/cn_remote_user_list.lng create mode 100644 interface/web/admin/lib/lang/cn_server.lng create mode 100644 interface/web/admin/lib/lang/cn_server_config.lng create mode 100644 interface/web/admin/lib/lang/cn_server_config_list.lng create mode 100644 interface/web/admin/lib/lang/cn_server_ip.lng create mode 100644 interface/web/admin/lib/lang/cn_server_ip_list.lng create mode 100644 interface/web/admin/lib/lang/cn_server_ip_map.lng create mode 100644 interface/web/admin/lib/lang/cn_server_ip_map_list.lng create mode 100644 interface/web/admin/lib/lang/cn_server_list.lng create mode 100644 interface/web/admin/lib/lang/cn_server_php.lng create mode 100644 interface/web/admin/lib/lang/cn_server_php_list.lng create mode 100644 interface/web/admin/lib/lang/cn_system_config.lng create mode 100644 interface/web/admin/lib/lang/cn_tpl_default_admin.lng create mode 100644 interface/web/admin/lib/lang/cn_users.lng create mode 100644 interface/web/admin/lib/lang/cn_users_list.lng create mode 100644 interface/web/client/lib/lang/cn.lng create mode 100644 interface/web/client/lib/lang/cn_client.lng create mode 100644 interface/web/client/lib/lang/cn_client_circle.lng create mode 100644 interface/web/client/lib/lang/cn_client_circle_list.lng create mode 100644 interface/web/client/lib/lang/cn_client_del.lng create mode 100644 interface/web/client/lib/lang/cn_client_message.lng create mode 100644 interface/web/client/lib/lang/cn_client_message_template.lng create mode 100644 interface/web/client/lib/lang/cn_client_message_template_list.lng create mode 100644 interface/web/client/lib/lang/cn_client_template.lng create mode 100644 interface/web/client/lib/lang/cn_client_template_list.lng create mode 100644 interface/web/client/lib/lang/cn_clients_list.lng create mode 100644 interface/web/client/lib/lang/cn_domain.lng create mode 100644 interface/web/client/lib/lang/cn_domain_list.lng create mode 100644 interface/web/client/lib/lang/cn_reseller.lng create mode 100644 interface/web/client/lib/lang/cn_resellers_list.lng create mode 100644 interface/web/dashboard/lib/lang/cn.lng create mode 100644 interface/web/dashboard/lib/lang/cn_dashlet_customer.lng create mode 100644 interface/web/dashboard/lib/lang/cn_dashlet_databasequota.lng create mode 100644 interface/web/dashboard/lib/lang/cn_dashlet_donate.lng create mode 100644 interface/web/dashboard/lib/lang/cn_dashlet_invoice_client_settings.lng create mode 100644 interface/web/dashboard/lib/lang/cn_dashlet_invoices.lng create mode 100644 interface/web/dashboard/lib/lang/cn_dashlet_limits.lng create mode 100644 interface/web/dashboard/lib/lang/cn_dashlet_mailquota.lng create mode 100644 interface/web/dashboard/lib/lang/cn_dashlet_modules.lng create mode 100644 interface/web/dashboard/lib/lang/cn_dashlet_products.lng create mode 100644 interface/web/dashboard/lib/lang/cn_dashlet_quota.lng create mode 100644 interface/web/dashboard/lib/lang/cn_dashlet_shop.lng create mode 100644 interface/web/dns/lib/lang/cn.lng create mode 100644 interface/web/dns/lib/lang/cn_dns_a.lng create mode 100644 interface/web/dns/lib/lang/cn_dns_a_list.lng create mode 100644 interface/web/dns/lib/lang/cn_dns_aaaa.lng create mode 100644 interface/web/dns/lib/lang/cn_dns_alias.lng create mode 100644 interface/web/dns/lib/lang/cn_dns_caa.lng create mode 100644 interface/web/dns/lib/lang/cn_dns_cname.lng create mode 100644 interface/web/dns/lib/lang/cn_dns_dkim.lng create mode 100644 interface/web/dns/lib/lang/cn_dns_dmarc.lng create mode 100644 interface/web/dns/lib/lang/cn_dns_dname.lng create mode 100644 interface/web/dns/lib/lang/cn_dns_ds.lng create mode 100644 interface/web/dns/lib/lang/cn_dns_hinfo.lng create mode 100644 interface/web/dns/lib/lang/cn_dns_import.lng create mode 100644 interface/web/dns/lib/lang/cn_dns_loc.lng create mode 100644 interface/web/dns/lib/lang/cn_dns_mx.lng create mode 100644 interface/web/dns/lib/lang/cn_dns_naptr.lng create mode 100644 interface/web/dns/lib/lang/cn_dns_ns.lng create mode 100644 interface/web/dns/lib/lang/cn_dns_ptr.lng create mode 100644 interface/web/dns/lib/lang/cn_dns_rp.lng create mode 100644 interface/web/dns/lib/lang/cn_dns_slave.lng create mode 100644 interface/web/dns/lib/lang/cn_dns_slave_admin_list.lng create mode 100644 interface/web/dns/lib/lang/cn_dns_slave_list.lng create mode 100644 interface/web/dns/lib/lang/cn_dns_soa.lng create mode 100644 interface/web/dns/lib/lang/cn_dns_soa_admin_list.lng create mode 100644 interface/web/dns/lib/lang/cn_dns_soa_list.lng create mode 100644 interface/web/dns/lib/lang/cn_dns_spf.lng create mode 100644 interface/web/dns/lib/lang/cn_dns_srv.lng create mode 100644 interface/web/dns/lib/lang/cn_dns_sshfp.lng create mode 100644 interface/web/dns/lib/lang/cn_dns_template.lng create mode 100644 interface/web/dns/lib/lang/cn_dns_template_list.lng create mode 100644 interface/web/dns/lib/lang/cn_dns_tlsa.lng create mode 100644 interface/web/dns/lib/lang/cn_dns_txt.lng create mode 100644 interface/web/dns/lib/lang/cn_dns_wizard.lng create mode 100644 interface/web/help/lib/lang/cn.lng create mode 100644 interface/web/help/lib/lang/cn_faq_form.lng create mode 100644 interface/web/help/lib/lang/cn_faq_manage_questions_list.lng create mode 100644 interface/web/help/lib/lang/cn_faq_sections_form.lng create mode 100644 interface/web/help/lib/lang/cn_help_faq_list.lng create mode 100644 interface/web/help/lib/lang/cn_help_faq_sections_list.lng create mode 100644 interface/web/help/lib/lang/cn_support_message.lng create mode 100644 interface/web/help/lib/lang/cn_support_message_list.lng create mode 100644 interface/web/login/lib/lang/cn.lng create mode 100644 interface/web/login/lib/lang/cn_login_as.lng create mode 100644 interface/web/mail/lib/lang/cn.lng create mode 100644 interface/web/mail/lib/lang/cn_backup_stats_list.lng create mode 100644 interface/web/mail/lib/lang/cn_mail_alias.lng create mode 100644 interface/web/mail/lib/lang/cn_mail_alias_list.lng create mode 100644 interface/web/mail/lib/lang/cn_mail_aliasdomain.lng create mode 100644 interface/web/mail/lib/lang/cn_mail_aliasdomain_list.lng create mode 100644 interface/web/mail/lib/lang/cn_mail_backup_list.lng create mode 100644 interface/web/mail/lib/lang/cn_mail_blacklist.lng create mode 100644 interface/web/mail/lib/lang/cn_mail_blacklist_list.lng create mode 100644 interface/web/mail/lib/lang/cn_mail_content_filter.lng create mode 100644 interface/web/mail/lib/lang/cn_mail_content_filter_list.lng create mode 100644 interface/web/mail/lib/lang/cn_mail_domain.lng create mode 100644 interface/web/mail/lib/lang/cn_mail_domain_admin_list.lng create mode 100644 interface/web/mail/lib/lang/cn_mail_domain_catchall.lng create mode 100644 interface/web/mail/lib/lang/cn_mail_domain_catchall_list.lng create mode 100644 interface/web/mail/lib/lang/cn_mail_domain_list.lng create mode 100644 interface/web/mail/lib/lang/cn_mail_forward.lng create mode 100644 interface/web/mail/lib/lang/cn_mail_forward_list.lng create mode 100644 interface/web/mail/lib/lang/cn_mail_get.lng create mode 100644 interface/web/mail/lib/lang/cn_mail_get_list.lng create mode 100644 interface/web/mail/lib/lang/cn_mail_mailinglist.lng create mode 100644 interface/web/mail/lib/lang/cn_mail_mailinglist_list.lng create mode 100644 interface/web/mail/lib/lang/cn_mail_relay_domain.lng create mode 100644 interface/web/mail/lib/lang/cn_mail_relay_domain_list.lng create mode 100644 interface/web/mail/lib/lang/cn_mail_relay_recipient.lng create mode 100644 interface/web/mail/lib/lang/cn_mail_relay_recipient_list.lng create mode 100644 interface/web/mail/lib/lang/cn_mail_spamfilter.lng create mode 100644 interface/web/mail/lib/lang/cn_mail_spamfilter_list.lng create mode 100644 interface/web/mail/lib/lang/cn_mail_transport.lng create mode 100644 interface/web/mail/lib/lang/cn_mail_transport_list.lng create mode 100644 interface/web/mail/lib/lang/cn_mail_user.lng create mode 100644 interface/web/mail/lib/lang/cn_mail_user_filter.lng create mode 100644 interface/web/mail/lib/lang/cn_mail_user_filter_list.lng create mode 100644 interface/web/mail/lib/lang/cn_mail_user_list.lng create mode 100644 interface/web/mail/lib/lang/cn_mail_user_stats_list.lng create mode 100644 interface/web/mail/lib/lang/cn_mail_whitelist.lng create mode 100644 interface/web/mail/lib/lang/cn_mail_whitelist_list.lng create mode 100644 interface/web/mail/lib/lang/cn_spamfilter_blacklist.lng create mode 100644 interface/web/mail/lib/lang/cn_spamfilter_blacklist_list.lng create mode 100644 interface/web/mail/lib/lang/cn_spamfilter_config.lng create mode 100644 interface/web/mail/lib/lang/cn_spamfilter_config_list.lng create mode 100644 interface/web/mail/lib/lang/cn_spamfilter_policy.lng create mode 100644 interface/web/mail/lib/lang/cn_spamfilter_policy_list.lng create mode 100644 interface/web/mail/lib/lang/cn_spamfilter_users.lng create mode 100644 interface/web/mail/lib/lang/cn_spamfilter_users_list.lng create mode 100644 interface/web/mail/lib/lang/cn_spamfilter_whitelist.lng create mode 100644 interface/web/mail/lib/lang/cn_spamfilter_whitelist_list.lng create mode 100644 interface/web/mail/lib/lang/cn_user_quota_stats_list.lng create mode 100644 interface/web/mail/lib/lang/cn_xmpp_domain.lng create mode 100644 interface/web/mail/lib/lang/cn_xmpp_domain_admin_list.lng create mode 100644 interface/web/mail/lib/lang/cn_xmpp_domain_list.lng create mode 100644 interface/web/mail/lib/lang/cn_xmpp_user.lng create mode 100644 interface/web/mail/lib/lang/cn_xmpp_user_list.lng create mode 100644 interface/web/mailuser/lib/lang/cn.lng create mode 100644 interface/web/mailuser/lib/lang/cn_index.lng create mode 100644 interface/web/mailuser/lib/lang/cn_mail_user_autoresponder.lng create mode 100644 interface/web/mailuser/lib/lang/cn_mail_user_cc.lng create mode 100644 interface/web/mailuser/lib/lang/cn_mail_user_filter.lng create mode 100644 interface/web/mailuser/lib/lang/cn_mail_user_filter_list.lng create mode 100644 interface/web/mailuser/lib/lang/cn_mail_user_password.lng create mode 100644 interface/web/mailuser/lib/lang/cn_mail_user_spamfilter.lng create mode 100644 interface/web/monitor/lib/lang/cn.lng create mode 100644 interface/web/monitor/lib/lang/cn_datalog_list.lng create mode 100644 interface/web/monitor/lib/lang/cn_dataloghistory_list.lng create mode 100644 interface/web/monitor/lib/lang/cn_dataloghistory_undo.lng create mode 100644 interface/web/monitor/lib/lang/cn_dataloghistory_view.lng create mode 100644 interface/web/monitor/lib/lang/cn_syslog_list.lng create mode 100644 interface/web/sites/lib/lang/cn.lng create mode 100644 interface/web/sites/lib/lang/cn_aps.lng create mode 100644 interface/web/sites/lib/lang/cn_aps_instances_list.lng create mode 100644 interface/web/sites/lib/lang/cn_aps_packages_list.lng create mode 100644 interface/web/sites/lib/lang/cn_aps_update_packagelist.lng create mode 100644 interface/web/sites/lib/lang/cn_backup_stats_list.lng create mode 100644 interface/web/sites/lib/lang/cn_cron.lng create mode 100644 interface/web/sites/lib/lang/cn_cron_list.lng create mode 100644 interface/web/sites/lib/lang/cn_database.lng create mode 100644 interface/web/sites/lib/lang/cn_database_admin_list.lng create mode 100644 interface/web/sites/lib/lang/cn_database_list.lng create mode 100644 interface/web/sites/lib/lang/cn_database_quota_stats_list.lng create mode 100644 interface/web/sites/lib/lang/cn_database_user.lng create mode 100644 interface/web/sites/lib/lang/cn_database_user_admin_list.lng create mode 100644 interface/web/sites/lib/lang/cn_database_user_list.lng create mode 100644 interface/web/sites/lib/lang/cn_ftp_sites_stats_list.lng create mode 100644 interface/web/sites/lib/lang/cn_ftp_user.lng create mode 100644 interface/web/sites/lib/lang/cn_ftp_user_list.lng create mode 100644 interface/web/sites/lib/lang/cn_shell_user.lng create mode 100644 interface/web/sites/lib/lang/cn_shell_user_list.lng create mode 100644 interface/web/sites/lib/lang/cn_user_quota_stats_list.lng create mode 100644 interface/web/sites/lib/lang/cn_web_aliasdomain.lng create mode 100644 interface/web/sites/lib/lang/cn_web_aliasdomain_list.lng create mode 100644 interface/web/sites/lib/lang/cn_web_backup_list.lng create mode 100644 interface/web/sites/lib/lang/cn_web_childdomain.lng create mode 100644 interface/web/sites/lib/lang/cn_web_childdomain_list.lng create mode 100644 interface/web/sites/lib/lang/cn_web_directive_snippets.lng create mode 100644 interface/web/sites/lib/lang/cn_web_domain.lng create mode 100644 interface/web/sites/lib/lang/cn_web_domain_admin_list.lng create mode 100644 interface/web/sites/lib/lang/cn_web_domain_list.lng create mode 100644 interface/web/sites/lib/lang/cn_web_folder.lng create mode 100644 interface/web/sites/lib/lang/cn_web_folder_list.lng create mode 100644 interface/web/sites/lib/lang/cn_web_folder_user.lng create mode 100644 interface/web/sites/lib/lang/cn_web_folder_user_list.lng create mode 100644 interface/web/sites/lib/lang/cn_web_sites_stats_list.lng create mode 100644 interface/web/sites/lib/lang/cn_web_subdomain.lng create mode 100644 interface/web/sites/lib/lang/cn_web_subdomain_list.lng create mode 100644 interface/web/sites/lib/lang/cn_web_vhost_domain.lng create mode 100644 interface/web/sites/lib/lang/cn_web_vhost_domain_admin_list.lng create mode 100644 interface/web/sites/lib/lang/cn_web_vhost_domain_list.lng create mode 100644 interface/web/sites/lib/lang/cn_web_vhost_subdomain.lng create mode 100644 interface/web/sites/lib/lang/cn_web_vhost_subdomain_list.lng create mode 100644 interface/web/sites/lib/lang/cn_webdav_user.lng create mode 100644 interface/web/sites/lib/lang/cn_webdav_user_list.lng create mode 100644 interface/web/strengthmeter/lib/lang/cn_strengthmeter.lng create mode 100644 interface/web/tools/lib/lang/cn.lng create mode 100644 interface/web/tools/lib/lang/cn_import_ispconfig.lng create mode 100644 interface/web/tools/lib/lang/cn_import_vpopmail.lng create mode 100644 interface/web/tools/lib/lang/cn_index.lng create mode 100644 interface/web/tools/lib/lang/cn_resync.lng create mode 100644 interface/web/tools/lib/lang/cn_tpl_default.lng create mode 100644 interface/web/tools/lib/lang/cn_usersettings.lng create mode 100644 interface/web/vm/lib/lang/cn.lng create mode 100644 interface/web/vm/lib/lang/cn_openvz_action.lng create mode 100644 interface/web/vm/lib/lang/cn_openvz_ip.lng create mode 100644 interface/web/vm/lib/lang/cn_openvz_ip_list.lng create mode 100644 interface/web/vm/lib/lang/cn_openvz_ostemplate.lng create mode 100644 interface/web/vm/lib/lang/cn_openvz_ostemplate_list.lng create mode 100644 interface/web/vm/lib/lang/cn_openvz_template.lng create mode 100644 interface/web/vm/lib/lang/cn_openvz_vm.lng create mode 100644 interface/web/vm/lib/lang/cn_openvz_vm_list.lng diff --git a/interface/lib/lang/cn.lng b/interface/lib/lang/cn.lng new file mode 100644 index 0000000000..72fcb8b737 --- /dev/null +++ b/interface/lib/lang/cn.lng @@ -0,0 +1,178 @@ + diff --git a/interface/web/admin/lib/lang/cn.lng b/interface/web/admin/lib/lang/cn.lng new file mode 100644 index 0000000000..e744926508 --- /dev/null +++ b/interface/web/admin/lib/lang/cn.lng @@ -0,0 +1,60 @@ + diff --git a/interface/web/admin/lib/lang/cn_directive_snippets.lng b/interface/web/admin/lib/lang/cn_directive_snippets.lng new file mode 100644 index 0000000000..e35b560bba --- /dev/null +++ b/interface/web/admin/lib/lang/cn_directive_snippets.lng @@ -0,0 +1,15 @@ + diff --git a/interface/web/admin/lib/lang/cn_firewall.lng b/interface/web/admin/lib/lang/cn_firewall.lng new file mode 100644 index 0000000000..d9d95c22d3 --- /dev/null +++ b/interface/web/admin/lib/lang/cn_firewall.lng @@ -0,0 +1,11 @@ + diff --git a/interface/web/admin/lib/lang/cn_firewall_list.lng b/interface/web/admin/lib/lang/cn_firewall_list.lng new file mode 100644 index 0000000000..8145ea0f7f --- /dev/null +++ b/interface/web/admin/lib/lang/cn_firewall_list.lng @@ -0,0 +1,8 @@ + diff --git a/interface/web/admin/lib/lang/cn_groups.lng b/interface/web/admin/lib/lang/cn_groups.lng new file mode 100644 index 0000000000..9ca6eb8de0 --- /dev/null +++ b/interface/web/admin/lib/lang/cn_groups.lng @@ -0,0 +1,5 @@ + diff --git a/interface/web/admin/lib/lang/cn_groups_list.lng b/interface/web/admin/lib/lang/cn_groups_list.lng new file mode 100644 index 0000000000..3ae2f8f458 --- /dev/null +++ b/interface/web/admin/lib/lang/cn_groups_list.lng @@ -0,0 +1,7 @@ +警告:请勿在此处编辑或修改任何用户设置。请改用客户端模块中的客户端和经销商设置。在此处修改用户或组可能会导致数据丢失!'; +?> diff --git a/interface/web/admin/lib/lang/cn_iptables.lng b/interface/web/admin/lib/lang/cn_iptables.lng new file mode 100644 index 0000000000..f788bb9599 --- /dev/null +++ b/interface/web/admin/lib/lang/cn_iptables.lng @@ -0,0 +1,15 @@ + diff --git a/interface/web/admin/lib/lang/cn_iptables_list.lng b/interface/web/admin/lib/lang/cn_iptables_list.lng new file mode 100644 index 0000000000..512500b649 --- /dev/null +++ b/interface/web/admin/lib/lang/cn_iptables_list.lng @@ -0,0 +1,17 @@ + diff --git a/interface/web/admin/lib/lang/cn_language_add.lng b/interface/web/admin/lib/lang/cn_language_add.lng new file mode 100644 index 0000000000..717c411941 --- /dev/null +++ b/interface/web/admin/lib/lang/cn_language_add.lng @@ -0,0 +1,8 @@ + diff --git a/interface/web/admin/lib/lang/cn_language_complete.lng b/interface/web/admin/lib/lang/cn_language_complete.lng new file mode 100644 index 0000000000..b78431d3f9 --- /dev/null +++ b/interface/web/admin/lib/lang/cn_language_complete.lng @@ -0,0 +1,7 @@ +这将把英文主语言文件中缺失的字符串添加到所选语言文件中。'; +$wb['language_select_txt'] = '选择语言'; +$wb['btn_save_txt'] = '立即合并文件'; +$wb['btn_cancel_txt'] = '返回'; +?> diff --git a/interface/web/admin/lib/lang/cn_language_edit.lng b/interface/web/admin/lib/lang/cn_language_edit.lng new file mode 100644 index 0000000000..b4a0c104ec --- /dev/null +++ b/interface/web/admin/lib/lang/cn_language_edit.lng @@ -0,0 +1,8 @@ + diff --git a/interface/web/admin/lib/lang/cn_language_export.lng b/interface/web/admin/lib/lang/cn_language_export.lng new file mode 100644 index 0000000000..bbb3e7aee7 --- /dev/null +++ b/interface/web/admin/lib/lang/cn_language_export.lng @@ -0,0 +1,6 @@ + diff --git a/interface/web/admin/lib/lang/cn_language_import.lng b/interface/web/admin/lib/lang/cn_language_import.lng new file mode 100644 index 0000000000..a9a2ff908d --- /dev/null +++ b/interface/web/admin/lib/lang/cn_language_import.lng @@ -0,0 +1,9 @@ + diff --git a/interface/web/admin/lib/lang/cn_language_list.lng b/interface/web/admin/lib/lang/cn_language_list.lng new file mode 100644 index 0000000000..0a33f825db --- /dev/null +++ b/interface/web/admin/lib/lang/cn_language_list.lng @@ -0,0 +1,7 @@ + diff --git a/interface/web/admin/lib/lang/cn_package_install.lng b/interface/web/admin/lib/lang/cn_package_install.lng new file mode 100644 index 0000000000..744bc8c839 --- /dev/null +++ b/interface/web/admin/lib/lang/cn_package_install.lng @@ -0,0 +1,7 @@ + diff --git a/interface/web/admin/lib/lang/cn_remote_action.lng b/interface/web/admin/lib/lang/cn_remote_action.lng new file mode 100644 index 0000000000..65a75fa6f1 --- /dev/null +++ b/interface/web/admin/lib/lang/cn_remote_action.lng @@ -0,0 +1,12 @@ +
请自行承担风险!'; +$wb['do_ispcupdate_caption'] = '在远程服务器上执行 ISPConfig 3 更新'; +$wb['do_ispcupdate_desc'] = '此操作将在所选服务器上执行 ISPConfig3 更新。

请自行承担风险!'; +$wb['action_scheduled'] = '操作已安排执行'; +$wb['select_all_server'] = '所有服务器'; +$wb['ispconfig_update_title'] = 'ISPConfig 更新说明'; +$wb['ispconfig_update_text'] = '以 root 用户身份登录服务器 shell,执行命令

ispconfig_update.sh

以开始 ISPConfig 更新。

单击此处获取详细的更新说明'; +?> diff --git a/interface/web/admin/lib/lang/cn_remote_user.lng b/interface/web/admin/lib/lang/cn_remote_user.lng new file mode 100644 index 0000000000..66552727d4 --- /dev/null +++ b/interface/web/admin/lib/lang/cn_remote_user.lng @@ -0,0 +1,52 @@ + diff --git a/interface/web/admin/lib/lang/cn_remote_user_list.lng b/interface/web/admin/lib/lang/cn_remote_user_list.lng new file mode 100644 index 0000000000..7b90e136d0 --- /dev/null +++ b/interface/web/admin/lib/lang/cn_remote_user_list.lng @@ -0,0 +1,7 @@ + diff --git a/interface/web/admin/lib/lang/cn_server.lng b/interface/web/admin/lib/lang/cn_server.lng new file mode 100644 index 0000000000..75f0e247f2 --- /dev/null +++ b/interface/web/admin/lib/lang/cn_server.lng @@ -0,0 +1,16 @@ + diff --git a/interface/web/admin/lib/lang/cn_server_config.lng b/interface/web/admin/lib/lang/cn_server_config.lng new file mode 100644 index 0000000000..5d5d6eeb25 --- /dev/null +++ b/interface/web/admin/lib/lang/cn_server_config.lng @@ -0,0 +1,354 @@ += 2000。'; +$wb['mailuser_gid_error_range'] = 'Mailuser GID 必须 >= 2000。'; +$wb['getmail_config_dir_error_regex'] = '无效的 getmail 配置目录。'; +$wb['website_basedir_error_regex'] = '无效的网站基础目录路径,最小长度为 5 个字符。'; +$wb['website_symlinks_error_regex'] = '无效的网站符号链接。'; +$wb['vhost_conf_dir_error_regex'] = '无效的虚拟主机配置目录。'; +$wb['vhost_conf_enabled_dir_error_regex'] = '无效的虚拟主机启用配置目录。'; +$wb['nginx_vhost_conf_dir_error_regex'] = '无效的 Nginx 配置目录。'; +$wb['nginx_vhost_conf_enabled_dir_error_regex'] = '无效的 Nginx 启用配置目录。'; +$wb['ca_path_error_regex'] = '无效的 CA 路径。'; +$wb['invalid_nginx_user_txt'] = '无效的 Nginx 用户。'; +$wb['invalid_nginx_group_txt'] = '无效的 Nginx 组。'; +$wb['php_ini_path_apache_error_regex'] = '无效的 Apache php.ini 路径。'; +$wb['php_ini_path_cgi_error_regex'] = '无效的 CGI php.ini 路径。'; +$wb['php_fpm_init_script_error_regex'] = '无效的 PHP-FPM init 脚本。'; +$wb['php_fpm_ini_path_error_regex'] = '无效的 PHP-FPM ini 路径。'; +$wb['php_fpm_pool_dir_error_regex'] = '无效的 PHP-FPM 池目录。'; +$wb['php_fpm_socket_dir_error_regex'] = '无效的 PHP-FPM socket 目录。'; +$wb['php_open_basedir_error_regex'] = '无效的 PHP open_basedir。'; +$wb['awstats_data_dir_empty'] = 'awstats 数据目录为空'; +$wb['awstats_data_dir_error_regex'] = '无效的 awstats 数据目录。'; +$wb['awstats_pl_empty'] = 'awstats.pl设置为空。'; +$wb['awstats_pl_error_regex'] = '无效的awstats.pl路径。'; +$wb['awstats_buildstaticpages_pl_empty'] = 'awstats_buildstaticpages.pl为空。'; +$wb['awstats_buildstaticpages_pl_error_regex'] = '无效的awstats_buildstaticpages.pl路径。'; +$wb['invalid_bind_user_txt'] = '无效的BIND用户。'; +$wb['invalid_bind_group_txt'] = '无效的BIND用户组。'; +$wb['bind_zonefiles_dir_error_regex'] = '无效的BIND区域文件目录。'; +$wb['bind_keyfiles_dir_error_regex'] = '无效的BIND密钥文件目录。'; +$wb['named_conf_path_error_regex'] = '无效的named.conf路径。'; +$wb['named_conf_local_path_error_regex'] = '无效的named.conf.local路径。'; +$wb['fastcgi_starter_path_error_regex'] = '无效的FastCGI启动器路径。'; +$wb['fastcgi_starter_script_error_regex'] = '无效的FastCGI启动器脚本。'; +$wb['fastcgi_alias_error_regex'] = '无效的FastCGI别名。'; +$wb['fastcgi_phpini_path_error_regex'] = '无效的FastCGI php.ini路径。'; +$wb['fastcgi_bin_error_regex'] = '无效的FastCGI bin路径。'; +$wb['jailkit_chroot_home_error_regex'] = '无效的Jailkit chroot home路径。'; +$wb['jailkit_chroot_app_sections_error_regex'] = '无效的Jailkit chroot应用程序sections。'; +$wb['jailkit_chroot_app_programs_error_regex'] = '无效的Jailkit chroot应用程序。'; +$wb['jailkit_chroot_cron_programs_error_regex'] = '无效的Jailkit chroot计划任务程序。'; +$wb['jailkit_chroot_authorized_keys_template_error_regex'] = '无效的 jaikit chroot authorized_keys 模板文件。'; +$wb['vlogger_config_dir_error_regex'] = '无效的 vlogger 配置目录。'; +$wb['cron_init_script_error_regex'] = '无效的 cron 初始化脚本。'; +$wb['crontab_dir_error_regex'] = '无效的 crontab 目录。'; +$wb['cron_wget_error_regex'] = '无效的 cron wget 路径。'; +$wb['network_filesystem_txt'] = '网络文件系统'; +$wb['php_ini_check_minutes_txt'] = '每 X 分钟检查 php.ini 是否更改'; +$wb['php_ini_check_minutes_error_empty'] = '请指定检查 php.ini 更改的频率。'; +$wb['php_ini_check_minutes_info_txt'] = '0 = 无需检查'; +$wb['web_settings_txt'] = 'Web 服务器'; +$wb['xmpp_server_txt'] = 'XMPP 服务器'; +$wb['xmpp_use_ipv6_txt'] = '使用 IPv6'; +$wb['xmpp_bosh_max_inactivity_txt'] = '最大 BOSH 不活动时间'; +$wb['xmpp_bosh_timeout_range_wrong'] = '请输入 BOSH 超时范围介于 15-360 之间'; +$wb['xmpp_module_saslauth'] = 'saslauth'; +$wb['xmpp_server_admins_txt'] = '服务器管理员 (JIDs)'; +$wb['xmpp_modules_enabled_txt'] = '全局启用的插件(每行一个)'; +$wb['xmpp_ports_txt'] = '组件端口'; +$wb['xmpp_port_http_txt'] = 'HTTP'; +$wb['xmpp_port_https_txt'] = 'HTTPS'; +$wb['xmpp_port_pastebin_txt'] = 'Pastebin'; +$wb['xmpp_port_bosh_txt'] = 'BOSH'; +$wb['disable_bind_log_txt'] = '禁用bind9消息以进行日志级别WARN'; +$wb['apps_vhost_enabled_txt'] = '启用Apps-vhost'; +$wb['skip_le_check_txt'] = '跳过Let\'s Encrypt检查'; +$wb['migration_mode_txt'] = '服务器迁移模式'; +$wb['nginx_enable_pagespeed_txt'] = '启用Pagespeed'; +$wb['logging_txt'] = '存储网站访问和错误日志'; +$wb['logging_desc_txt'] = '使用工具>重新同步将更改应用于现有站点。对于Apache,访问和错误日志可以匿名化。对于nginx,仅访问日志会被匿名化,错误日志将包含IP地址。'; +$wb['log_retention_txt'] = '日志保留期(天)'; +$wb['log_retention_error_ispositive'] = '日志保留时间必须是大于0的数字'; +$wb['php_default_hide_txt'] = '在选择框中隐藏默认的PHP版本'; +$wb['php_default_name_txt'] = '默认PHP版本的描述'; +$wb['php_default_name_error_empty'] = '默认PHP版本的描述不能为空'; +$wb['error_mailbox_message_size_txt'] = '邮箱大小必须大于等于邮件大小'; +$wb['php_fpm_reload_mode_txt'] = 'PHP-FPM重新加载模式'; +$wb['content_filter_txt'] = '内容过滤器'; +$wb['rspamd_url_txt'] = 'Rspamd URL'; +$wb['rspamd_user_txt'] = 'Rspamd 用户名'; +$wb['rspamd_password_txt'] = 'Rspamd 密码'; +$wb['rspamd_redis_servers_txt'] = 'Redis服务器'; +$wb['tooltip_rspamd_redis_servers_txt'] = 'Rspamd将使用的Redis服务器。例如: , 或。'; +$wb['rspamd_redis_password_txt'] = 'Redis密码'; +$wb['tooltip_rspamd_redis_password_txt'] = 'Redis服务器的密码(如果未使用,请留空)。'; +$wb['rspamd_redis_bayes_servers_txt'] = 'Bayes的Redis服务器'; +$wb['tooltip_rspamd_redis_bayes_servers_txt'] = 'Rspamd将用于Bayes的Redis服务器(否则请留空)。例如: 或。'; +$wb['rspamd_redis_bayes_password_txt'] = 'Bayes Redis密码'; +$wb['tooltip_rspamd_redis_bayes_password_txt'] = 'Bayes Redis服务器的密码(如果未使用,请留空)。'; +$wb['vhost_proxy_protocol_enabled_txt'] = '启用PROXY协议'; +$wb['vhost_proxy_protocol_http_port_txt'] = 'PROXY协议HTTP端口'; +$wb['vhost_proxy_protocol_https_port_txt'] = 'PROXY协议HTTPS端口'; +$wb['jailkit_hardlinks_txt'] = 'Jailkit chroot中的硬链接'; +$wb['tooltip_jailkit_hardlinks_txt'] = '使用硬链接不安全,但可以节省磁盘空间。'; +$wb['jailkit_hardlinks_allow_txt'] = '允许狱中硬链接'; +$wb['jailkit_hardlinks_no_txt'] = '不,删除硬链接文件'; +$wb['jailkit_hardlinks_yes_txt'] = '是的,如果可能,使用硬链接'; +$wb['mailbox_soft_delete_txt'] = '邮箱软删除'; +$wb['mailbox_soft_delete_info_txt'] = '默认情况下,7天后清理。'; diff --git a/interface/web/admin/lib/lang/cn_server_config_list.lng b/interface/web/admin/lib/lang/cn_server_config_list.lng new file mode 100644 index 0000000000..4e4694c4e1 --- /dev/null +++ b/interface/web/admin/lib/lang/cn_server_config_list.lng @@ -0,0 +1,4 @@ + diff --git a/interface/web/admin/lib/lang/cn_server_ip.lng b/interface/web/admin/lib/lang/cn_server_ip.lng new file mode 100644 index 0000000000..c7b1593515 --- /dev/null +++ b/interface/web/admin/lib/lang/cn_server_ip.lng @@ -0,0 +1,13 @@ + diff --git a/interface/web/admin/lib/lang/cn_server_ip_list.lng b/interface/web/admin/lib/lang/cn_server_ip_list.lng new file mode 100644 index 0000000000..49d1f0a4f0 --- /dev/null +++ b/interface/web/admin/lib/lang/cn_server_ip_list.lng @@ -0,0 +1,10 @@ + diff --git a/interface/web/admin/lib/lang/cn_server_ip_map.lng b/interface/web/admin/lib/lang/cn_server_ip_map.lng new file mode 100644 index 0000000000..ff3ed0b27b --- /dev/null +++ b/interface/web/admin/lib/lang/cn_server_ip_map.lng @@ -0,0 +1,14 @@ + diff --git a/interface/web/admin/lib/lang/cn_server_ip_map_list.lng b/interface/web/admin/lib/lang/cn_server_ip_map_list.lng new file mode 100644 index 0000000000..1e28d08a77 --- /dev/null +++ b/interface/web/admin/lib/lang/cn_server_ip_map_list.lng @@ -0,0 +1,7 @@ + diff --git a/interface/web/admin/lib/lang/cn_server_list.lng b/interface/web/admin/lib/lang/cn_server_list.lng new file mode 100644 index 0000000000..1edbc95a83 --- /dev/null +++ b/interface/web/admin/lib/lang/cn_server_list.lng @@ -0,0 +1,14 @@ + diff --git a/interface/web/admin/lib/lang/cn_server_php.lng b/interface/web/admin/lib/lang/cn_server_php.lng new file mode 100644 index 0000000000..80571fb194 --- /dev/null +++ b/interface/web/admin/lib/lang/cn_server_php.lng @@ -0,0 +1,20 @@ + diff --git a/interface/web/admin/lib/lang/cn_server_php_list.lng b/interface/web/admin/lib/lang/cn_server_php_list.lng new file mode 100644 index 0000000000..94711361bf --- /dev/null +++ b/interface/web/admin/lib/lang/cn_server_php_list.lng @@ -0,0 +1,9 @@ + diff --git a/interface/web/admin/lib/lang/cn_system_config.lng b/interface/web/admin/lib/lang/cn_system_config.lng new file mode 100644 index 0000000000..694472161f --- /dev/null +++ b/interface/web/admin/lib/lang/cn_system_config.lng @@ -0,0 +1,110 @@ + diff --git a/interface/web/admin/lib/lang/cn_tpl_default_admin.lng b/interface/web/admin/lib/lang/cn_tpl_default_admin.lng new file mode 100644 index 0000000000..d5f3ecd21a --- /dev/null +++ b/interface/web/admin/lib/lang/cn_tpl_default_admin.lng @@ -0,0 +1,18 @@ + diff --git a/interface/web/admin/lib/lang/cn_users.lng b/interface/web/admin/lib/lang/cn_users.lng new file mode 100644 index 0000000000..ccb6eb12cd --- /dev/null +++ b/interface/web/admin/lib/lang/cn_users.lng @@ -0,0 +1,42 @@ + diff --git a/interface/web/admin/lib/lang/cn_users_list.lng b/interface/web/admin/lib/lang/cn_users_list.lng new file mode 100644 index 0000000000..c85047fb63 --- /dev/null +++ b/interface/web/admin/lib/lang/cn_users_list.lng @@ -0,0 +1,9 @@ +警告:不要在此处编辑或修改任何客户端用户设置。请改用客户端模块中的客户端和经销商设置。在此修改或更改客户端用户或组可能会导致数据丢失!'; +?> diff --git a/interface/web/client/lib/lang/cn.lng b/interface/web/client/lib/lang/cn.lng new file mode 100644 index 0000000000..cefa8508e9 --- /dev/null +++ b/interface/web/client/lib/lang/cn.lng @@ -0,0 +1,31 @@ + diff --git a/interface/web/client/lib/lang/cn_client.lng b/interface/web/client/lib/lang/cn_client.lng new file mode 100644 index 0000000000..0d477335a8 --- /dev/null +++ b/interface/web/client/lib/lang/cn_client.lng @@ -0,0 +1,210 @@ + diff --git a/interface/web/client/lib/lang/cn_client_circle_list.lng b/interface/web/client/lib/lang/cn_client_circle_list.lng new file mode 100644 index 0000000000..2fbf762682 --- /dev/null +++ b/interface/web/client/lib/lang/cn_client_circle_list.lng @@ -0,0 +1,10 @@ + diff --git a/interface/web/client/lib/lang/cn_client_del.lng b/interface/web/client/lib/lang/cn_client_del.lng new file mode 100644 index 0000000000..5598db2e34 --- /dev/null +++ b/interface/web/client/lib/lang/cn_client_del.lng @@ -0,0 +1,10 @@ + diff --git a/interface/web/client/lib/lang/cn_client_message.lng b/interface/web/client/lib/lang/cn_client_message.lng new file mode 100644 index 0000000000..080ca70cdd --- /dev/null +++ b/interface/web/client/lib/lang/cn_client_message.lng @@ -0,0 +1,20 @@ + diff --git a/interface/web/client/lib/lang/cn_client_message_template.lng b/interface/web/client/lib/lang/cn_client_message_template.lng new file mode 100644 index 0000000000..7ec95daad1 --- /dev/null +++ b/interface/web/client/lib/lang/cn_client_message_template.lng @@ -0,0 +1,13 @@ + diff --git a/interface/web/client/lib/lang/cn_client_message_template_list.lng b/interface/web/client/lib/lang/cn_client_message_template_list.lng new file mode 100644 index 0000000000..8e6fbaf90e --- /dev/null +++ b/interface/web/client/lib/lang/cn_client_message_template_list.lng @@ -0,0 +1,5 @@ + diff --git a/interface/web/client/lib/lang/cn_client_template.lng b/interface/web/client/lib/lang/cn_client_template.lng new file mode 100644 index 0000000000..1e4eace66f --- /dev/null +++ b/interface/web/client/lib/lang/cn_client_template.lng @@ -0,0 +1,131 @@ + diff --git a/interface/web/client/lib/lang/cn_clients_list.lng b/interface/web/client/lib/lang/cn_clients_list.lng new file mode 100644 index 0000000000..c12c0f7009 --- /dev/null +++ b/interface/web/client/lib/lang/cn_clients_list.lng @@ -0,0 +1,14 @@ + diff --git a/interface/web/client/lib/lang/cn_domain.lng b/interface/web/client/lib/lang/cn_domain.lng new file mode 100644 index 0000000000..dbdac298a6 --- /dev/null +++ b/interface/web/client/lib/lang/cn_domain.lng @@ -0,0 +1,6 @@ + diff --git a/interface/web/client/lib/lang/cn_domain_list.lng b/interface/web/client/lib/lang/cn_domain_list.lng new file mode 100644 index 0000000000..8eed884ad9 --- /dev/null +++ b/interface/web/client/lib/lang/cn_domain_list.lng @@ -0,0 +1,6 @@ + diff --git a/interface/web/client/lib/lang/cn_reseller.lng b/interface/web/client/lib/lang/cn_reseller.lng new file mode 100644 index 0000000000..0f002ddc2d --- /dev/null +++ b/interface/web/client/lib/lang/cn_reseller.lng @@ -0,0 +1,216 @@ + 0或-1(无限制)'; +$wb['limit_web_quota_txt'] = 'Web配额'; +$wb['limit_traffic_quota_txt'] = '流量配额'; +$wb['limit_trafficquota_error_notint'] = '流量配额必须是数字。'; +$wb['customer_no_txt'] = '客户编号'; +$wb['vat_id_txt'] = '增值税编号'; +$wb['required_fields_txt'] = '*必填字段'; +$wb['limit_openvz_vm_txt'] = '最大虚拟服务器数'; +$wb['limit_openvz_vm_template_id_txt'] = '强制虚拟服务器模板'; +$wb['limit_openvz_vm_error_notint'] = '虚拟服务器限制必须是数字。'; +$wb['web_php_options_notempty'] = '未选择PHP选项。请选择至少一个PHP选项。'; +$wb['ssh_chroot_notempty'] = '未选择SSH chroot选项。请选择至少一个选项。'; +$wb['username_error_collision'] = '用户名不能以-web-或-web-后跟数字开头。'; +$wb['web_limits_txt'] = 'Web限制'; +$wb['email_limits_txt'] = '电子邮件限制'; +$wb['database_limits_txt'] = '数据库限制'; +$wb['cron_job_limits_txt'] = '计划任务限制'; +$wb['dns_limits_txt'] = 'DNS限制'; +$wb['virtualization_limits_txt'] = '虚拟化限制'; +$wb['generate_password_txt'] = '生成密码'; +$wb['repeat_password_txt'] = '重复密码'; +$wb['password_mismatch_txt'] = '密码不匹配。'; +$wb['password_match_txt'] = '密码匹配。'; +$wb['email_error_isemail'] = '请输入有效的电子邮件地址。'; +$wb['customer_no_error_unique'] = '客户编号必须唯一(或为空)。'; +$wb['paypal_email_error_isemail'] = '请输入有效的PayPal电子邮件地址。'; +$wb['paypal_email_txt'] = 'PayPal电子邮件'; +$wb['company_id_txt'] = '公司/企业ID'; +$wb['bank_account_number_txt'] = '银行账号'; +$wb['bank_account_owner_txt'] = '银行账户所有者'; +$wb['bank_code_txt'] = '银行代码'; +$wb['bank_name_txt'] = '银行名称'; +$wb['bank_account_iban_txt'] = 'IBAN'; +$wb['bank_account_swift_txt'] = 'BIC/Swift'; +$wb['aps_limits_txt'] = 'APS安装器限制'; +$wb['limit_aps_txt'] = '最大APS实例数'; +$wb['limit_aps_error_notint'] = 'APS实例限制必须是数字。'; +$wb['default_slave_dnsserver_txt'] = '默认次要DNS服务器'; +$wb['locked_txt'] = '已锁定'; +$wb['canceled_txt'] = '已取消'; +$wb['gender_m_txt'] = '先生'; +$wb['gender_f_txt'] = '女士'; +$wb['gender_txt'] = '称呼'; +$wb['web_servers_txt'] = 'Web服务器'; +$wb['web_servers_placeholder'] = '选择Web服务器'; +$wb['no_web_server_error'] = '至少必须选择一个Web服务器。'; +$wb['web_servers_used'] = '您正在尝试从此客户端中删除的服务器用作Web服务器。请确保在删除之前,此服务器未被此客户端使用。'; +$wb['dns_servers_txt'] = 'DNS服务器'; +$wb['dns_servers_placeholder'] = '选择DNS服务器'; +$wb['no_dns_server_error'] = '至少必须选择一个DNS服务器。'; +$wb['dns_servers_used'] = '您正在尝试从此客户端中删除的服务器用作DNS服务器。请确保在删除之前,此服务器未被此客户端使用。'; +$wb['db_servers_txt'] = '数据库服务器'; +$wb['db_servers_placeholder'] = '选择数据库服务器'; +$wb['no_db_server_error'] = '至少必须选择一个数据库服务器。'; +$wb['db_servers_used'] = '您正在尝试从此客户端中删除的服务器用作数据库服务器。请确保在删除之前,此服务器未被此客户端使用。'; +$wb['mail_servers_txt'] = '邮件服务器'; +$wb['mail_servers_placeholder'] = '选择邮件服务器'; +$wb['no_mail_server_error'] = '至少必须选择一个邮件服务器。'; +$wb['mail_servers_used'] = '您尝试从此客户端中删除的服务器正在用作邮件服务器。请确保在删除之前此服务器未被此客户端使用。'; +$wb['customer_no_template_txt'] = '客户编号模板'; +$wb['customer_no_template_error_regex_txt'] = '客户编号模板包含无效字符。'; +$wb['customer_no_start_txt'] = '客户编号起始值'; +$wb['customer_no_counter_txt'] = '客户编号计数器'; + +$wb['xmpp_limits_txt'] = 'XMPP 限制'; +$wb['xmpp_servers_txt'] = 'XMPP 服务器'; +$wb['xmpp_servers_placeholder'] = '选择 XMPP 服务器'; +$wb['no_xmpp_server_error'] = '必须选择至少一个 XMPP 服务器。'; +$wb['xmpp_servers_used'] = '您正在尝试从此客户端中删除的服务器被用作 XMPP 服务器。在删除之前,请确保该服务器未被此客户端使用。'; +$wb['limit_xmpp_domain_error_notint'] = 'XMPP 域限制必须为数字。'; +$wb['limit_xmpp_user_error_notint'] = 'XMPP 用户限制必须为数字。'; +$wb['limit_xmpp_domain_txt'] = 'XMPP 域最大数量'; +$wb['limit_xmpp_user_txt'] = 'XMPP 帐户最大数量'; +$wb['limit_xmpp_muc_txt'] = '支持多用户聊天'; +$wb['limit_xmpp_pastebin_txt'] = '支持 MUC 的 Pastebin'; +$wb['limit_xmpp_httparchive_txt'] = '支持 MUC 的 HTTP 存档'; +$wb['limit_xmpp_anon_txt'] = '匿名主机可用'; +$wb['limit_xmpp_vjud_txt'] = 'VJUD 用户目录可用'; +$wb['limit_xmpp_proxy_txt'] = 'Bytestream 代理可用'; +$wb['limit_xmpp_status_txt'] = '状态主机可用'; +$wb['added_by_txt'] = '添加人'; +$wb['added_date_txt'] = '添加日期'; +$wb['limit_domainmodule_error_notint'] = '域模块限制必须为数字。'; +$wb['limit_domainmodule_txt'] = '域模块限制'; +$wb['client_limits_txt'] = '客户端限制'; +$wb['err_msg_master_tpl_set'] = '如果选择了除 "自定义" 之外的任何主模板,则忽略所有自定义限制设置。'; +$wb['invalid_vat_id'] = '无效的增值税号。'; +$wb['btn_save_txt'] = '保存'; +$wb['btn_cancel_txt'] = '取消'; +$wb['email_error_empty'] = '电子邮件为空'; +$wb['limit_directive_snippets_txt'] = '显示Web服务器配置选项'; +$wb['limit_database_user_txt'] = '最大数据库用户数'; +$wb['limit_database_user_error_notint'] = '数据库用户限制必须为数字。'; +$wb['limit_database_quota_txt'] = '数据库配额'; +$wb['limit_database_quota_error_notint'] = '数据库配额限制必须为数字。'; +$wb['Reseller'] = '经销商'; +$wb['Address'] = '地址'; +$wb['Limits'] = '限制'; diff --git a/interface/web/client/lib/lang/cn_resellers_list.lng b/interface/web/client/lib/lang/cn_resellers_list.lng new file mode 100644 index 0000000000..b8768e3224 --- /dev/null +++ b/interface/web/client/lib/lang/cn_resellers_list.lng @@ -0,0 +1,11 @@ + diff --git a/interface/web/dashboard/lib/lang/cn.lng b/interface/web/dashboard/lib/lang/cn.lng new file mode 100644 index 0000000000..9a1b4e3bf9 --- /dev/null +++ b/interface/web/dashboard/lib/lang/cn.lng @@ -0,0 +1,4 @@ + diff --git a/interface/web/dashboard/lib/lang/cn_dashlet_customer.lng b/interface/web/dashboard/lib/lang/cn_dashlet_customer.lng new file mode 100644 index 0000000000..3cc1389c37 --- /dev/null +++ b/interface/web/dashboard/lib/lang/cn_dashlet_customer.lng @@ -0,0 +1,4 @@ + diff --git a/interface/web/dashboard/lib/lang/cn_dashlet_databasequota.lng b/interface/web/dashboard/lib/lang/cn_dashlet_databasequota.lng new file mode 100644 index 0000000000..b03712a821 --- /dev/null +++ b/interface/web/dashboard/lib/lang/cn_dashlet_databasequota.lng @@ -0,0 +1,7 @@ + diff --git a/interface/web/dashboard/lib/lang/cn_dashlet_donate.lng b/interface/web/dashboard/lib/lang/cn_dashlet_donate.lng new file mode 100644 index 0000000000..f12fe56696 --- /dev/null +++ b/interface/web/dashboard/lib/lang/cn_dashlet_donate.lng @@ -0,0 +1,7 @@ + diff --git a/interface/web/dashboard/lib/lang/cn_dashlet_invoice_client_settings.lng b/interface/web/dashboard/lib/lang/cn_dashlet_invoice_client_settings.lng new file mode 100644 index 0000000000..338c8910d2 --- /dev/null +++ b/interface/web/dashboard/lib/lang/cn_dashlet_invoice_client_settings.lng @@ -0,0 +1,4 @@ + diff --git a/interface/web/dashboard/lib/lang/cn_dashlet_invoices.lng b/interface/web/dashboard/lib/lang/cn_dashlet_invoices.lng new file mode 100644 index 0000000000..50bbf57294 --- /dev/null +++ b/interface/web/dashboard/lib/lang/cn_dashlet_invoices.lng @@ -0,0 +1,18 @@ + diff --git a/interface/web/dashboard/lib/lang/cn_dashlet_limits.lng b/interface/web/dashboard/lib/lang/cn_dashlet_limits.lng new file mode 100644 index 0000000000..29adaf9ad8 --- /dev/null +++ b/interface/web/dashboard/lib/lang/cn_dashlet_limits.lng @@ -0,0 +1,34 @@ + diff --git a/interface/web/dashboard/lib/lang/cn_dashlet_mailquota.lng b/interface/web/dashboard/lib/lang/cn_dashlet_mailquota.lng new file mode 100644 index 0000000000..4e7361a9f9 --- /dev/null +++ b/interface/web/dashboard/lib/lang/cn_dashlet_mailquota.lng @@ -0,0 +1,8 @@ + diff --git a/interface/web/dashboard/lib/lang/cn_dashlet_modules.lng b/interface/web/dashboard/lib/lang/cn_dashlet_modules.lng new file mode 100644 index 0000000000..0077b02676 --- /dev/null +++ b/interface/web/dashboard/lib/lang/cn_dashlet_modules.lng @@ -0,0 +1,4 @@ + diff --git a/interface/web/dashboard/lib/lang/cn_dashlet_products.lng b/interface/web/dashboard/lib/lang/cn_dashlet_products.lng new file mode 100644 index 0000000000..f9c161934e --- /dev/null +++ b/interface/web/dashboard/lib/lang/cn_dashlet_products.lng @@ -0,0 +1,9 @@ + diff --git a/interface/web/dashboard/lib/lang/cn_dashlet_quota.lng b/interface/web/dashboard/lib/lang/cn_dashlet_quota.lng new file mode 100644 index 0000000000..123ffc314a --- /dev/null +++ b/interface/web/dashboard/lib/lang/cn_dashlet_quota.lng @@ -0,0 +1,8 @@ + diff --git a/interface/web/dashboard/lib/lang/cn_dashlet_shop.lng b/interface/web/dashboard/lib/lang/cn_dashlet_shop.lng new file mode 100644 index 0000000000..e5977b2586 --- /dev/null +++ b/interface/web/dashboard/lib/lang/cn_dashlet_shop.lng @@ -0,0 +1,8 @@ + diff --git a/interface/web/dns/lib/lang/cn.lng b/interface/web/dns/lib/lang/cn.lng new file mode 100644 index 0000000000..ec4dc6ef2d --- /dev/null +++ b/interface/web/dns/lib/lang/cn.lng @@ -0,0 +1,23 @@ + diff --git a/interface/web/dns/lib/lang/cn_dns_a.lng b/interface/web/dns/lib/lang/cn_dns_a.lng new file mode 100644 index 0000000000..463e5e9760 --- /dev/null +++ b/interface/web/dns/lib/lang/cn_dns_a.lng @@ -0,0 +1,17 @@ + diff --git a/interface/web/dns/lib/lang/cn_dns_a_list.lng b/interface/web/dns/lib/lang/cn_dns_a_list.lng new file mode 100644 index 0000000000..17d90d7c40 --- /dev/null +++ b/interface/web/dns/lib/lang/cn_dns_a_list.lng @@ -0,0 +1,15 @@ + diff --git a/interface/web/dns/lib/lang/cn_dns_aaaa.lng b/interface/web/dns/lib/lang/cn_dns_aaaa.lng new file mode 100644 index 0000000000..265fed59b2 --- /dev/null +++ b/interface/web/dns/lib/lang/cn_dns_aaaa.lng @@ -0,0 +1,17 @@ + diff --git a/interface/web/dns/lib/lang/cn_dns_alias.lng b/interface/web/dns/lib/lang/cn_dns_alias.lng new file mode 100644 index 0000000000..892325cc48 --- /dev/null +++ b/interface/web/dns/lib/lang/cn_dns_alias.lng @@ -0,0 +1,17 @@ + diff --git a/interface/web/dns/lib/lang/cn_dns_caa.lng b/interface/web/dns/lib/lang/cn_dns_caa.lng new file mode 100644 index 0000000000..d823310e38 --- /dev/null +++ b/interface/web/dns/lib/lang/cn_dns_caa.lng @@ -0,0 +1,18 @@ + diff --git a/interface/web/dns/lib/lang/cn_dns_cname.lng b/interface/web/dns/lib/lang/cn_dns_cname.lng new file mode 100644 index 0000000000..2328a23e8c --- /dev/null +++ b/interface/web/dns/lib/lang/cn_dns_cname.lng @@ -0,0 +1,17 @@ + diff --git a/interface/web/dns/lib/lang/cn_dns_dkim.lng b/interface/web/dns/lib/lang/cn_dns_dkim.lng new file mode 100644 index 0000000000..f584280d29 --- /dev/null +++ b/interface/web/dns/lib/lang/cn_dns_dkim.lng @@ -0,0 +1,13 @@ + diff --git a/interface/web/dns/lib/lang/cn_dns_dmarc.lng b/interface/web/dns/lib/lang/cn_dns_dmarc.lng new file mode 100644 index 0000000000..074fc0d2cb --- /dev/null +++ b/interface/web/dns/lib/lang/cn_dns_dmarc.lng @@ -0,0 +1,50 @@ + diff --git a/interface/web/dns/lib/lang/cn_dns_dname.lng b/interface/web/dns/lib/lang/cn_dns_dname.lng new file mode 100644 index 0000000000..a28d9d1e32 --- /dev/null +++ b/interface/web/dns/lib/lang/cn_dns_dname.lng @@ -0,0 +1,17 @@ + diff --git a/interface/web/dns/lib/lang/cn_dns_ds.lng b/interface/web/dns/lib/lang/cn_dns_ds.lng new file mode 100644 index 0000000000..92f2a8da88 --- /dev/null +++ b/interface/web/dns/lib/lang/cn_dns_ds.lng @@ -0,0 +1,18 @@ + diff --git a/interface/web/dns/lib/lang/cn_dns_hinfo.lng b/interface/web/dns/lib/lang/cn_dns_hinfo.lng new file mode 100644 index 0000000000..476c0c1ab8 --- /dev/null +++ b/interface/web/dns/lib/lang/cn_dns_hinfo.lng @@ -0,0 +1,16 @@ + diff --git a/interface/web/dns/lib/lang/cn_dns_import.lng b/interface/web/dns/lib/lang/cn_dns_import.lng new file mode 100644 index 0000000000..22e24db0a4 --- /dev/null +++ b/interface/web/dns/lib/lang/cn_dns_import.lng @@ -0,0 +1,25 @@ + diff --git a/interface/web/dns/lib/lang/cn_dns_loc.lng b/interface/web/dns/lib/lang/cn_dns_loc.lng new file mode 100644 index 0000000000..2321e08771 --- /dev/null +++ b/interface/web/dns/lib/lang/cn_dns_loc.lng @@ -0,0 +1,16 @@ + diff --git a/interface/web/dns/lib/lang/cn_dns_mx.lng b/interface/web/dns/lib/lang/cn_dns_mx.lng new file mode 100644 index 0000000000..b22775cb59 --- /dev/null +++ b/interface/web/dns/lib/lang/cn_dns_mx.lng @@ -0,0 +1,18 @@ + diff --git a/interface/web/dns/lib/lang/cn_dns_naptr.lng b/interface/web/dns/lib/lang/cn_dns_naptr.lng new file mode 100644 index 0000000000..91316593cd --- /dev/null +++ b/interface/web/dns/lib/lang/cn_dns_naptr.lng @@ -0,0 +1,21 @@ + diff --git a/interface/web/dns/lib/lang/cn_dns_ns.lng b/interface/web/dns/lib/lang/cn_dns_ns.lng new file mode 100644 index 0000000000..a632dbc500 --- /dev/null +++ b/interface/web/dns/lib/lang/cn_dns_ns.lng @@ -0,0 +1,16 @@ + diff --git a/interface/web/dns/lib/lang/cn_dns_ptr.lng b/interface/web/dns/lib/lang/cn_dns_ptr.lng new file mode 100644 index 0000000000..70de8c265a --- /dev/null +++ b/interface/web/dns/lib/lang/cn_dns_ptr.lng @@ -0,0 +1,16 @@ + diff --git a/interface/web/dns/lib/lang/cn_dns_rp.lng b/interface/web/dns/lib/lang/cn_dns_rp.lng new file mode 100644 index 0000000000..14c7ac878c --- /dev/null +++ b/interface/web/dns/lib/lang/cn_dns_rp.lng @@ -0,0 +1,16 @@ + diff --git a/interface/web/dns/lib/lang/cn_dns_slave.lng b/interface/web/dns/lib/lang/cn_dns_slave.lng new file mode 100644 index 0000000000..1a511d7138 --- /dev/null +++ b/interface/web/dns/lib/lang/cn_dns_slave.lng @@ -0,0 +1,17 @@ +'; +$wb['server_id_error_empty'] = '未选择服务器'; +$wb['origin_error_empty'] = '区域为空。'; +$wb['origin_error_unique'] = '此区域已存在记录。'; +$wb['origin_error_regex'] = '区域格式无效。'; +$wb['ns_error_regex'] = 'NS格式无效。'; +$wb['eg_domain_tld'] = '例如:domain.tld。'; +$wb['ipv4_form_txt'] = '用逗号分隔多个IP。'; +?> diff --git a/interface/web/dns/lib/lang/cn_dns_slave_admin_list.lng b/interface/web/dns/lib/lang/cn_dns_slave_admin_list.lng new file mode 100644 index 0000000000..fe03211936 --- /dev/null +++ b/interface/web/dns/lib/lang/cn_dns_slave_admin_list.lng @@ -0,0 +1,10 @@ + diff --git a/interface/web/dns/lib/lang/cn_dns_slave_list.lng b/interface/web/dns/lib/lang/cn_dns_slave_list.lng new file mode 100644 index 0000000000..24c365e579 --- /dev/null +++ b/interface/web/dns/lib/lang/cn_dns_slave_list.lng @@ -0,0 +1,9 @@ + diff --git a/interface/web/dns/lib/lang/cn_dns_soa.lng b/interface/web/dns/lib/lang/cn_dns_soa.lng new file mode 100644 index 0000000000..86a7f78b47 --- /dev/null +++ b/interface/web/dns/lib/lang/cn_dns_soa.lng @@ -0,0 +1,47 @@ + diff --git a/interface/web/dns/lib/lang/cn_dns_soa_admin_list.lng b/interface/web/dns/lib/lang/cn_dns_soa_admin_list.lng new file mode 100644 index 0000000000..35ee4306d4 --- /dev/null +++ b/interface/web/dns/lib/lang/cn_dns_soa_admin_list.lng @@ -0,0 +1,12 @@ + diff --git a/interface/web/dns/lib/lang/cn_dns_soa_list.lng b/interface/web/dns/lib/lang/cn_dns_soa_list.lng new file mode 100644 index 0000000000..a6c0876a45 --- /dev/null +++ b/interface/web/dns/lib/lang/cn_dns_soa_list.lng @@ -0,0 +1,11 @@ + diff --git a/interface/web/dns/lib/lang/cn_dns_spf.lng b/interface/web/dns/lib/lang/cn_dns_spf.lng new file mode 100644 index 0000000000..9c09e4881e --- /dev/null +++ b/interface/web/dns/lib/lang/cn_dns_spf.lng @@ -0,0 +1,30 @@ +编辑现有记录吗?'; +$wb['spf_record_exists_multiple_txt'] = '主机名"{hostname}"存在多个SPF记录。这会导致收件人拒绝您的邮件!删除或合并重复的现有记录,然后重试。'; +$wb['limit_dns_record_txt'] = '您的帐户达到了DNS记录的最大数量。'; +$wb['no_zone_perm'] = '您无权向此DNS区域添加记录。'; +$wb['ttl_range_error'] = '最小TTL时间为60秒。'; +$wb['name_error_regex'] = '主机名格式错误。'; +$wb['btn_edit_as_txt_record_txt'] = '作为TXT记录编辑'; +?> diff --git a/interface/web/dns/lib/lang/cn_dns_srv.lng b/interface/web/dns/lib/lang/cn_dns_srv.lng new file mode 100644 index 0000000000..82a585890f --- /dev/null +++ b/interface/web/dns/lib/lang/cn_dns_srv.lng @@ -0,0 +1,20 @@ + diff --git a/interface/web/dns/lib/lang/cn_dns_sshfp.lng b/interface/web/dns/lib/lang/cn_dns_sshfp.lng new file mode 100644 index 0000000000..e056f69265 --- /dev/null +++ b/interface/web/dns/lib/lang/cn_dns_sshfp.lng @@ -0,0 +1,16 @@ + diff --git a/interface/web/dns/lib/lang/cn_dns_template.lng b/interface/web/dns/lib/lang/cn_dns_template.lng new file mode 100644 index 0000000000..f0993a4cde --- /dev/null +++ b/interface/web/dns/lib/lang/cn_dns_template.lng @@ -0,0 +1,7 @@ + diff --git a/interface/web/dns/lib/lang/cn_dns_template_list.lng b/interface/web/dns/lib/lang/cn_dns_template_list.lng new file mode 100644 index 0000000000..e0d37c8dc9 --- /dev/null +++ b/interface/web/dns/lib/lang/cn_dns_template_list.lng @@ -0,0 +1,6 @@ + diff --git a/interface/web/dns/lib/lang/cn_dns_tlsa.lng b/interface/web/dns/lib/lang/cn_dns_tlsa.lng new file mode 100644 index 0000000000..3544350e56 --- /dev/null +++ b/interface/web/dns/lib/lang/cn_dns_tlsa.lng @@ -0,0 +1,16 @@ + diff --git a/interface/web/dns/lib/lang/cn_dns_txt.lng b/interface/web/dns/lib/lang/cn_dns_txt.lng new file mode 100644 index 0000000000..33fda2069c --- /dev/null +++ b/interface/web/dns/lib/lang/cn_dns_txt.lng @@ -0,0 +1,19 @@ + diff --git a/interface/web/dns/lib/lang/cn_dns_wizard.lng b/interface/web/dns/lib/lang/cn_dns_wizard.lng new file mode 100644 index 0000000000..e14da5c7a9 --- /dev/null +++ b/interface/web/dns/lib/lang/cn_dns_wizard.lng @@ -0,0 +1,45 @@ + diff --git a/interface/web/help/lib/lang/cn.lng b/interface/web/help/lib/lang/cn.lng new file mode 100644 index 0000000000..e4de48539a --- /dev/null +++ b/interface/web/help/lib/lang/cn.lng @@ -0,0 +1,15 @@ + diff --git a/interface/web/help/lib/lang/cn_faq_form.lng b/interface/web/help/lib/lang/cn_faq_form.lng new file mode 100644 index 0000000000..8b40ce148b --- /dev/null +++ b/interface/web/help/lib/lang/cn_faq_form.lng @@ -0,0 +1,6 @@ + diff --git a/interface/web/help/lib/lang/cn_faq_manage_questions_list.lng b/interface/web/help/lib/lang/cn_faq_manage_questions_list.lng new file mode 100644 index 0000000000..4250c1d314 --- /dev/null +++ b/interface/web/help/lib/lang/cn_faq_manage_questions_list.lng @@ -0,0 +1,9 @@ + diff --git a/interface/web/help/lib/lang/cn_faq_sections_form.lng b/interface/web/help/lib/lang/cn_faq_sections_form.lng new file mode 100644 index 0000000000..0f79ab5898 --- /dev/null +++ b/interface/web/help/lib/lang/cn_faq_sections_form.lng @@ -0,0 +1,3 @@ + diff --git a/interface/web/help/lib/lang/cn_help_faq_list.lng b/interface/web/help/lib/lang/cn_help_faq_list.lng new file mode 100644 index 0000000000..5d779fddcb --- /dev/null +++ b/interface/web/help/lib/lang/cn_help_faq_list.lng @@ -0,0 +1,3 @@ + diff --git a/interface/web/help/lib/lang/cn_help_faq_sections_list.lng b/interface/web/help/lib/lang/cn_help_faq_sections_list.lng new file mode 100644 index 0000000000..4d9c30efa3 --- /dev/null +++ b/interface/web/help/lib/lang/cn_help_faq_sections_list.lng @@ -0,0 +1,8 @@ + diff --git a/interface/web/help/lib/lang/cn_support_message.lng b/interface/web/help/lib/lang/cn_support_message.lng new file mode 100644 index 0000000000..8385513637 --- /dev/null +++ b/interface/web/help/lib/lang/cn_support_message.lng @@ -0,0 +1,16 @@ + diff --git a/interface/web/help/lib/lang/cn_support_message_list.lng b/interface/web/help/lib/lang/cn_support_message_list.lng new file mode 100644 index 0000000000..36aecdbdac --- /dev/null +++ b/interface/web/help/lib/lang/cn_support_message_list.lng @@ -0,0 +1,7 @@ + diff --git a/interface/web/login/lib/lang/cn.lng b/interface/web/login/lib/lang/cn.lng new file mode 100644 index 0000000000..07e89c2ab5 --- /dev/null +++ b/interface/web/login/lib/lang/cn.lng @@ -0,0 +1,43 @@ +默认主题已自动激活。'; +$wb['stay_logged_in_txt'] = '保持登录状态'; +$wb['lost_password_function_disabled_txt'] = '此用户不可用于找回密码功能。'; +$wb['lost_password_function_wait_txt'] = '您还不能请求新密码。请等待几分钟。'; +$wb['lost_password_function_expired_txt'] = '此激活链接已过期。请请求新的链接。'; +$wb['lost_password_function_denied_txt'] = '此激活链接无效。'; +$wb['otp_code_txt'] = '双因素身份验证'; +$wb['otp_code_desc_txt'] = '输入您从身份验证器应用或通过电子邮件获得的代码。'; +$wb['otp_code_placeholder_txt'] = 'OTP代码'; +$wb['otp_code_email_sent_txt'] = '电子邮件已发送至'; +$wb['otp_code_email_subject_txt'] = 'ISPConfig 登录验证'; +$wb['otp_code_resend_txt'] = '请求新代码'; +$wb['otp_code_email_sent_failed_txt'] = '向 %s 发送电子邮件失败'; +$wb['otp_code_email_sent_wait_txt'] = '请稍等,重新发送代码只能在 %s 秒后才能进行。'; +?> diff --git a/interface/web/login/lib/lang/cn_login_as.lng b/interface/web/login/lib/lang/cn_login_as.lng new file mode 100644 index 0000000000..5b84baa68c --- /dev/null +++ b/interface/web/login/lib/lang/cn_login_as.lng @@ -0,0 +1,15 @@ + diff --git a/interface/web/mail/lib/lang/cn.lng b/interface/web/mail/lib/lang/cn.lng new file mode 100644 index 0000000000..6066c08b9e --- /dev/null +++ b/interface/web/mail/lib/lang/cn.lng @@ -0,0 +1,52 @@ + diff --git a/interface/web/mail/lib/lang/cn_mail_alias.lng b/interface/web/mail/lib/lang/cn_mail_alias.lng new file mode 100644 index 0000000000..76075bb651 --- /dev/null +++ b/interface/web/mail/lib/lang/cn_mail_alias.lng @@ -0,0 +1,16 @@ + diff --git a/interface/web/mail/lib/lang/cn_mail_aliasdomain.lng b/interface/web/mail/lib/lang/cn_mail_aliasdomain.lng new file mode 100644 index 0000000000..0f331158dc --- /dev/null +++ b/interface/web/mail/lib/lang/cn_mail_aliasdomain.lng @@ -0,0 +1,11 @@ + diff --git a/interface/web/mail/lib/lang/cn_mail_aliasdomain_list.lng b/interface/web/mail/lib/lang/cn_mail_aliasdomain_list.lng new file mode 100644 index 0000000000..e237380179 --- /dev/null +++ b/interface/web/mail/lib/lang/cn_mail_aliasdomain_list.lng @@ -0,0 +1,8 @@ + diff --git a/interface/web/mail/lib/lang/cn_mail_backup_list.lng b/interface/web/mail/lib/lang/cn_mail_backup_list.lng new file mode 100644 index 0000000000..41eaefce85 --- /dev/null +++ b/interface/web/mail/lib/lang/cn_mail_backup_list.lng @@ -0,0 +1,16 @@ + diff --git a/interface/web/mail/lib/lang/cn_mail_blacklist.lng b/interface/web/mail/lib/lang/cn_mail_blacklist.lng new file mode 100644 index 0000000000..f257dc38c0 --- /dev/null +++ b/interface/web/mail/lib/lang/cn_mail_blacklist.lng @@ -0,0 +1,12 @@ + diff --git a/interface/web/mail/lib/lang/cn_mail_content_filter.lng b/interface/web/mail/lib/lang/cn_mail_content_filter.lng new file mode 100644 index 0000000000..c319a94317 --- /dev/null +++ b/interface/web/mail/lib/lang/cn_mail_content_filter.lng @@ -0,0 +1,9 @@ + diff --git a/interface/web/mail/lib/lang/cn_mail_content_filter_list.lng b/interface/web/mail/lib/lang/cn_mail_content_filter_list.lng new file mode 100644 index 0000000000..2fa02087ad --- /dev/null +++ b/interface/web/mail/lib/lang/cn_mail_content_filter_list.lng @@ -0,0 +1,8 @@ + diff --git a/interface/web/mail/lib/lang/cn_mail_domain.lng b/interface/web/mail/lib/lang/cn_mail_domain.lng new file mode 100644 index 0000000000..279e9a3bf7 --- /dev/null +++ b/interface/web/mail/lib/lang/cn_mail_domain.lng @@ -0,0 +1,25 @@ + diff --git a/interface/web/mail/lib/lang/cn_mail_domain_catchall.lng b/interface/web/mail/lib/lang/cn_mail_domain_catchall.lng new file mode 100644 index 0000000000..adf71b00b1 --- /dev/null +++ b/interface/web/mail/lib/lang/cn_mail_domain_catchall.lng @@ -0,0 +1,14 @@ + diff --git a/interface/web/mail/lib/lang/cn_mail_domain_list.lng b/interface/web/mail/lib/lang/cn_mail_domain_list.lng new file mode 100644 index 0000000000..4865d56fa1 --- /dev/null +++ b/interface/web/mail/lib/lang/cn_mail_domain_list.lng @@ -0,0 +1,7 @@ + diff --git a/interface/web/mail/lib/lang/cn_mail_forward.lng b/interface/web/mail/lib/lang/cn_mail_forward.lng new file mode 100644 index 0000000000..9e9d8906f2 --- /dev/null +++ b/interface/web/mail/lib/lang/cn_mail_forward.lng @@ -0,0 +1,15 @@ + diff --git a/interface/web/mail/lib/lang/cn_mail_get.lng b/interface/web/mail/lib/lang/cn_mail_get.lng new file mode 100644 index 0000000000..20ad473996 --- /dev/null +++ b/interface/web/mail/lib/lang/cn_mail_get.lng @@ -0,0 +1,19 @@ + diff --git a/interface/web/mail/lib/lang/cn_mail_get_list.lng b/interface/web/mail/lib/lang/cn_mail_get_list.lng new file mode 100644 index 0000000000..529c4c3618 --- /dev/null +++ b/interface/web/mail/lib/lang/cn_mail_get_list.lng @@ -0,0 +1,9 @@ + diff --git a/interface/web/mail/lib/lang/cn_mail_mailinglist.lng b/interface/web/mail/lib/lang/cn_mail_mailinglist.lng new file mode 100644 index 0000000000..cb08db4821 --- /dev/null +++ b/interface/web/mail/lib/lang/cn_mail_mailinglist.lng @@ -0,0 +1,23 @@ + diff --git a/interface/web/mail/lib/lang/cn_mail_mailinglist_list.lng b/interface/web/mail/lib/lang/cn_mail_mailinglist_list.lng new file mode 100644 index 0000000000..d185267944 --- /dev/null +++ b/interface/web/mail/lib/lang/cn_mail_mailinglist_list.lng @@ -0,0 +1,5 @@ + diff --git a/interface/web/mail/lib/lang/cn_mail_relay_domain.lng b/interface/web/mail/lib/lang/cn_mail_relay_domain.lng new file mode 100644 index 0000000000..6c6144e2e3 --- /dev/null +++ b/interface/web/mail/lib/lang/cn_mail_relay_domain.lng @@ -0,0 +1,9 @@ + diff --git a/interface/web/mail/lib/lang/cn_mail_relay_recipient_list.lng b/interface/web/mail/lib/lang/cn_mail_relay_recipient_list.lng new file mode 100644 index 0000000000..bb0e05eddf --- /dev/null +++ b/interface/web/mail/lib/lang/cn_mail_relay_recipient_list.lng @@ -0,0 +1,9 @@ + diff --git a/interface/web/mail/lib/lang/cn_mail_spamfilter.lng b/interface/web/mail/lib/lang/cn_mail_spamfilter.lng new file mode 100644 index 0000000000..207d99b565 --- /dev/null +++ b/interface/web/mail/lib/lang/cn_mail_spamfilter.lng @@ -0,0 +1,17 @@ + diff --git a/interface/web/mail/lib/lang/cn_mail_spamfilter_list.lng b/interface/web/mail/lib/lang/cn_mail_spamfilter_list.lng new file mode 100644 index 0000000000..b53ab02a7d --- /dev/null +++ b/interface/web/mail/lib/lang/cn_mail_spamfilter_list.lng @@ -0,0 +1,8 @@ + diff --git a/interface/web/mail/lib/lang/cn_mail_transport.lng b/interface/web/mail/lib/lang/cn_mail_transport.lng new file mode 100644 index 0000000000..17fa0ac760 --- /dev/null +++ b/interface/web/mail/lib/lang/cn_mail_transport.lng @@ -0,0 +1,11 @@ + diff --git a/interface/web/mail/lib/lang/cn_mail_user.lng b/interface/web/mail/lib/lang/cn_mail_user.lng new file mode 100644 index 0000000000..9461e25228 --- /dev/null +++ b/interface/web/mail/lib/lang/cn_mail_user.lng @@ -0,0 +1,77 @@ + diff --git a/interface/web/mail/lib/lang/cn_mail_user_filter.lng b/interface/web/mail/lib/lang/cn_mail_user_filter.lng new file mode 100644 index 0000000000..c898708dce --- /dev/null +++ b/interface/web/mail/lib/lang/cn_mail_user_filter.lng @@ -0,0 +1,31 @@ + diff --git a/interface/web/mail/lib/lang/cn_mail_user_filter_list.lng b/interface/web/mail/lib/lang/cn_mail_user_filter_list.lng new file mode 100644 index 0000000000..d847c7006d --- /dev/null +++ b/interface/web/mail/lib/lang/cn_mail_user_filter_list.lng @@ -0,0 +1,7 @@ + diff --git a/interface/web/mail/lib/lang/cn_mail_user_list.lng b/interface/web/mail/lib/lang/cn_mail_user_list.lng new file mode 100644 index 0000000000..cc27e6d1f4 --- /dev/null +++ b/interface/web/mail/lib/lang/cn_mail_user_list.lng @@ -0,0 +1,13 @@ + diff --git a/interface/web/mail/lib/lang/cn_mail_user_stats_list.lng b/interface/web/mail/lib/lang/cn_mail_user_stats_list.lng new file mode 100644 index 0000000000..ee06c753cf --- /dev/null +++ b/interface/web/mail/lib/lang/cn_mail_user_stats_list.lng @@ -0,0 +1,8 @@ + diff --git a/interface/web/mail/lib/lang/cn_mail_whitelist.lng b/interface/web/mail/lib/lang/cn_mail_whitelist.lng new file mode 100644 index 0000000000..9b3c847b6f --- /dev/null +++ b/interface/web/mail/lib/lang/cn_mail_whitelist.lng @@ -0,0 +1,12 @@ + diff --git a/interface/web/mail/lib/lang/cn_spamfilter_blacklist.lng b/interface/web/mail/lib/lang/cn_spamfilter_blacklist.lng new file mode 100644 index 0000000000..0f4aba4762 --- /dev/null +++ b/interface/web/mail/lib/lang/cn_spamfilter_blacklist.lng @@ -0,0 +1,12 @@ + diff --git a/interface/web/mail/lib/lang/cn_spamfilter_blacklist_list.lng b/interface/web/mail/lib/lang/cn_spamfilter_blacklist_list.lng new file mode 100644 index 0000000000..4210f64125 --- /dev/null +++ b/interface/web/mail/lib/lang/cn_spamfilter_blacklist_list.lng @@ -0,0 +1,9 @@ + diff --git a/interface/web/mail/lib/lang/cn_spamfilter_config.lng b/interface/web/mail/lib/lang/cn_spamfilter_config.lng new file mode 100644 index 0000000000..a0eab985a4 --- /dev/null +++ b/interface/web/mail/lib/lang/cn_spamfilter_config.lng @@ -0,0 +1,20 @@ + diff --git a/interface/web/mail/lib/lang/cn_spamfilter_config_list.lng b/interface/web/mail/lib/lang/cn_spamfilter_config_list.lng new file mode 100644 index 0000000000..70e49e22b8 --- /dev/null +++ b/interface/web/mail/lib/lang/cn_spamfilter_config_list.lng @@ -0,0 +1,5 @@ + diff --git a/interface/web/mail/lib/lang/cn_spamfilter_policy.lng b/interface/web/mail/lib/lang/cn_spamfilter_policy.lng new file mode 100644 index 0000000000..27ddf9b060 --- /dev/null +++ b/interface/web/mail/lib/lang/cn_spamfilter_policy.lng @@ -0,0 +1,51 @@ + diff --git a/interface/web/mail/lib/lang/cn_spamfilter_users.lng b/interface/web/mail/lib/lang/cn_spamfilter_users.lng new file mode 100644 index 0000000000..c2e285cffe --- /dev/null +++ b/interface/web/mail/lib/lang/cn_spamfilter_users.lng @@ -0,0 +1,13 @@ + diff --git a/interface/web/mail/lib/lang/cn_spamfilter_whitelist.lng b/interface/web/mail/lib/lang/cn_spamfilter_whitelist.lng new file mode 100644 index 0000000000..0f4aba4762 --- /dev/null +++ b/interface/web/mail/lib/lang/cn_spamfilter_whitelist.lng @@ -0,0 +1,12 @@ + diff --git a/interface/web/mail/lib/lang/cn_spamfilter_whitelist_list.lng b/interface/web/mail/lib/lang/cn_spamfilter_whitelist_list.lng new file mode 100644 index 0000000000..1f4af55127 --- /dev/null +++ b/interface/web/mail/lib/lang/cn_spamfilter_whitelist_list.lng @@ -0,0 +1,9 @@ + diff --git a/interface/web/mail/lib/lang/cn_user_quota_stats_list.lng b/interface/web/mail/lib/lang/cn_user_quota_stats_list.lng new file mode 100644 index 0000000000..91f58605ae --- /dev/null +++ b/interface/web/mail/lib/lang/cn_user_quota_stats_list.lng @@ -0,0 +1,8 @@ + diff --git a/interface/web/mail/lib/lang/cn_xmpp_domain.lng b/interface/web/mail/lib/lang/cn_xmpp_domain.lng new file mode 100644 index 0000000000..b094c92862 --- /dev/null +++ b/interface/web/mail/lib/lang/cn_xmpp_domain.lng @@ -0,0 +1,62 @@ + diff --git a/interface/web/mail/lib/lang/cn_xmpp_domain_admin_list.lng b/interface/web/mail/lib/lang/cn_xmpp_domain_admin_list.lng new file mode 100644 index 0000000000..ed06bd1387 --- /dev/null +++ b/interface/web/mail/lib/lang/cn_xmpp_domain_admin_list.lng @@ -0,0 +1,8 @@ + diff --git a/interface/web/mail/lib/lang/cn_xmpp_domain_list.lng b/interface/web/mail/lib/lang/cn_xmpp_domain_list.lng new file mode 100644 index 0000000000..ba5e21824c --- /dev/null +++ b/interface/web/mail/lib/lang/cn_xmpp_domain_list.lng @@ -0,0 +1,7 @@ + diff --git a/interface/web/mail/lib/lang/cn_xmpp_user.lng b/interface/web/mail/lib/lang/cn_xmpp_user.lng new file mode 100644 index 0000000000..5b88ff175f --- /dev/null +++ b/interface/web/mail/lib/lang/cn_xmpp_user.lng @@ -0,0 +1,15 @@ + diff --git a/interface/web/mail/lib/lang/cn_xmpp_user_list.lng b/interface/web/mail/lib/lang/cn_xmpp_user_list.lng new file mode 100644 index 0000000000..60de5e2579 --- /dev/null +++ b/interface/web/mail/lib/lang/cn_xmpp_user_list.lng @@ -0,0 +1,8 @@ + diff --git a/interface/web/mailuser/lib/lang/cn.lng b/interface/web/mailuser/lib/lang/cn.lng new file mode 100644 index 0000000000..71df9e621b --- /dev/null +++ b/interface/web/mailuser/lib/lang/cn.lng @@ -0,0 +1,9 @@ + diff --git a/interface/web/mailuser/lib/lang/cn_index.lng b/interface/web/mailuser/lib/lang/cn_index.lng new file mode 100644 index 0000000000..1bfe800b81 --- /dev/null +++ b/interface/web/mailuser/lib/lang/cn_index.lng @@ -0,0 +1,12 @@ + diff --git a/interface/web/mailuser/lib/lang/cn_mail_user_autoresponder.lng b/interface/web/mailuser/lib/lang/cn_mail_user_autoresponder.lng new file mode 100644 index 0000000000..93481f658f --- /dev/null +++ b/interface/web/mailuser/lib/lang/cn_mail_user_autoresponder.lng @@ -0,0 +1,13 @@ + diff --git a/interface/web/mailuser/lib/lang/cn_mail_user_cc.lng b/interface/web/mailuser/lib/lang/cn_mail_user_cc.lng new file mode 100644 index 0000000000..05b24f8674 --- /dev/null +++ b/interface/web/mailuser/lib/lang/cn_mail_user_cc.lng @@ -0,0 +1,11 @@ + diff --git a/interface/web/mailuser/lib/lang/cn_mail_user_filter.lng b/interface/web/mailuser/lib/lang/cn_mail_user_filter.lng new file mode 100644 index 0000000000..83d1d7a3d5 --- /dev/null +++ b/interface/web/mailuser/lib/lang/cn_mail_user_filter.lng @@ -0,0 +1,26 @@ + diff --git a/interface/web/mailuser/lib/lang/cn_mail_user_filter_list.lng b/interface/web/mailuser/lib/lang/cn_mail_user_filter_list.lng new file mode 100644 index 0000000000..097ed94f1c --- /dev/null +++ b/interface/web/mailuser/lib/lang/cn_mail_user_filter_list.lng @@ -0,0 +1,8 @@ + diff --git a/interface/web/mailuser/lib/lang/cn_mail_user_password.lng b/interface/web/mailuser/lib/lang/cn_mail_user_password.lng new file mode 100644 index 0000000000..f1d7a78c1d --- /dev/null +++ b/interface/web/mailuser/lib/lang/cn_mail_user_password.lng @@ -0,0 +1,11 @@ + diff --git a/interface/web/mailuser/lib/lang/cn_mail_user_spamfilter.lng b/interface/web/mailuser/lib/lang/cn_mail_user_spamfilter.lng new file mode 100644 index 0000000000..0fb4c8d83b --- /dev/null +++ b/interface/web/mailuser/lib/lang/cn_mail_user_spamfilter.lng @@ -0,0 +1,7 @@ + diff --git a/interface/web/monitor/lib/lang/cn.lng b/interface/web/monitor/lib/lang/cn.lng new file mode 100644 index 0000000000..4300e454ec --- /dev/null +++ b/interface/web/monitor/lib/lang/cn.lng @@ -0,0 +1,168 @@ +在您的服务器上我们找不到任何一个。

这意味着我们现在无法支持您的RAID。'; +$wb['monitor_norkhunter_txt'] = 'RKHunter未安装,因此没有日志数据'; +$wb['monitor_serverstate_server_txt'] = '服务器'; +$wb['monitor_serverstate_kernel_txt'] = '内核'; +$wb['monitor_serverstate_state_txt'] = '状态'; +$wb['monitor_serverstate_unknown_txt'] = '未知'; +$wb['monitor_serverstate_info_txt'] = '信息'; +$wb['monitor_serverstate_warning_txt'] = '警告'; +$wb['monitor_serverstate_critical_txt'] = '严重'; +$wb['monitor_serverstate_error_txt'] = '错误'; +$wb['monitor_serverstate_moreinfo_txt'] = '更多信息...'; +$wb['monitor_serverstate_more_txt'] = '更多...'; +$wb['monitor_serverstate_fclamok_txt'] = '您的病毒防护正常'; +$wb['monitor_serverstate_fclamoutdated_txt'] = '您的病毒防护已过时!'; +$wb['monitor_serverstate_fclamunknown_txt'] = 'Freshclam:???'; +$wb['monitor_serverstate_hdok_txt'] = '您的硬盘空间状态正常'; +$wb['monitor_serverstate_hdgoingfull_txt'] = '您的硬盘空间即将满'; +$wb['monitor_serverstate_hdnearlyfull_txt'] = '您的硬盘空间接近满'; +$wb['monitor_serverstate_hdveryfull_txt'] = '您的硬盘空间已经非常满'; +$wb['monitor_serverstate_hdfull_txt'] = '您的硬盘已没有可用空间'; +$wb['monitor_serverstate_hdunknown_txt'] = '硬盘:???'; +$wb['monitor_serverstate_listok_txt'] = '正常'; +$wb['monitor_serverstate_listinfo_txt'] = '信息'; +$wb['monitor_serverstate_listwarning_txt'] = '警告'; +$wb['monitor_serverstate_listcritical_txt'] = '严重'; +$wb['monitor_serverstate_listerror_txt'] = '错误'; +$wb['monitor_serverstate_listunknown_txt'] = '未知'; +$wb['monitor_serverstate_loadok_txt'] = '您的服务器负载正常'; +$wb['monitor_serverstate_loadheavy_txt'] = '您的服务器负载较重'; +$wb['monitor_serverstate_loadhigh_txt'] = '您的服务器负载高'; +$wb['monitor_serverstate_loaghigher_txt'] = '您的服务器负载更高'; +$wb['monitor_serverstate_loadhighest_txt'] = '您的服务器负载最高'; +$wb['monitor_serverstate_loadunknown_txt'] = '服务器负载:???'; +$wb['monitor_serverstate_mailqok_txt'] = '您的邮件队列负载正常'; +$wb['monitor_serverstate_mailqheavy_txt'] = '您的邮件队列负载较重'; +$wb['monitor_serverstate_mailqhigh_txt'] = '您的邮件队列负载高'; +$wb['monitor_serverstate_mailqhigher_txt'] = '您的邮件队列负载更高'; +$wb['monitor_serverstate_mailqhighest_txt'] = '您的邮件队列负载最高'; +$wb['monitor_serverstate_mailqunknown_txt'] = '邮件队列:???'; +$wb['monitor_serverstate_raidok_txt'] = '您的 RAID 正常'; +$wb['monitor_serverstate_raidresync_txt'] = '您的 RAID 正在重新同步'; +$wb['monitor_serverstate_raidfault_txt'] = '您的 RAID 有一个故障磁盘,请尽快更换!'; +$wb['monitor_serverstate_raiderror_txt'] = '您的 RAID 已经无法工作'; +$wb['monitor_serverstate_raidunknown_txt'] = 'RAID 状态: ???'; +$wb['monitor_serverstate_servicesonline_txt'] = '所有需要的服务都已上线'; +$wb['monitor_serverstate_servicesoffline_txt'] = '一个或多个需要的服务已下线'; +$wb['monitor_serverstate_servicesunknown_txt'] = '服务: ???'; +$wb['monitor_serverstate_syslogok_txt'] = '系统日志状态良好'; +$wb['monitor_serverstate_syslogwarning_txt'] = '您的系统日志中有一些警告'; +$wb['monitor_serverstate_syslogerror_txt'] = '您的系统日志中有错误'; +$wb['monitor_serverstate_syslogunknown_txt'] = '系统日志: ???'; +$wb['monitor_serverstate_updatesok_txt'] = '您的系统已是最新的'; +$wb['monitor_serverstate_updatesneeded_txt'] = '有一个或多个组件需要更新'; +$wb['monitor_serverstate_updatesunknown_txt'] = '系统更新: ???'; +$wb['monitor_serverstate_beancounterok_txt'] = 'beancounter 状态良好'; +$wb['monitor_serverstate_beancounterinfo_txt'] = 'beancounter 中有一些故障'; +$wb['monitor_serverstate_beancounterwarning_txt'] = 'beancounter 中有一些故障'; +$wb['monitor_serverstate_beancountercritical_txt'] = 'beancounter 中有很多故障'; +$wb['monitor_serverstate_beancountererror_txt'] = 'beancounter 中有太多故障'; +$wb['monitor_services_online_txt'] = '上线'; +$wb['monitor_services_offline_txt'] = '下线'; +$wb['monitor_services_web_txt'] = 'Web 服务器:'; +$wb['monitor_services_ftp_txt'] = 'FTP 服务器:'; +$wb['monitor_services_smtp_txt'] = 'SMTP 服务器:'; +$wb['monitor_services_pop_txt'] = 'POP3 服务器:'; +$wb['monitor_services_imap_txt'] = 'IMAP 服务器:'; +$wb['monitor_services_mydns_txt'] = 'DNS-服务器:'; +$wb['monitor_services_mongodb_txt'] = 'MongoDB 服务器:'; +$wb['monitor_services_mysql_txt'] = 'MySQL 服务器:'; +$wb['monitor_settings_datafromdate_txt'] = '数据来自: '; +$wb['monitor_settings_datetimeformat_txt'] = 'Y-m-d H:i'; +$wb['monitor_settings_refreshsq_txt'] = '刷新顺序:'; +$wb['monitor_settings_server_txt'] = '服务器'; +$wb['monitor_title_cpuinfo_txt'] = 'CPU 信息'; +$wb['monitor_title_updatestate_txt'] = '更新状态'; +$wb['monitor_title_mailq_txt'] = '邮件队列'; +$wb['monitor_title_raidstate_txt'] = 'RAID 状态'; +$wb['monitor_title_rkhunterlog_txt'] = 'RKHunter 日志'; +$wb['monitor_title_fail2ban_txt'] = 'Fail2Ban 日志'; +$wb['monitor_title_mongodb_txt'] = 'MongoDB 日志'; +$wb['monitor_title_iptables_txt'] = 'IPTables 规则'; +$wb['monitor_title_beancounter_txt'] = 'OpenVz VE BeanCounter'; +$wb['monitor_updates_nosupport_txt'] = '不支持此监控的 Linux 发行版'; +$wb['monitor_beancounter_nosupport_txt'] = '此服务器不是 OpenVz VE,没有 BeanCounter 信息'; +$wb['Monit'] = '监控'; +$wb['no_monit_url_defined_txt'] = '未定义 监控 URL。'; +$wb['no_permissions_to_view_monit_txt'] = '您没有访问 监控 的权限。'; +$wb['Munin'] = 'Munin'; +$wb['no_munin_url_defined_txt'] = '未定义 监控 URL。'; +$wb['no_permissions_to_view_munin_txt'] = '您没有访问 监控 的权限。'; +$wb['Database size'] = '数据库大小'; +$wb['MySQL Database size'] = 'MySQL 数据库大小'; +?> diff --git a/interface/web/monitor/lib/lang/cn_datalog_list.lng b/interface/web/monitor/lib/lang/cn_datalog_list.lng new file mode 100644 index 0000000000..3e2c3a8a7a --- /dev/null +++ b/interface/web/monitor/lib/lang/cn_datalog_list.lng @@ -0,0 +1,8 @@ + diff --git a/interface/web/monitor/lib/lang/cn_dataloghistory_list.lng b/interface/web/monitor/lib/lang/cn_dataloghistory_list.lng new file mode 100644 index 0000000000..3ca9c90a5a --- /dev/null +++ b/interface/web/monitor/lib/lang/cn_dataloghistory_list.lng @@ -0,0 +1,9 @@ + diff --git a/interface/web/monitor/lib/lang/cn_dataloghistory_undo.lng b/interface/web/monitor/lib/lang/cn_dataloghistory_undo.lng new file mode 100644 index 0000000000..6004ed62e7 --- /dev/null +++ b/interface/web/monitor/lib/lang/cn_dataloghistory_undo.lng @@ -0,0 +1,7 @@ + diff --git a/interface/web/monitor/lib/lang/cn_dataloghistory_view.lng b/interface/web/monitor/lib/lang/cn_dataloghistory_view.lng new file mode 100644 index 0000000000..e640c2bd02 --- /dev/null +++ b/interface/web/monitor/lib/lang/cn_dataloghistory_view.lng @@ -0,0 +1,27 @@ + diff --git a/interface/web/monitor/lib/lang/cn_syslog_list.lng b/interface/web/monitor/lib/lang/cn_syslog_list.lng new file mode 100644 index 0000000000..1341cce7f8 --- /dev/null +++ b/interface/web/monitor/lib/lang/cn_syslog_list.lng @@ -0,0 +1,10 @@ + diff --git a/interface/web/sites/lib/lang/cn.lng b/interface/web/sites/lib/lang/cn.lng new file mode 100644 index 0000000000..adcbb3902a --- /dev/null +++ b/interface/web/sites/lib/lang/cn.lng @@ -0,0 +1,35 @@ + diff --git a/interface/web/sites/lib/lang/cn_aps.lng b/interface/web/sites/lib/lang/cn_aps.lng new file mode 100644 index 0000000000..ee1546f15e --- /dev/null +++ b/interface/web/sites/lib/lang/cn_aps.lng @@ -0,0 +1,63 @@ + diff --git a/interface/web/sites/lib/lang/cn_aps_instances_list.lng b/interface/web/sites/lib/lang/cn_aps_instances_list.lng new file mode 100644 index 0000000000..4b9f22d385 --- /dev/null +++ b/interface/web/sites/lib/lang/cn_aps_instances_list.lng @@ -0,0 +1,11 @@ + diff --git a/interface/web/sites/lib/lang/cn_aps_packages_list.lng b/interface/web/sites/lib/lang/cn_aps_packages_list.lng new file mode 100644 index 0000000000..780fc73a42 --- /dev/null +++ b/interface/web/sites/lib/lang/cn_aps_packages_list.lng @@ -0,0 +1,8 @@ + diff --git a/interface/web/sites/lib/lang/cn_aps_update_packagelist.lng b/interface/web/sites/lib/lang/cn_aps_update_packagelist.lng new file mode 100644 index 0000000000..2f9088a3e0 --- /dev/null +++ b/interface/web/sites/lib/lang/cn_aps_update_packagelist.lng @@ -0,0 +1,7 @@ + diff --git a/interface/web/sites/lib/lang/cn_backup_stats_list.lng b/interface/web/sites/lib/lang/cn_backup_stats_list.lng new file mode 100644 index 0000000000..55d7acb26a --- /dev/null +++ b/interface/web/sites/lib/lang/cn_backup_stats_list.lng @@ -0,0 +1,10 @@ + diff --git a/interface/web/sites/lib/lang/cn_cron.lng b/interface/web/sites/lib/lang/cn_cron.lng new file mode 100644 index 0000000000..5b517d762e --- /dev/null +++ b/interface/web/sites/lib/lang/cn_cron.lng @@ -0,0 +1,26 @@ + diff --git a/interface/web/sites/lib/lang/cn_cron_list.lng b/interface/web/sites/lib/lang/cn_cron_list.lng new file mode 100644 index 0000000000..ace97e23a9 --- /dev/null +++ b/interface/web/sites/lib/lang/cn_cron_list.lng @@ -0,0 +1,13 @@ + diff --git a/interface/web/sites/lib/lang/cn_database.lng b/interface/web/sites/lib/lang/cn_database.lng new file mode 100644 index 0000000000..d1c9180fbb --- /dev/null +++ b/interface/web/sites/lib/lang/cn_database.lng @@ -0,0 +1,50 @@ + diff --git a/interface/web/sites/lib/lang/cn_database_admin_list.lng b/interface/web/sites/lib/lang/cn_database_admin_list.lng new file mode 100644 index 0000000000..fc1226c388 --- /dev/null +++ b/interface/web/sites/lib/lang/cn_database_admin_list.lng @@ -0,0 +1,12 @@ + diff --git a/interface/web/sites/lib/lang/cn_database_list.lng b/interface/web/sites/lib/lang/cn_database_list.lng new file mode 100644 index 0000000000..99395324bf --- /dev/null +++ b/interface/web/sites/lib/lang/cn_database_list.lng @@ -0,0 +1,11 @@ + diff --git a/interface/web/sites/lib/lang/cn_database_quota_stats_list.lng b/interface/web/sites/lib/lang/cn_database_quota_stats_list.lng new file mode 100644 index 0000000000..0292e7e9ec --- /dev/null +++ b/interface/web/sites/lib/lang/cn_database_quota_stats_list.lng @@ -0,0 +1,9 @@ + diff --git a/interface/web/sites/lib/lang/cn_database_user.lng b/interface/web/sites/lib/lang/cn_database_user.lng new file mode 100644 index 0000000000..2d46e78c92 --- /dev/null +++ b/interface/web/sites/lib/lang/cn_database_user.lng @@ -0,0 +1,25 @@ + diff --git a/interface/web/sites/lib/lang/cn_database_user_admin_list.lng b/interface/web/sites/lib/lang/cn_database_user_admin_list.lng new file mode 100644 index 0000000000..1e93752ba1 --- /dev/null +++ b/interface/web/sites/lib/lang/cn_database_user_admin_list.lng @@ -0,0 +1,6 @@ + diff --git a/interface/web/sites/lib/lang/cn_database_user_list.lng b/interface/web/sites/lib/lang/cn_database_user_list.lng new file mode 100644 index 0000000000..fb124188ba --- /dev/null +++ b/interface/web/sites/lib/lang/cn_database_user_list.lng @@ -0,0 +1,5 @@ + diff --git a/interface/web/sites/lib/lang/cn_ftp_sites_stats_list.lng b/interface/web/sites/lib/lang/cn_ftp_sites_stats_list.lng new file mode 100644 index 0000000000..c14c699a3e --- /dev/null +++ b/interface/web/sites/lib/lang/cn_ftp_sites_stats_list.lng @@ -0,0 +1,10 @@ + diff --git a/interface/web/sites/lib/lang/cn_ftp_user.lng b/interface/web/sites/lib/lang/cn_ftp_user.lng new file mode 100644 index 0000000000..39ab56ee5e --- /dev/null +++ b/interface/web/sites/lib/lang/cn_ftp_user.lng @@ -0,0 +1,36 @@ + diff --git a/interface/web/sites/lib/lang/cn_ftp_user_list.lng b/interface/web/sites/lib/lang/cn_ftp_user_list.lng new file mode 100644 index 0000000000..72c33af81f --- /dev/null +++ b/interface/web/sites/lib/lang/cn_ftp_user_list.lng @@ -0,0 +1,8 @@ + diff --git a/interface/web/sites/lib/lang/cn_shell_user.lng b/interface/web/sites/lib/lang/cn_shell_user.lng new file mode 100644 index 0000000000..058368312a --- /dev/null +++ b/interface/web/sites/lib/lang/cn_shell_user.lng @@ -0,0 +1,36 @@ + diff --git a/interface/web/sites/lib/lang/cn_shell_user_list.lng b/interface/web/sites/lib/lang/cn_shell_user_list.lng new file mode 100644 index 0000000000..5cc52d736f --- /dev/null +++ b/interface/web/sites/lib/lang/cn_shell_user_list.lng @@ -0,0 +1,8 @@ + diff --git a/interface/web/sites/lib/lang/cn_user_quota_stats_list.lng b/interface/web/sites/lib/lang/cn_user_quota_stats_list.lng new file mode 100644 index 0000000000..39b7e48b89 --- /dev/null +++ b/interface/web/sites/lib/lang/cn_user_quota_stats_list.lng @@ -0,0 +1,10 @@ + diff --git a/interface/web/sites/lib/lang/cn_web_aliasdomain.lng b/interface/web/sites/lib/lang/cn_web_aliasdomain.lng new file mode 100644 index 0000000000..2b0e5a98a8 --- /dev/null +++ b/interface/web/sites/lib/lang/cn_web_aliasdomain.lng @@ -0,0 +1,118 @@ +=0 的整数值。'; +$wb['pm_ondemand_hint_txt'] = '请注意,您必须具有 PHP 版本 >= 5.3.9 才能使用按需进程管理器。如果您为旧版本的 PHP 选择了按需进程管理器,则 PHP 将不再启动!'; +$wb['generate_password_txt'] = '生成密码'; +$wb['repeat_password_txt'] = '重复密码'; +$wb['password_mismatch_txt'] = 'The passwords do not match.'; +$wb['password_match_txt'] = 'The passwords do match.'; +$wb['available_php_directive_snippets_txt'] = 'Available PHP Directive Snippets:'; +$wb['available_apache_directive_snippets_txt'] = 'Available Apache Directive Snippets:'; +$wb['available_nginx_directive_snippets_txt'] = 'Available nginx Directive Snippets:'; +$wb['proxy_directives_txt'] = 'Proxy Directives'; +$wb['available_proxy_directive_snippets_txt'] = 'Available Proxy Directive Snippets:'; +$wb['Domain'] = 'Aliasdomain'; +?> diff --git a/interface/web/sites/lib/lang/cn_web_aliasdomain_list.lng b/interface/web/sites/lib/lang/cn_web_aliasdomain_list.lng new file mode 100644 index 0000000000..584cc9f3de --- /dev/null +++ b/interface/web/sites/lib/lang/cn_web_aliasdomain_list.lng @@ -0,0 +1,14 @@ + diff --git a/interface/web/sites/lib/lang/cn_web_backup_list.lng b/interface/web/sites/lib/lang/cn_web_backup_list.lng new file mode 100644 index 0000000000..d68977a768 --- /dev/null +++ b/interface/web/sites/lib/lang/cn_web_backup_list.lng @@ -0,0 +1,54 @@ + diff --git a/interface/web/sites/lib/lang/cn_web_childdomain.lng b/interface/web/sites/lib/lang/cn_web_childdomain.lng new file mode 100644 index 0000000000..c85522db8e --- /dev/null +++ b/interface/web/sites/lib/lang/cn_web_childdomain.lng @@ -0,0 +1,124 @@ +=0 的整数值。'; +$wb['pm_ondemand_hint_txt'] = '请注意,您必须具有 PHP 版本 >= 5.3.9 才能使用按需进程管理器。如果您为旧版本的 PHP 选择了按需进程管理器,则 PHP 将不再启动!'; +$wb['generate_password_txt'] = '生成密码'; +$wb['repeat_password_txt'] = '重复密码'; +$wb['password_mismatch_txt'] = '密码不匹配。'; +$wb['password_match_txt'] = '密码匹配。'; +$wb['available_php_directive_snippets_txt'] = '可用的 PHP 指令片段:'; +$wb['available_apache_directive_snippets_txt'] = '可用的 Apache 指令片段:'; +$wb['available_nginx_directive_snippets_txt'] = '可用的 Nginx 指令片段:'; +$wb['Domain'] = '别名域名'; +$wb['ssl_letsencrypt_exclude_txt'] = '不添加到 Let\'s Encrypt 证书'; +?> diff --git a/interface/web/sites/lib/lang/cn_web_childdomain_list.lng b/interface/web/sites/lib/lang/cn_web_childdomain_list.lng new file mode 100644 index 0000000000..f47e407b86 --- /dev/null +++ b/interface/web/sites/lib/lang/cn_web_childdomain_list.lng @@ -0,0 +1,18 @@ + diff --git a/interface/web/sites/lib/lang/cn_web_directive_snippets.lng b/interface/web/sites/lib/lang/cn_web_directive_snippets.lng new file mode 100644 index 0000000000..e472230d5b --- /dev/null +++ b/interface/web/sites/lib/lang/cn_web_directive_snippets.lng @@ -0,0 +1,3 @@ + diff --git a/interface/web/sites/lib/lang/cn_web_domain.lng b/interface/web/sites/lib/lang/cn_web_domain.lng new file mode 100644 index 0000000000..b7619426a9 --- /dev/null +++ b/interface/web/sites/lib/lang/cn_web_domain.lng @@ -0,0 +1,141 @@ += 5.3.9 的PHP才能使用ondemand进程管理器。如果您为旧版本的PHP选择ondemand,PHP将不再启动!'; +$wb['generate_password_txt'] = '生成密码'; +$wb['repeat_password_txt'] = '重复密码'; +$wb['password_mismatch_txt'] = '两次输入的密码不一致。'; +$wb['password_match_txt'] = '两次输入的密码一致。'; +$wb['available_php_directive_snippets_txt'] = '可用的 PHP 指令片段:'; +$wb['available_apache_directive_snippets_txt'] = '可用的 Apache 指令片段:'; +$wb['available_nginx_directive_snippets_txt'] = '可用的 nginx 指令片段:'; +$wb['proxy_directives_txt'] = '代理指令'; +$wb['available_proxy_directive_snippets_txt'] = '可用的代理指令片段:'; +$wb['no_server_error'] = '未选择服务器。'; +$wb['no_backup_txt'] = '无备份'; +$wb['daily_backup_txt'] = '每日'; +$wb['weekly_backup_txt'] = '每周'; +$wb['monthly_backup_txt'] = '每月'; +$wb['rewrite_rules_txt'] = '重写规则'; +$wb['invalid_rewrite_rules_txt'] = '无效的重写规则'; +$wb['allowed_rewrite_rule_directives_txt'] = '允许的指令:'; +$wb['configuration_error_txt'] = '配置错误'; +$wb['variables_txt'] = '变量'; +$wb['added_by_txt'] = '添加者'; +$wb['added_date_txt'] = '添加日期'; +$wb['backup_excludes_txt'] = '排除的目录'; +$wb['backup_excludes_note_txt'] = '(用逗号分隔多个目录。例如:web/cache/*,web/backup)'; +$wb['backup_excludes_error_regex'] = '排除的目录包含无效字符。'; +$wb['invalid_custom_php_ini_settings_txt'] = '无效的 php.ini 配置'; +$wb['invalid_system_user_or_group_txt'] = '无效的系统用户或组'; +$wb['apache_directive_blocked_error'] = '安全设置阻止了 Apache 指令:'; +$wb['http_port_txt'] = 'HTTP 端口'; +$wb['https_port_txt'] = 'HTTPS 端口'; +$wb['http_port_error_regex'] = 'HTTP 端口无效。'; +$wb['https_port_error_regex'] = 'HTTPS 端口无效。'; +$wb['nginx_directive_blocked_error'] = '安全设置阻止了 nginx 指令:'; +?> diff --git a/interface/web/sites/lib/lang/cn_web_domain_admin_list.lng b/interface/web/sites/lib/lang/cn_web_domain_admin_list.lng new file mode 100644 index 0000000000..279f528974 --- /dev/null +++ b/interface/web/sites/lib/lang/cn_web_domain_admin_list.lng @@ -0,0 +1,9 @@ + diff --git a/interface/web/sites/lib/lang/cn_web_domain_list.lng b/interface/web/sites/lib/lang/cn_web_domain_list.lng new file mode 100644 index 0000000000..c408d0df90 --- /dev/null +++ b/interface/web/sites/lib/lang/cn_web_domain_list.lng @@ -0,0 +1,8 @@ + diff --git a/interface/web/sites/lib/lang/cn_web_folder.lng b/interface/web/sites/lib/lang/cn_web_folder.lng new file mode 100644 index 0000000000..c6747937a2 --- /dev/null +++ b/interface/web/sites/lib/lang/cn_web_folder.lng @@ -0,0 +1,8 @@ + diff --git a/interface/web/sites/lib/lang/cn_web_folder_list.lng b/interface/web/sites/lib/lang/cn_web_folder_list.lng new file mode 100644 index 0000000000..91bbb859a1 --- /dev/null +++ b/interface/web/sites/lib/lang/cn_web_folder_list.lng @@ -0,0 +1,8 @@ + diff --git a/interface/web/sites/lib/lang/cn_web_folder_user.lng b/interface/web/sites/lib/lang/cn_web_folder_user.lng new file mode 100644 index 0000000000..5c966ca37b --- /dev/null +++ b/interface/web/sites/lib/lang/cn_web_folder_user.lng @@ -0,0 +1,14 @@ + diff --git a/interface/web/sites/lib/lang/cn_web_folder_user_list.lng b/interface/web/sites/lib/lang/cn_web_folder_user_list.lng new file mode 100644 index 0000000000..467a90df83 --- /dev/null +++ b/interface/web/sites/lib/lang/cn_web_folder_user_list.lng @@ -0,0 +1,7 @@ + diff --git a/interface/web/sites/lib/lang/cn_web_sites_stats_list.lng b/interface/web/sites/lib/lang/cn_web_sites_stats_list.lng new file mode 100644 index 0000000000..42f10bb0db --- /dev/null +++ b/interface/web/sites/lib/lang/cn_web_sites_stats_list.lng @@ -0,0 +1,10 @@ + diff --git a/interface/web/sites/lib/lang/cn_web_subdomain_list.lng b/interface/web/sites/lib/lang/cn_web_subdomain_list.lng new file mode 100644 index 0000000000..0eb6664632 --- /dev/null +++ b/interface/web/sites/lib/lang/cn_web_subdomain_list.lng @@ -0,0 +1,8 @@ + diff --git a/interface/web/sites/lib/lang/cn_web_vhost_domain.lng b/interface/web/sites/lib/lang/cn_web_vhost_domain.lng new file mode 100644 index 0000000000..2e5f18e80e --- /dev/null +++ b/interface/web/sites/lib/lang/cn_web_vhost_domain.lng @@ -0,0 +1,209 @@ +=0 的整数值。'; +$wb['pm_ondemand_hint_txt'] = '请注意,您必须具有 PHP 版本 >= 5.3.9 才能使用按需进程管理器。如果您为旧版本的 PHP 选择了按需进程管理器,则 PHP 将不再启动!'; +$wb['generate_password_txt'] = '生成密码'; +$wb['repeat_password_txt'] = '重复密码'; +$wb['password_mismatch_txt'] = '密码不匹配。'; +$wb['password_match_txt'] = '密码匹配。'; +$wb['available_php_directive_snippets_txt'] = '可用的PHP指令片段:'; +$wb['available_apache_directive_snippets_txt'] = '可用的Apache指令片段:'; +$wb['available_nginx_directive_snippets_txt'] = '可用的nginx指令片段:'; +$wb['proxy_directives_txt'] = '代理指令'; +$wb['available_proxy_directive_snippets_txt'] = '可用的代理指令片段:'; +$wb['no_server_error'] = '未选择服务器。'; +$wb['no_backup_txt'] = '无备份'; +$wb['daily_backup_txt'] = '每日'; +$wb['weekly_backup_txt'] = '每周'; +$wb['monthly_backup_txt'] = '每月'; +$wb['rewrite_rules_txt'] = '重写规则'; +$wb['invalid_rewrite_rules_txt'] = '无效的重写规则'; +$wb['allowed_rewrite_rule_directives_txt'] = '允许的指令:'; +$wb['configuration_error_txt'] = '配置错误'; +$wb['server_chosen_not_ok'] = '所选服务器不允许该帐户。'; +$wb['variables_txt'] = '变量'; +$wb['added_by_txt'] = '添加者'; +$wb['added_date_txt'] = '添加日期'; +$wb['backup_excludes_txt'] = '排除的目录'; +$wb['backup_excludes_note_txt'] = '(用逗号分隔多个目录。示例:web/cache/*,web/backup)'; +$wb['backup_excludes_error_regex'] = '排除的目录包含无效字符。'; +$wb['web_folder_txt'] = '网站目录'; +$wb['web_folder_invalid_txt'] = '网站目录无效,请选择其他目录。'; +$wb['web_folder_unique_txt'] = '网站目录已被使用,请选择其他目录。'; +$wb['host_txt'] = '主机名'; +$wb['domain_error_wildcard'] = '不允许使用通配符子域名。'; +$wb['variables_txt'] = '变量'; +$wb['backup_excludes_txt'] = '排除的目录'; +$wb['backup_excludes_note_txt'] = '(用逗号分隔多个目录。示例:web/cache/*,web/backup)'; +$wb['backup_excludes_error_regex'] = '排除的目录包含无效字符。'; +$wb['subdomain_error_empty'] = '子域名字段为空或包含无效字符。'; +$wb['btn_save_txt'] = '保存'; +$wb['btn_cancel_txt'] = '取消'; +$wb['load_client_data_txt'] = '加载客户详细信息'; +$wb['load_my_data_txt'] = '加载我的联系方式'; +$wb['reset_client_data_txt'] = '重置数据'; +$wb['document_root_txt'] = '文档根目录'; +$wb['ssl_letsencrypt_txt'] = 'Let\'s Encrypt SSL'; +$wb['rewrite_to_https_txt'] = '将HTTP重写为HTTPS'; +$wb['password_strength_txt'] = '密码强度'; +$wb['directive_snippets_id_txt'] = 'Web服务器配置'; +$wb['http_port_txt'] = 'HTTP端口'; +$wb['https_port_txt'] = 'HTTPS端口'; +$wb['http_port_error_regex'] = 'HTTP端口无效。'; +$wb['https_port_error_regex'] = 'HTTPS端口无效。'; +$wb['enable_pagespeed_txt'] = '启用PageSpeed'; +$wb['log_retention_txt'] = '日志保留时间'; +$wb['log_retention_error_regex'] = '保留时间为天数(允许的值:最小0-最大9999)'; +$wb['dependent_domains_txt'] = '相关子域名/别名域名'; +$wb['limit_web_quota_not_0_txt'] = '硬盘配额不能设为0。'; +$wb['proxy_protocol_txt'] = '启用PROXY协议'; +$wb['backup_format_web_txt'] = 'Web文件备份格式'; +$wb['backup_format_db_txt'] = '数据库备份格式'; +$wb['backup_missing_utils_txt'] = '以下格式不能使用,因为它们未安装在Web服务器上:'; +$wb['backup_compression_options_txt'] = '压缩选项'; +$wb['backup_encryption_note_txt'] = '加密仅适用于7z,RAR和zip(不安全)。'; +$wb['backup_encryption_options_txt'] = '加密选项'; +$wb['backup_enable_encryption_txt'] = '启用加密'; +$wb['backup_password_txt'] = '密码'; +$wb['backup_format_default_txt'] = '默认:zip(deflate)或tar(gzip)'; +$wb['backup_format_zip_txt'] = 'zip(deflate)'; +$wb['backup_format_gzip_txt'] = 'gzip'; +$wb['backup_format_bzip2_txt'] = 'bzip2'; +$wb['backup_format_xz_txt'] = 'xz'; +$wb['backup_format_zip_bzip2_txt'] = 'zip(bzip2)'; +$wb['backup_format_7z_lzma_txt'] = '7z(LZMA)'; +$wb['backup_format_7z_lzma2_txt'] = '7z(LZMA2)'; +$wb['backup_format_7z_ppmd_txt'] = '7z(PPMd)'; +$wb['backup_format_7z_bzip2_txt'] = '7z(BZip2)'; +$wb['backup_format_tar_gzip_txt'] = 'tar(gzip)'; +$wb['backup_format_tar_bzip2_txt'] = 'tar(bzip2)'; +$wb['backup_format_tar_xz_txt'] = 'tar(xz)'; +$wb['backup_format_rar_txt'] = 'RAR'; +$wb['backup_format_tar_7z_lzma_txt'] = 'tar + 7z(LZMA)'; +$wb['backup_format_tar_7z_lzma2_txt'] = 'tar + 7z(LZMA2)'; +$wb['backup_format_tar_7z_ppmd_txt'] = 'tar + 7z(PPMd)'; +$wb['backup_format_tar_7z_bzip2_txt'] = 'tar + 7z(BZip2)'; +$wb['error_ipv4_change_forbidden'] = 'IP地址无法更改。如果您想更改IPv4地址,请联系您的管理员。'; +$wb['error_ipv6_change_forbidden'] = 'IP地址无法更改。如果您想更改IPv6地址,请联系您的管理员。'; +$wb['error_domain_change_forbidden'] = '域名不能更改。如果要更改域名,请联系管理员。'; +$wb['error_server_change_not_possible'] = '服务器不能更改。'; +$wb['jailkit_chroot_app_sections_txt'] = 'Jailkit chroot应用程序部分'; +$wb['jailkit_chroot_app_programs_txt'] = 'Jailkit chroot应用程序'; +$wb['jailkit_chroot_app_sections_error_empty'] = 'Jailkit chroot应用程序部分为空。'; +$wb['jailkit_chroot_app_programs_error_empty'] = 'Jailkit chroot应用程序为空。'; +$wb['jailkit_chroot_app_sections_error_regex'] = '无效的jaikit chroot部分。'; +$wb['jailkit_chroot_app_programs_error_regex'] = '无效的jaikit chroot应用程序。'; +$wb['tooltip_jailkit_chroot_app_sections_txt'] = '如果为空,则使用来自服务器配置的Jailkit chroot应用程序部分'; +$wb['tooltip_jailkit_chroot_app_programs_txt'] = '如果为空,则使用来自服务器配置的Jailkit chroot应用程序'; +$wb['delete_unused_jailkit_txt'] = '删除未使用的jailkit chroot'; +$wb['tooltip_delete_unused_jailkit_txt'] = '删除没有需要它的shell用户或cron作业的jailkit chroot环境。'; +$wb['ssl_options_not_for_le_txt'] = '您已为此网站启用Let\'s Encrypt证书。请注意,此页面上的所有选项仅适用于非Let\'s Encrypt证书。如果要切换到不同的证书,请记得在主选项卡上取消选中Let\'s Encrypt。'; diff --git a/interface/web/sites/lib/lang/cn_web_vhost_domain_admin_list.lng b/interface/web/sites/lib/lang/cn_web_vhost_domain_admin_list.lng new file mode 100644 index 0000000000..4baaa4bc29 --- /dev/null +++ b/interface/web/sites/lib/lang/cn_web_vhost_domain_admin_list.lng @@ -0,0 +1,14 @@ + diff --git a/interface/web/sites/lib/lang/cn_web_vhost_domain_list.lng b/interface/web/sites/lib/lang/cn_web_vhost_domain_list.lng new file mode 100644 index 0000000000..b65538efda --- /dev/null +++ b/interface/web/sites/lib/lang/cn_web_vhost_domain_list.lng @@ -0,0 +1,14 @@ + diff --git a/interface/web/sites/lib/lang/cn_web_vhost_subdomain.lng b/interface/web/sites/lib/lang/cn_web_vhost_subdomain.lng new file mode 100644 index 0000000000..0d5cf4cad8 --- /dev/null +++ b/interface/web/sites/lib/lang/cn_web_vhost_subdomain.lng @@ -0,0 +1,136 @@ +=0 的整数值。'; +$wb['pm_ondemand_hint_txt'] = '请注意,您必须具有 PHP 版本 >= 5.3.9 才能使用按需进程管理器。如果您为旧版本的 PHP 选择了按需进程管理器,则 PHP 将不再启动!'; +$wb['generate_password_txt'] = '生成密码'; +$wb['repeat_password_txt'] = '重复密码'; +$wb['password_mismatch_txt'] = '密码不匹配。'; +$wb['password_match_txt'] = '密码匹配。'; +$wb['available_php_directive_snippets_txt'] = '可用的 PHP 指令片段:'; +$wb['available_apache_directive_snippets_txt'] = '可用的 Apache 指令片段:'; +$wb['available_nginx_directive_snippets_txt'] = '可用的 Nginx 指令片段:'; +$wb['proxy_directives_txt'] = '代理指令'; +$wb['available_proxy_directive_snippets_txt'] = '可用的代理指令片段:'; +$wb['rewrite_rules_txt'] = '重写规则'; +$wb['invalid_rewrite_rules_txt'] = '无效的重写规则'; +$wb['allowed_rewrite_rule_directives_txt'] = '允许的指令:'; +$wb['configuration_error_txt'] = '配置错误'; +$wb['variables_txt'] = '变量'; +$wb['backup_excludes_txt'] = '排除的目录'; +$wb['backup_excludes_note_txt'] = '(使用逗号分隔多个目录。例如:web/cache/*,web/backup)'; +$wb['backup_excludes_error_regex'] = '排除的目录包含无效字符。'; +$wb['subdomain_error_empty'] = '子域名字段为空或包含无效字符。'; +$wb['http_port_txt'] = 'HTTP 端口'; +$wb['https_port_txt'] = 'HTTPS 端口'; +$wb['http_port_error_regex'] = 'HTTP 端口无效。'; +$wb['https_port_error_regex'] = 'HTTPS 端口无效。'; diff --git a/interface/web/sites/lib/lang/cn_web_vhost_subdomain_list.lng b/interface/web/sites/lib/lang/cn_web_vhost_subdomain_list.lng new file mode 100644 index 0000000000..6209cb34d0 --- /dev/null +++ b/interface/web/sites/lib/lang/cn_web_vhost_subdomain_list.lng @@ -0,0 +1,8 @@ + diff --git a/interface/web/sites/lib/lang/cn_webdav_user.lng b/interface/web/sites/lib/lang/cn_webdav_user.lng new file mode 100644 index 0000000000..4b5a1e3888 --- /dev/null +++ b/interface/web/sites/lib/lang/cn_webdav_user.lng @@ -0,0 +1,21 @@ + diff --git a/interface/web/sites/lib/lang/cn_webdav_user_list.lng b/interface/web/sites/lib/lang/cn_webdav_user_list.lng new file mode 100644 index 0000000000..a1899aade9 --- /dev/null +++ b/interface/web/sites/lib/lang/cn_webdav_user_list.lng @@ -0,0 +1,8 @@ + diff --git a/interface/web/strengthmeter/lib/lang/cn_strengthmeter.lng b/interface/web/strengthmeter/lib/lang/cn_strengthmeter.lng new file mode 100644 index 0000000000..b1b16dd2ac --- /dev/null +++ b/interface/web/strengthmeter/lib/lang/cn_strengthmeter.lng @@ -0,0 +1,8 @@ + diff --git a/interface/web/tools/lib/lang/cn.lng b/interface/web/tools/lib/lang/cn.lng new file mode 100644 index 0000000000..0546815644 --- /dev/null +++ b/interface/web/tools/lib/lang/cn.lng @@ -0,0 +1,13 @@ + diff --git a/interface/web/tools/lib/lang/cn_import_ispconfig.lng b/interface/web/tools/lib/lang/cn_import_ispconfig.lng new file mode 100644 index 0000000000..032d8e0491 --- /dev/null +++ b/interface/web/tools/lib/lang/cn_import_ispconfig.lng @@ -0,0 +1,25 @@ + diff --git a/interface/web/tools/lib/lang/cn_import_vpopmail.lng b/interface/web/tools/lib/lang/cn_import_vpopmail.lng new file mode 100644 index 0000000000..7bc253d358 --- /dev/null +++ b/interface/web/tools/lib/lang/cn_import_vpopmail.lng @@ -0,0 +1,8 @@ + diff --git a/interface/web/tools/lib/lang/cn_index.lng b/interface/web/tools/lib/lang/cn_index.lng new file mode 100644 index 0000000000..f7a2d96d53 --- /dev/null +++ b/interface/web/tools/lib/lang/cn_index.lng @@ -0,0 +1,4 @@ + diff --git a/interface/web/tools/lib/lang/cn_resync.lng b/interface/web/tools/lib/lang/cn_resync.lng new file mode 100644 index 0000000000..461ba1afcf --- /dev/null +++ b/interface/web/tools/lib/lang/cn_resync.lng @@ -0,0 +1,53 @@ + diff --git a/interface/web/tools/lib/lang/cn_tpl_default.lng b/interface/web/tools/lib/lang/cn_tpl_default.lng new file mode 100644 index 0000000000..3ad71cdaaf --- /dev/null +++ b/interface/web/tools/lib/lang/cn_tpl_default.lng @@ -0,0 +1,7 @@ + diff --git a/interface/web/tools/lib/lang/cn_usersettings.lng b/interface/web/tools/lib/lang/cn_usersettings.lng new file mode 100644 index 0000000000..2ce3cfc32a --- /dev/null +++ b/interface/web/tools/lib/lang/cn_usersettings.lng @@ -0,0 +1,20 @@ + diff --git a/interface/web/vm/lib/lang/cn.lng b/interface/web/vm/lib/lang/cn.lng new file mode 100644 index 0000000000..79756e83ef --- /dev/null +++ b/interface/web/vm/lib/lang/cn.lng @@ -0,0 +1,7 @@ + diff --git a/interface/web/vm/lib/lang/cn_openvz_action.lng b/interface/web/vm/lib/lang/cn_openvz_action.lng new file mode 100644 index 0000000000..f968c49309 --- /dev/null +++ b/interface/web/vm/lib/lang/cn_openvz_action.lng @@ -0,0 +1,17 @@ + diff --git a/interface/web/vm/lib/lang/cn_openvz_ip.lng b/interface/web/vm/lib/lang/cn_openvz_ip.lng new file mode 100644 index 0000000000..9140a92b3a --- /dev/null +++ b/interface/web/vm/lib/lang/cn_openvz_ip.lng @@ -0,0 +1,9 @@ + diff --git a/interface/web/vm/lib/lang/cn_openvz_ip_list.lng b/interface/web/vm/lib/lang/cn_openvz_ip_list.lng new file mode 100644 index 0000000000..847328708b --- /dev/null +++ b/interface/web/vm/lib/lang/cn_openvz_ip_list.lng @@ -0,0 +1,7 @@ + diff --git a/interface/web/vm/lib/lang/cn_openvz_ostemplate.lng b/interface/web/vm/lib/lang/cn_openvz_ostemplate.lng new file mode 100644 index 0000000000..716c657ce5 --- /dev/null +++ b/interface/web/vm/lib/lang/cn_openvz_ostemplate.lng @@ -0,0 +1,10 @@ +$wb['template_name_txt'] = '模板名称'; +$wb['template_file_txt'] = '模板文件名'; +$wb['server_id_txt'] = '服务器'; +$wb['allservers_txt'] = '全部服务器'; +$wb['active_txt'] = '状态'; +$wb['description_txt'] = '描述'; +$wb['template_name_error_empty'] = '模板名称为空。'; +$wb['template_file_error_empty'] = '模板文件名为空。'; +$wb['Template'] = '模板'; +?> diff --git a/interface/web/vm/lib/lang/cn_openvz_ostemplate_list.lng b/interface/web/vm/lib/lang/cn_openvz_ostemplate_list.lng new file mode 100644 index 0000000000..641440c9e4 --- /dev/null +++ b/interface/web/vm/lib/lang/cn_openvz_ostemplate_list.lng @@ -0,0 +1,8 @@ + diff --git a/interface/web/vm/lib/lang/cn_openvz_template.lng b/interface/web/vm/lib/lang/cn_openvz_template.lng new file mode 100644 index 0000000000..8e159e212d --- /dev/null +++ b/interface/web/vm/lib/lang/cn_openvz_template.lng @@ -0,0 +1,97 @@ + diff --git a/interface/web/vm/lib/lang/cn_openvz_vm.lng b/interface/web/vm/lib/lang/cn_openvz_vm.lng new file mode 100644 index 0000000000..cbb92dc45f --- /dev/null +++ b/interface/web/vm/lib/lang/cn_openvz_vm.lng @@ -0,0 +1,45 @@ + diff --git a/interface/web/vm/lib/lang/cn_openvz_vm_list.lng b/interface/web/vm/lib/lang/cn_openvz_vm_list.lng new file mode 100644 index 0000000000..739f152157 --- /dev/null +++ b/interface/web/vm/lib/lang/cn_openvz_vm_list.lng @@ -0,0 +1,10 @@ + From a080b1cd7c8049944b76d53cb53edc796f15c29f Mon Sep 17 00:00:00 2001 From: Michael Seevogel Date: Wed, 29 Mar 2023 21:10:10 +0200 Subject: [PATCH 095/621] simplify redhat os detection for the Nginx EL workaround --- server/lib/classes/system.inc.php | 10 ++++++++ server/plugins-available/nginx_plugin.inc.php | 24 +++++++------------ 2 files changed, 18 insertions(+), 16 deletions(-) diff --git a/server/lib/classes/system.inc.php b/server/lib/classes/system.inc.php index 7e4e7ae447..15098b80c0 100644 --- a/server/lib/classes/system.inc.php +++ b/server/lib/classes/system.inc.php @@ -2327,6 +2327,16 @@ public function is_allowed_group($groupname, $check_id = true, $restrict_names = return true; } + public function is_redhat_os() { + global $app; + + if(file_exists('/etc/redhat-release') && (filesize('/etc/redhat-release') > 0)) { + return true; + } else { + return false; + } + } + public function is_allowed_path($path) { global $app; diff --git a/server/plugins-available/nginx_plugin.inc.php b/server/plugins-available/nginx_plugin.inc.php index 1a4b3336da..818399970c 100644 --- a/server/plugins-available/nginx_plugin.inc.php +++ b/server/plugins-available/nginx_plugin.inc.php @@ -2852,7 +2852,6 @@ private function hhvm_update($data, $web_config) { private function php_fpm_pool_update ($data, $web_config, $pool_dir, $pool_name, $socket_dir, $web_folder = null) { global $app, $conf; $pool_dir = trim($pool_dir); - $rh_releasefiles = array('/etc/centos-release', '/etc/redhat-release'); // HHVM => PHP-FPM-Fallback $default_php_fpm = true; @@ -2923,21 +2922,14 @@ private function php_fpm_pool_update ($data, $web_config, $pool_dir, $pool_name, $tpl->setVar('fpm_port', $web_config['php_fpm_start_port'] + $data['new']['domain_id'] - 1); $tpl->setVar('fpm_user', $data['new']['system_user']); - //Red Hat workaround for group ownership of socket files - foreach($rh_releasefiles as $rh_file) { - if(file_exists($rh_file) && (filesize($rh_file) > 0)) { - $tmp = file_get_contents($rh_file); - if(preg_match('/[678]+\.[0-9]+/m', $tmp)) { - $tpl->setVar('fpm_group', $data['new']['system_group']); - $tpl->setVar('fpm_listen_group', $data['new']['system_group']); - } - unset($tmp); - } elseif(!file_exists($rh_file)) { - //OS seems to be not Red Hat'ish - $tpl->setVar('fpm_group', $data['new']['system_group']); - $tpl->setVar('fpm_listen_group', $web_config['group']); - } - break; + // RH workaround here + if($app->system->is_redhat_os() == 1) { + $tpl->setVar('fpm_group', $data['new']['system_group']); + $tpl->setVar('fpm_listen_group', $data['new']['system_group']); + } else { + //OS seems to be not Red Hat'ish + $tpl->setVar('fpm_group', $data['new']['system_group']); + $tpl->setVar('fpm_listen_group', $web_config['group']); } $tpl->setVar('fpm_listen_user', $data['new']['system_user']); From 507478ca015c2b849065d564b85ec64071e56381 Mon Sep 17 00:00:00 2001 From: Till Brehm Date: Fri, 31 Mar 2023 16:05:09 +0000 Subject: [PATCH 096/621] Update rspamd_plugin.inc.php --- server/plugins-available/rspamd_plugin.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/plugins-available/rspamd_plugin.inc.php b/server/plugins-available/rspamd_plugin.inc.php index 112020deb7..28efde2239 100644 --- a/server/plugins-available/rspamd_plugin.inc.php +++ b/server/plugins-available/rspamd_plugin.inc.php @@ -508,7 +508,7 @@ function server_update($event_name, $data) { $mail_config = $app->getconf->get_server_config($conf['server_id'], 'mail'); $local_addrs = array(); - $ips = $app->db->queryAllRecords('SELECT `ip_address`, `ip_type` FROM ?? WHERE `server_id` = ?', $conf['mysql']['database'].'.server_ip', $conf['server_id']); + $ips = $app->db->queryAllRecords('SELECT `ip_address`, `ip_type` FROM ?? WHERE `server_id` = ?', $conf['db_database'].'.server_ip', $conf['server_id']); if(is_array($ips) && !empty($ips)){ foreach($ips as $ip){ $local_addrs[] = array( From 19a7aaecadce0d3aa0ecad55487d4585c374ba40 Mon Sep 17 00:00:00 2001 From: flo Date: Fri, 7 Apr 2023 23:36:53 +0200 Subject: [PATCH 097/621] Improve client circle page --- interface/web/client/form/client_circle.tform.php | 5 +++-- .../web/client/templates/client_circle_edit.htm | 15 ++++++++------- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/interface/web/client/form/client_circle.tform.php b/interface/web/client/form/client_circle.tform.php index 64eee542d7..6916c2248b 100644 --- a/interface/web/client/form/client_circle.tform.php +++ b/interface/web/client/form/client_circle.tform.php @@ -112,10 +112,11 @@ 'default' => '', 'separator' => ',', 'datasource' => array ( 'type' => 'SQL', - 'querystring' => 'SELECT client_id,contact_name FROM client WHERE {AUTHSQL} ORDER BY contact_name', + 'querystring' => 'SELECT client_id,CONCAT(company_name, " (",contact_firstname, " ", contact_name, ")") as contact_label FROM client WHERE {AUTHSQL} ORDER BY contact_label', 'keyfield'=> 'client_id', - 'valuefield'=> 'contact_name' + 'valuefield'=> 'contact_label' ), + 'render_inline' => 'n', 'value' => '' ), 'description' => array ( diff --git a/interface/web/client/templates/client_circle_edit.htm b/interface/web/client/templates/client_circle_edit.htm index 0bdf2f49a0..b497fd9509 100644 --- a/interface/web/client/templates/client_circle_edit.htm +++ b/interface/web/client/templates/client_circle_edit.htm @@ -9,12 +9,6 @@

-
- -
- {tmpl_var name='client_ids'} -
-
@@ -25,6 +19,13 @@

{tmpl_var name='active'}
+
+
+ +
+ {tmpl_var name='client_ids'} +
+
{tmpl_var name='required_fields_txt'} @@ -33,4 +34,4 @@

-
\ No newline at end of file +
From c7a6bddfb2aa9096808f64c5d5ed8f5b0b5ecbe2 Mon Sep 17 00:00:00 2001 From: Till Date: Fri, 14 Apr 2023 07:55:21 +0200 Subject: [PATCH 098/621] Replaced LOGLEVEL_WARNING with LOGLEVEL_WARN --- server/lib/classes/services.inc.php | 2 +- .../mail_plugin_dkim.inc.php | 2 +- .../mongo_clientdb_plugin.inc.php~ | 30 +++++++------- .../mysql_clientdb_plugin.inc.php | 40 +++++++++---------- 4 files changed, 37 insertions(+), 37 deletions(-) diff --git a/server/lib/classes/services.inc.php b/server/lib/classes/services.inc.php index 0914081672..0cd8244701 100644 --- a/server/lib/classes/services.inc.php +++ b/server/lib/classes/services.inc.php @@ -57,7 +57,7 @@ function restartService($service_name, $action = 'restart') { // call_user_method($function_name,$app->loaded_modules[$module_name],$action); return call_user_func(array($app->loaded_modules[$module_name], $function_name), $action); } else { - $app->log("Unable to restart $service_name. Service not registered.", LOGLEVEL_WARNING); + $app->log("Unable to restart $service_name. Service not registered.", LOGLEVEL_WARN); return array('output' => '', 'retval' => 0); } diff --git a/server/plugins-available/mail_plugin_dkim.inc.php b/server/plugins-available/mail_plugin_dkim.inc.php index b937f82275..4114148f11 100755 --- a/server/plugins-available/mail_plugin_dkim.inc.php +++ b/server/plugins-available/mail_plugin_dkim.inc.php @@ -155,7 +155,7 @@ private function check_system() { $app->system->mkdirpath($mail_config['dkim_path'], 0750, $amavis_user, $amavis_group); } else { $app->system->mkdirpath($mail_config['dkim_path'], 0755); - $app->log('No user amavis or vscan found - using root for '.$mail_config['dkim_path'], LOGLEVEL_WARNING); + $app->log('No user amavis or vscan found - using root for '.$mail_config['dkim_path'], LOGLEVEL_WARN); } } else { if (!$app->system->checkpath($mail_config['dkim_path'])) { diff --git a/server/plugins-available/mongo_clientdb_plugin.inc.php~ b/server/plugins-available/mongo_clientdb_plugin.inc.php~ index 6258583874..41c7679818 100644 --- a/server/plugins-available/mongo_clientdb_plugin.inc.php~ +++ b/server/plugins-available/mongo_clientdb_plugin.inc.php~ @@ -516,7 +516,7 @@ class mongo_clientdb_plugin { if ((bool) $db_user) { if ($user == 'root') { - $app->log("User root not allowed for client databases", LOGLEVEL_WARNING); + $app->log("User root not allowed for client databases", LOGLEVEL_WARN); } else { if (!$this->addUser($db, array( 'username' => $user, @@ -526,14 +526,14 @@ class mongo_clientdb_plugin { "dbAdmin" ) ))) { - $app->log("Error while adding user: ".$user." to DB: ".$db, LOGLEVEL_WARNING); + $app->log("Error while adding user: ".$user." to DB: ".$db, LOGLEVEL_WARN); } } } if ($db_ro_user && $data['new']['database_user_id'] != $data['new']['database_ro_user_id']) { if ($user == 'root') { - $app->log("User root not allowed for client databases", LOGLEVEL_WARNING); + $app->log("User root not allowed for client databases", LOGLEVEL_WARN); } else { if (!$this->addUser($db, array( 'username' => $ro_user, @@ -542,7 +542,7 @@ class mongo_clientdb_plugin { "read" ) ))) { - $app->log("Error while adding read-only user: ".$user." to DB: ".$db, LOGLEVEL_WARNING); + $app->log("Error while adding read-only user: ".$user." to DB: ".$db, LOGLEVEL_WARN); } } } @@ -607,7 +607,7 @@ class mongo_clientdb_plugin { if ((bool) $old_db_user) { if ($old_db_user['database_user'] == 'root') { - $app->log("User root not allowed for client databases", LOGLEVEL_WARNING); + $app->log("User root not allowed for client databases", LOGLEVEL_WARN); } else { $this->dropUser($old_db_user['database_user'], $db); } @@ -620,7 +620,7 @@ class mongo_clientdb_plugin { if ((bool) $old_db_user) { if ($old_db_user['database_user'] == 'root') { - $app->log("User root not allowed for client databases", LOGLEVEL_WARNING); + $app->log("User root not allowed for client databases", LOGLEVEL_WARN); } else { $this->dropUser($old_db_user['database_user'], $db); } @@ -631,7 +631,7 @@ class mongo_clientdb_plugin { if ($data['new']['database_user_id'] != $data['old']['database_user_id']) { if ((bool) $db_user) { if ($user == 'root') { - $app->log("User root not allowed for client databases", LOGLEVEL_WARNING); + $app->log("User root not allowed for client databases", LOGLEVEL_WARN); } else { $this->addUser($db, array( 'username' => $user, @@ -649,7 +649,7 @@ class mongo_clientdb_plugin { if ($data['new']['database_ro_user_id'] != $data['old']['database_ro_user_iduser_id']) { if ((bool) $db_ro_user && $data['new']['database_user_id'] != $data['new']['database_ro_user_id']) { if ($ro_user == 'root') { - $app->log("User root not allowed for client databases", LOGLEVEL_WARNING); + $app->log("User root not allowed for client databases", LOGLEVEL_WARN); } else { $this->addUser($db, array( 'username' => $ro_user, @@ -671,7 +671,7 @@ class mongo_clientdb_plugin { if ($this->renameDB($oldName, $newName)) { $app->log("Renamed MongoDB database: ".$old_name." -> ".$new_name, LOGLEVEL_DEBUG); } else { - $app->log("Renaming MongoDB database failed: ".$old_name." -> ".$new_name, LOGLEVEL_WARNING); + $app->log("Renaming MongoDB database failed: ".$old_name." -> ".$new_name, LOGLEVEL_WARN); } } */ @@ -710,7 +710,7 @@ class mongo_clientdb_plugin { if ($this->dropDB($db_to_drop)) { $app->log("Dropping MongoDB database: ".$db_to_drop, LOGLEVEL_DEBUG); } else { - $app->log("Error while dropping MongoDB database: ".$db_to_drop, LOGLEVEL_WARNING); + $app->log("Error while dropping MongoDB database: ".$db_to_drop, LOGLEVEL_WARN); } $this->disconnect(); @@ -770,13 +770,13 @@ class mongo_clientdb_plugin { ))) { $app->log("Created user: ".$data['new']['database_user']." in DB: ".$db, LOGLEVEL_DEBUG); } else { - $app->log("Couldn't create user: ".$data['new']['database_user']." in DB: ".$db, LOGLEVEL_WARNING); + $app->log("Couldn't create user: ".$data['new']['database_user']." in DB: ".$db, LOGLEVEL_WARN); } } else { - $app->log("Couldn't drop user: ".$data['old']['database_user']." in DB: ".$db, LOGLEVEL_WARNING); + $app->log("Couldn't drop user: ".$data['old']['database_user']." in DB: ".$db, LOGLEVEL_WARN); } } else { - $app->log("User: ".$data['new']['database_user']." already exists in DB: ".$db, LOGLEVEL_WARNING); + $app->log("User: ".$data['new']['database_user']." already exists in DB: ".$db, LOGLEVEL_WARN); } } } @@ -794,7 +794,7 @@ class mongo_clientdb_plugin { if ($this->changePassword($db, $data['new']['database_user'], md5($data['new']['database_password_mongo']))) { $app->log("Changed user's: ".$data['new']['database_user']." password in DB: ".$db, LOGLEVEL_DEBUG); } else { - $app->log("Couldn't change user's: ".$data['new']['database_user']." password in DB: ".$db, LOGLEVEL_WARNING); + $app->log("Couldn't change user's: ".$data['new']['database_user']." password in DB: ".$db, LOGLEVEL_WARN); } } } @@ -825,7 +825,7 @@ class mongo_clientdb_plugin { if ($this->dropUser($data['old']['database_user']) === true) { $app->log("Dropped MongoDB user: ".$data['old']['database_user'], LOGLEVEL_DEBUG); } else { - $app->log("Error while dropping MongoDB user: ".$data['old']['database_user'], LOGLEVEL_WARNING); + $app->log("Error while dropping MongoDB user: ".$data['old']['database_user'], LOGLEVEL_WARN); } $this->disconnect(); diff --git a/server/plugins-available/mysql_clientdb_plugin.inc.php b/server/plugins-available/mysql_clientdb_plugin.inc.php index 9cf750a84d..589e60d4ef 100644 --- a/server/plugins-available/mysql_clientdb_plugin.inc.php +++ b/server/plugins-available/mysql_clientdb_plugin.inc.php @@ -280,7 +280,7 @@ function db_insert($event_name, $data) { if ($link->query('CREATE DATABASE `'.$link->escape_string($data['new']['database_name']).'`'.$query_charset_table)) { $app->log('Created MySQL database: '.$data['new']['database_name'], LOGLEVEL_DEBUG); } else { - $app->log('Unable to create the database: '.$link->error, LOGLEVEL_WARNING); + $app->log('Unable to create the database: '.$link->error, LOGLEVEL_WARN); } // Create the database user if database is active @@ -299,11 +299,11 @@ function db_insert($event_name, $data) { $host_list .= 'localhost'; if($db_user) { - if($db_user['database_user'] == 'root') $app->log('User root not allowed for Client databases', LOGLEVEL_WARNING); + if($db_user['database_user'] == 'root') $app->log('User root not allowed for Client databases', LOGLEVEL_WARN); else $this->process_host_list('GRANT', $data['new']['database_name'], $db_user['database_user'], $db_user['database_password'], $host_list, $link, '', ($data['new']['quota_exceeded'] == 'y' ? 'rd' : 'rw')); } if($db_ro_user && $data['new']['database_user_id'] != $data['new']['database_ro_user_id']) { - if($db_ro_user['database_user'] == 'root') $app->log('User root not allowed for Client databases', LOGLEVEL_WARNING); + if($db_ro_user['database_user'] == 'root') $app->log('User root not allowed for Client databases', LOGLEVEL_WARN); else $this->process_host_list('GRANT', $data['new']['database_name'], $db_ro_user['database_user'], $db_ro_user['database_password'], $host_list, $link, '', 'r'); } @@ -491,17 +491,17 @@ function db_update($event_name, $data) { // Create the database user if database was disabled before if($data['new']['active'] == 'y') { if($db_user) { - if($db_user['database_user'] == 'root') $app->log('User root not allowed for Client databases', LOGLEVEL_WARNING); + if($db_user['database_user'] == 'root') $app->log('User root not allowed for Client databases', LOGLEVEL_WARN); else $this->process_host_list('GRANT', $data['new']['database_name'], $db_user['database_user'], $db_user['database_password'], $host_list, $link, '', ($data['new']['quota_exceeded'] == 'y' ? 'rd' : 'rw')); } if($db_ro_user && $data['new']['database_user_id'] != $data['new']['database_ro_user_id']) { - if($db_ro_user['database_user'] == 'root') $app->log('User root not allowed for Client databases', LOGLEVEL_WARNING); + if($db_ro_user['database_user'] == 'root') $app->log('User root not allowed for Client databases', LOGLEVEL_WARN); else $this->process_host_list('GRANT', $data['new']['database_name'], $db_ro_user['database_user'], $db_ro_user['database_password'], $host_list, $link, '', 'r'); } } elseif($data['new']['active'] == 'n' && $data['old']['active'] == 'y') { // revoke database user, if inactive if($old_db_user) { if($old_db_user['database_user'] == 'root'){ - $app->log('User root not allowed for Client databases', LOGLEVEL_WARNING); + $app->log('User root not allowed for Client databases', LOGLEVEL_WARN); } else { // Find out users to drop and users to revoke $drop_or_revoke_user = $this->drop_or_revoke_user($data['old']['database_id'], $data['old']['database_user_id'], $old_host_list); @@ -512,7 +512,7 @@ function db_update($event_name, $data) { } if($old_db_ro_user && $data['old']['database_user_id'] != $data['old']['database_ro_user_id']) { if($old_db_ro_user['database_user'] == 'root'){ - $app->log('User root not allowed for Client databases', LOGLEVEL_WARNING); + $app->log('User root not allowed for Client databases', LOGLEVEL_WARN); } else { // Find out users to drop and users to revoke $drop_or_revoke_user = $this->drop_or_revoke_user($data['old']['database_id'], $data['old']['database_ro_user_id'], $old_host_list); @@ -530,7 +530,7 @@ function db_update($event_name, $data) { if($data['old']['database_user_id'] && $data['old']['database_user_id'] != $data['new']['database_ro_user_id']) { if($old_db_user) { if($old_db_user['database_user'] == 'root'){ - $app->log('User root not allowed for Client databases', LOGLEVEL_WARNING); + $app->log('User root not allowed for Client databases', LOGLEVEL_WARN); } else { // Find out users to drop and users to revoke $drop_or_revoke_user = $this->drop_or_revoke_user($data['old']['database_id'], $data['old']['database_user_id'], $old_host_list); @@ -540,7 +540,7 @@ function db_update($event_name, $data) { } } if($db_user) { - if($db_user['database_user'] == 'root') $app->log('User root not allowed for Client databases', LOGLEVEL_WARNING); + if($db_user['database_user'] == 'root') $app->log('User root not allowed for Client databases', LOGLEVEL_WARN); else $this->process_host_list('GRANT', $data['new']['database_name'], $db_user['database_user'], $db_user['database_password'], $host_list, $link, '', ($data['new']['quota_exceeded'] == 'y' ? 'rd' : 'rw')); } } @@ -548,7 +548,7 @@ function db_update($event_name, $data) { if($data['old']['database_ro_user_id'] && $data['old']['database_ro_user_id'] != $data['new']['database_user_id']) { if($old_db_ro_user) { if($old_db_ro_user['database_user'] == 'root'){ - $app->log('User root not allowed for Client databases', LOGLEVEL_WARNING); + $app->log('User root not allowed for Client databases', LOGLEVEL_WARN); } else { // Find out users to drop and users to revoke $drop_or_revoke_user = $this->drop_or_revoke_user($data['old']['database_id'], $data['old']['database_ro_user_id'], $old_host_list); @@ -558,7 +558,7 @@ function db_update($event_name, $data) { } } if($db_ro_user && $data['new']['database_user_id'] != $data['new']['database_ro_user_id']) { - if($db_ro_user['database_user'] == 'root') $app->log('User root not allowed for Client databases', LOGLEVEL_WARNING); + if($db_ro_user['database_user'] == 'root') $app->log('User root not allowed for Client databases', LOGLEVEL_WARN); else $this->process_host_list('GRANT', $data['new']['database_name'], $db_ro_user['database_user'], $db_ro_user['database_password'], $host_list, $link, '', 'r'); } } @@ -570,19 +570,19 @@ function db_update($event_name, $data) { if($data['new']['remote_access'] == 'y') { if($db_user) { if($db_user['database_user'] == 'root'){ - $app->log('User root not allowed for Client databases', LOGLEVEL_WARNING); + $app->log('User root not allowed for Client databases', LOGLEVEL_WARN); } else { $this->process_host_list('GRANT', $data['new']['database_name'], $db_user['database_user'], $db_user['database_password'], $data['new']['remote_ips'], $link, '', ($data['new']['quota_exceeded'] == 'y' ? 'rd' : 'rw')); } } if($db_ro_user && $data['new']['database_user_id'] != $data['new']['database_ro_user_id']) { - if($db_ro_user['database_user'] == 'root') $app->log('User root not allowed for Client databases', LOGLEVEL_WARNING); + if($db_ro_user['database_user'] == 'root') $app->log('User root not allowed for Client databases', LOGLEVEL_WARN); else $this->process_host_list('GRANT', $data['new']['database_name'], $db_ro_user['database_user'], $db_ro_user['database_password'], $data['new']['remote_ips'], $link, '', 'r'); } } else { if($old_db_user) { if($old_db_user['database_user'] == 'root'){ - $app->log('User root not allowed for Client databases', LOGLEVEL_WARNING); + $app->log('User root not allowed for Client databases', LOGLEVEL_WARN); } else { // Find out users to drop and users to revoke $drop_or_revoke_user = $this->drop_or_revoke_user($data['old']['database_id'], $data['old']['database_user_id'], $data['old']['remote_ips']); @@ -592,7 +592,7 @@ function db_update($event_name, $data) { } if($old_db_ro_user && $data['old']['database_user_id'] != $data['old']['database_ro_user_id']) { if($old_db_ro_user['database_user'] == 'root'){ - $app->log('User root not allowed for Client databases', LOGLEVEL_WARNING); + $app->log('User root not allowed for Client databases', LOGLEVEL_WARN); } else { // Find out users to drop and users to revoke $drop_or_revoke_user = $this->drop_or_revoke_user($data['old']['database_id'], $data['old']['database_ro_user_id'], $data['old']['remote_ips']); @@ -606,7 +606,7 @@ function db_update($event_name, $data) { //* Change remote access list if($old_db_user) { if($old_db_user['database_user'] == 'root'){ - $app->log('User root not allowed for Client databases', LOGLEVEL_WARNING); + $app->log('User root not allowed for Client databases', LOGLEVEL_WARN); } else { // Find out users to drop and users to revoke $drop_or_revoke_user = $this->drop_or_revoke_user($data['old']['database_id'], $data['old']['database_user_id'], $data['old']['remote_ips']); @@ -616,7 +616,7 @@ function db_update($event_name, $data) { } if($db_user) { if($db_user['database_user'] == 'root'){ - $app->log('User root not allowed for Client databases', LOGLEVEL_WARNING); + $app->log('User root not allowed for Client databases', LOGLEVEL_WARN); } else { $this->process_host_list('GRANT', $data['new']['database_name'], $db_user['database_user'], $db_user['database_password'], $data['new']['remote_ips'], $link, '', ($data['new']['quota_exceeded'] == 'y' ? 'rd' : 'rw')); } @@ -624,7 +624,7 @@ function db_update($event_name, $data) { if($old_db_ro_user && $data['old']['database_user_id'] != $data['old']['database_ro_user_id']) { if($old_db_ro_user['database_user'] == 'root'){ - $app->log('User root not allowed for Client databases', LOGLEVEL_WARNING); + $app->log('User root not allowed for Client databases', LOGLEVEL_WARN); } else { // Find out users to drop and users to revoke $drop_or_revoke_user = $this->drop_or_revoke_user($data['old']['database_id'], $data['old']['database_ro_user_id'], $data['old']['remote_ips']); @@ -635,7 +635,7 @@ function db_update($event_name, $data) { if($db_ro_user && $data['new']['database_user_id'] != $data['new']['database_ro_user_id']) { if($db_ro_user['database_user'] == 'root'){ - $app->log('User root not allowed for Client databases', LOGLEVEL_WARNING); + $app->log('User root not allowed for Client databases', LOGLEVEL_WARN); } else { $this->process_host_list('GRANT', $data['new']['database_name'], $db_ro_user['database_user'], $db_ro_user['database_password'], $data['new']['remote_ips'], $link, '', 'r'); } @@ -689,7 +689,7 @@ function db_delete($event_name, $data) { if($link->query('DROP DATABASE `'.$link->escape_string($data['old']['database_name'].'`'))) { $app->log('Dropping MySQL database: '.$data['old']['database_name'], LOGLEVEL_DEBUG); } else { - $app->log('Error while dropping MySQL database: '.$data['old']['database_name'].' '.$link->error, LOGLEVEL_WARNING); + $app->log('Error while dropping MySQL database: '.$data['old']['database_name'].' '.$link->error, LOGLEVEL_WARN); } $link->close(); From 9b603507d20bcc77fd1f7d4e4e0abac88e0ced48 Mon Sep 17 00:00:00 2001 From: Till Brehm Date: Fri, 14 Apr 2023 06:14:24 +0000 Subject: [PATCH 099/621] Update nginx_plugin.inc.php --- server/plugins-available/nginx_plugin.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/plugins-available/nginx_plugin.inc.php b/server/plugins-available/nginx_plugin.inc.php index 818399970c..78144e7bfb 100644 --- a/server/plugins-available/nginx_plugin.inc.php +++ b/server/plugins-available/nginx_plugin.inc.php @@ -2923,7 +2923,7 @@ private function php_fpm_pool_update ($data, $web_config, $pool_dir, $pool_name, $tpl->setVar('fpm_user', $data['new']['system_user']); // RH workaround here - if($app->system->is_redhat_os() == 1) { + if($app->system->is_redhat_os() == true) { $tpl->setVar('fpm_group', $data['new']['system_group']); $tpl->setVar('fpm_listen_group', $data['new']['system_group']); } else { From 76f4863a92ce8456fd749b802eafc4ee5a7d01dc Mon Sep 17 00:00:00 2001 From: Joel Kuder Date: Fri, 14 Apr 2023 09:36:35 +0000 Subject: [PATCH 100/621] Update 100-monitor_hd_quota.inc.php --- .../cron.d/100-monitor_hd_quota.inc.php | 62 +++---------------- 1 file changed, 7 insertions(+), 55 deletions(-) diff --git a/server/lib/classes/cron.d/100-monitor_hd_quota.inc.php b/server/lib/classes/cron.d/100-monitor_hd_quota.inc.php index b45f252b32..df2f2ce958 100644 --- a/server/lib/classes/cron.d/100-monitor_hd_quota.inc.php +++ b/server/lib/classes/cron.d/100-monitor_hd_quota.inc.php @@ -33,7 +33,6 @@ class cronjob_monitor_hd_quota extends cronjob { // job schedule protected $_schedule = '*/5 * * * *'; protected $_run_at_new = true; - private $_tools = null; /* this function is optional if it contains no custom code */ @@ -70,7 +69,7 @@ public function onRunJob() { //* The state of the harddisk_quota. $state = 'ok'; - if(!$app->system->is_installed('setquota')) { + if(!$app->system->is_installed('setquota')) { //* No Quota on this System ... //** Fetch the data for all users @@ -88,7 +87,7 @@ public function onRunJob() { //* ignore the first 5 lines, process the rest for ($i = 0; $i <= sizeof($df); $i++) { - if (isset($df[$i]) && $df[$i] != '') { + if ($df[$i] != '') { //* Make a array of the data $s1 = preg_split('/[\s]+/', $df[$i]); $s2 = preg_split('/\//', $s1[1]); @@ -109,7 +108,7 @@ public function onRunJob() { //* ignore the first 5 lines, process the rest for ($i = 0; $i <= sizeof($df); $i++) { - if (isset($df[$i]) && $df[$i] != '') { + if ($df[$i] != '') { //* Make a array of the data $s1 = preg_split('/[\s]+/', $df[$i]); $s2 = preg_split('/\//', $s1[1]); @@ -129,9 +128,7 @@ public function onRunJob() { } } } - - }else{ - + }else{ //* Fetch the data for all users $dfData = shell_exec('repquota -au 2>/dev/null'); @@ -140,7 +137,7 @@ public function onRunJob() { //* ignore the first 5 lines, process the rest for ($i = 5; $i <= sizeof($df); $i++) { - if (isset($df[$i]) && $df[$i] != '') { + if ($df[$i] != '') { //* Make a array of the data $s = preg_split('/[\s]+/', $df[$i]); $username = $s[0]; @@ -156,29 +153,6 @@ public function onRunJob() { $data['user'][$username]['hard'] = $s[4]; $data['user'][$username]['files'] = $s[5]; } - //* Fetch the data for all users - $dfData = shell_exec('repquota -au 2>/dev/null'); - - //* Split into array - $df = explode("\n", $dfData); - - //* ignore the first 5 lines, process the rest - for ($i = 5; $i <= sizeof($df); $i++) { - if (isset($df[$i]) && $df[$i] != '') { - //* Make a array of the data - $s = preg_split('/[\s]+/', $df[$i]); - $username = $s[0]; - if (substr($username, 0, 3) == 'web') { - if (isset($data['user'][$username])) { - $data['user'][$username]['used'] += $s[2]; - $data['user'][$username]['soft'] += $s[3]; - $data['user'][$username]['hard'] += $s[4]; - $data['user'][$username]['files'] += $s[5]; - } else { - $data['user'][$username]['used'] = $s[2]; - $data['user'][$username]['soft'] = $s[3]; - $data['user'][$username]['hard'] = $s[4]; - $data['user'][$username]['files'] = $s[5]; } } } @@ -191,7 +165,7 @@ public function onRunJob() { //* ignore the first 5 lines, process the rest for ($i = 5; $i <= sizeof($df); $i++) { - if (isset($df[$i]) && $df[$i] != '') { + if ($df[$i] != '') { //* Make a array of the data $s = preg_split('/[\s]+/', $df[$i]); $groupname = $s[0]; @@ -205,32 +179,10 @@ public function onRunJob() { $data['group'][$groupname]['soft'] = $s[3]; $data['group'][$groupname]['hard'] = $s[4]; } - //** Fetch the data for all users - $dfData = shell_exec('repquota -ag 2>/dev/null'); - - //* split into array - $df = explode("\n", $dfData); - - //* ignore the first 5 lines, process the rest - for ($i = 5; $i <= sizeof($df); $i++) { - if (isset($df[$i]) && $df[$i] != '') { - //* Make a array of the data - $s = preg_split('/[\s]+/', $df[$i]); - $groupname = $s[0]; - if (substr($groupname, 0, 6) == 'client') { - if (isset($data['group'][$groupname])) { - $data['group'][$groupname]['used'] += $s[2]; - $data['group'][$groupname]['soft'] += $s[3]; - $data['group'][$groupname]['hard'] += $s[4]; - } else { - $data['group'][$groupname]['used'] = $s[2]; - $data['group'][$groupname]['soft'] = $s[3]; - $data['group'][$groupname]['hard'] = $s[4]; } } } - } - + } $res = array(); $res['server_id'] = $server_id; $res['type'] = $type; From 8d44fa9ce886caf921c8648a025416fd98d7f5f9 Mon Sep 17 00:00:00 2001 From: Joel Kuder Date: Fri, 14 Apr 2023 09:41:01 +0000 Subject: [PATCH 101/621] Update server/lib/classes/cron.d/100-monitor_hd_quota.inc.php --- server/lib/classes/cron.d/100-monitor_hd_quota.inc.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/server/lib/classes/cron.d/100-monitor_hd_quota.inc.php b/server/lib/classes/cron.d/100-monitor_hd_quota.inc.php index df2f2ce958..9a5fcf38d2 100644 --- a/server/lib/classes/cron.d/100-monitor_hd_quota.inc.php +++ b/server/lib/classes/cron.d/100-monitor_hd_quota.inc.php @@ -87,7 +87,7 @@ public function onRunJob() { //* ignore the first 5 lines, process the rest for ($i = 0; $i <= sizeof($df); $i++) { - if ($df[$i] != '') { + if (isset($df[$i]) && $df[$i] != '') { //* Make a array of the data $s1 = preg_split('/[\s]+/', $df[$i]); $s2 = preg_split('/\//', $s1[1]); @@ -108,7 +108,7 @@ public function onRunJob() { //* ignore the first 5 lines, process the rest for ($i = 0; $i <= sizeof($df); $i++) { - if ($df[$i] != '') { + if (isset($df[$i]) && $df[$i] != '') { //* Make a array of the data $s1 = preg_split('/[\s]+/', $df[$i]); $s2 = preg_split('/\//', $s1[1]); @@ -137,7 +137,7 @@ public function onRunJob() { //* ignore the first 5 lines, process the rest for ($i = 5; $i <= sizeof($df); $i++) { - if ($df[$i] != '') { + if (isset($df[$i]) && $df[$i] != '') { //* Make a array of the data $s = preg_split('/[\s]+/', $df[$i]); $username = $s[0]; @@ -165,7 +165,7 @@ public function onRunJob() { //* ignore the first 5 lines, process the rest for ($i = 5; $i <= sizeof($df); $i++) { - if ($df[$i] != '') { + if (isset($df[$i]) && $df[$i] != '') { //* Make a array of the data $s = preg_split('/[\s]+/', $df[$i]); $groupname = $s[0]; From 925dac26bbfd685b5e9db1a56376f3a65a5362c5 Mon Sep 17 00:00:00 2001 From: Tom Date: Fri, 14 Apr 2023 14:13:59 +0200 Subject: [PATCH 102/621] Fix db field operator, #6480 --- interface/web/sites/list/database.list.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/interface/web/sites/list/database.list.php b/interface/web/sites/list/database.list.php index 25e1b8de7f..853cd0ab9c 100644 --- a/interface/web/sites/list/database.list.php +++ b/interface/web/sites/list/database.list.php @@ -103,9 +103,9 @@ $liste["item"][] = array( 'field' => "server_id", 'datatype' => "INTEGER", 'formtype' => "SELECT", - 'op' => "like", - 'prefix' => "%", - 'suffix' => "%", + 'op' => "=", + 'prefix' => "", + 'suffix' => "", 'datasource' => array ( 'type' => 'SQL', 'querystring' => 'SELECT a.server_id, a.server_name FROM server a, web_database b WHERE (a.server_id = b.server_id) AND ({AUTHSQL-B}) ORDER BY a.server_name', 'keyfield'=> 'server_id', From 2bbbc5d8557510997ee0b6dc43e810d5b820da0c Mon Sep 17 00:00:00 2001 From: Herman van Rink Date: Sun, 16 Apr 2023 23:24:02 +0200 Subject: [PATCH 103/621] Fix db field operator in all other list files, #6480 --- interface/web/admin/list/firewall.list.php | 8 ++++---- interface/web/admin/list/remote_user.list.php | 2 +- interface/web/client/list/domain.list.php | 2 +- interface/web/dns/list/dns_a.list.php | 8 ++++---- interface/web/dns/list/dns_slave.list.php | 8 ++++---- interface/web/dns/list/dns_soa.list.php | 8 ++++---- interface/web/help/list/support_message.list.php | 2 +- interface/web/mail/list/mail_blacklist.list.php | 8 ++++---- .../web/mail/list/mail_content_filter.list.php | 8 ++++---- interface/web/mail/list/mail_domain.list.php | 2 +- interface/web/mail/list/mail_get.list.php | 8 ++++---- .../web/mail/list/mail_relay_domain.list.php | 8 ++++---- .../web/mail/list/mail_relay_recipient.list.php | 8 ++++---- interface/web/mail/list/mail_spamfilter.list.php | 8 ++++---- interface/web/mail/list/mail_transport.list.php | 8 ++++---- interface/web/mail/list/mail_whitelist.list.php | 8 ++++---- .../web/mail/list/spamfilter_blacklist.list.php | 8 ++++---- .../web/mail/list/spamfilter_users.list.php | 16 ++++++++-------- .../web/mail/list/spamfilter_whitelist.list.php | 16 ++++++++-------- interface/web/mail/list/xmpp_domain.list.php | 2 +- interface/web/sites/list/cron.list.php | 10 +++++----- interface/web/sites/list/database.list.php | 2 +- interface/web/sites/list/ftp_user.list.php | 8 ++++---- interface/web/sites/list/shell_user.list.php | 10 +++++----- .../web/sites/list/web_childdomain.list.php | 6 +++--- interface/web/sites/list/web_folder.list.php | 10 +++++----- .../web/sites/list/web_folder_user.list.php | 2 +- interface/web/sites/list/webdav_user.list.php | 10 +++++----- interface/web/vm/list/openvz_ip.list.php | 8 ++++---- interface/web/vm/list/openvz_ostemplate.list.php | 4 ++-- interface/web/vm/list/openvz_vm.list.php | 4 ++-- 31 files changed, 110 insertions(+), 110 deletions(-) diff --git a/interface/web/admin/list/firewall.list.php b/interface/web/admin/list/firewall.list.php index 884779110a..4835cb9d4a 100644 --- a/interface/web/admin/list/firewall.list.php +++ b/interface/web/admin/list/firewall.list.php @@ -57,11 +57,11 @@ 'value' => array('y' => $app->lng('yes_txt'), 'n' => $app->lng('no_txt'))); $liste["item"][] = array( 'field' => "server_id", - 'datatype' => "VARCHAR", + 'datatype' => "INTEGER", 'formtype' => "SELECT", - 'op' => "like", - 'prefix' => "%", - 'suffix' => "%", + 'op' => "=", + 'prefix' => "", + 'suffix' => "", 'datasource' => array ( 'type' => 'SQL', 'querystring' => 'SELECT server_id,server_name FROM server WHERE {AUTHSQL} ORDER BY server_name', 'keyfield'=> 'server_id', diff --git a/interface/web/admin/list/remote_user.list.php b/interface/web/admin/list/remote_user.list.php index 7dc0fbf430..de11f0d9a1 100644 --- a/interface/web/admin/list/remote_user.list.php +++ b/interface/web/admin/list/remote_user.list.php @@ -35,7 +35,7 @@ $liste['item'][] = array( 'field' => 'remote_userid', - 'datatype' => 'VARCHAR', + 'datatype' => 'INTEGER', 'formtype' => 'SELECT', 'op' => '=', 'prefix' => '', diff --git a/interface/web/client/list/domain.list.php b/interface/web/client/list/domain.list.php index 8fc81eeef9..c156d857c3 100644 --- a/interface/web/client/list/domain.list.php +++ b/interface/web/client/list/domain.list.php @@ -86,7 +86,7 @@ 'value' => ""); $liste["item"][] = array( 'field' => "sys_groupid", - 'datatype' => "VARCHAR", + 'datatype' => "INTEGER", 'formtype' => "SELECT", 'op' => "=", 'prefix' => "", diff --git a/interface/web/dns/list/dns_a.list.php b/interface/web/dns/list/dns_a.list.php index 169ec4af06..ad21dce219 100644 --- a/interface/web/dns/list/dns_a.list.php +++ b/interface/web/dns/list/dns_a.list.php @@ -59,11 +59,11 @@ $liste["item"][] = array( 'field' => "server_id", - 'datatype' => "VARCHAR", + 'datatype' => "INTEGER", 'formtype' => "SELECT", - 'op' => "like", - 'prefix' => "%", - 'suffix' => "%", + 'op' => "=", + 'prefix' => "", + 'suffix' => "", 'datasource' => array ( 'type' => 'SQL', 'querystring' => 'SELECT server_id,server_name FROM server WHERE {AUTHSQL} ORDER BY server_name', 'keyfield'=> 'server_id', diff --git a/interface/web/dns/list/dns_slave.list.php b/interface/web/dns/list/dns_slave.list.php index de0fd3a211..0483373c08 100644 --- a/interface/web/dns/list/dns_slave.list.php +++ b/interface/web/dns/list/dns_slave.list.php @@ -63,11 +63,11 @@ $liste["item"][] = array( 'field' => "server_id", - 'datatype' => "VARCHAR", + 'datatype' => "INTEGER", 'formtype' => "SELECT", - 'op' => "like", - 'prefix' => "%", - 'suffix' => "%", + 'op' => "=", + 'prefix' => "", + 'suffix' => "", 'datasource'=> array ( 'type' => 'CUSTOM', 'class' => 'custom_datasource', 'function' => 'slave_dns_servers' diff --git a/interface/web/dns/list/dns_soa.list.php b/interface/web/dns/list/dns_soa.list.php index d992a12d59..4eb1adb593 100644 --- a/interface/web/dns/list/dns_soa.list.php +++ b/interface/web/dns/list/dns_soa.list.php @@ -73,11 +73,11 @@ $liste["item"][] = array( 'field' => "server_id", - 'datatype' => "VARCHAR", + 'datatype' => "INTEGER", 'formtype' => "SELECT", - 'op' => "like", - 'prefix' => "%", - 'suffix' => "%", + 'op' => "=", + 'prefix' => "", + 'suffix' => "", 'datasource' => array ( 'type' => 'CUSTOM', 'class'=> 'custom_datasource', 'function'=> 'dns_servers' diff --git a/interface/web/help/list/support_message.list.php b/interface/web/help/list/support_message.list.php index efb24322e7..d92160eb35 100644 --- a/interface/web/help/list/support_message.list.php +++ b/interface/web/help/list/support_message.list.php @@ -36,7 +36,7 @@ *****************************************************/ $liste['item'][] = array( 'field' => 'sender_id', - 'datatype' => 'VARCHAR', + 'datatype' => 'INTEGER', 'formtype' => 'SELECT', 'op' => '=', 'prefix' => '', diff --git a/interface/web/mail/list/mail_blacklist.list.php b/interface/web/mail/list/mail_blacklist.list.php index d51f31a7d8..bd6403092e 100644 --- a/interface/web/mail/list/mail_blacklist.list.php +++ b/interface/web/mail/list/mail_blacklist.list.php @@ -59,11 +59,11 @@ $liste["item"][] = array( 'field' => "server_id", - 'datatype' => "VARCHAR", + 'datatype' => "INTEGER", 'formtype' => "SELECT", - 'op' => "like", - 'prefix' => "%", - 'suffix' => "%", + 'op' => "=", + 'prefix' => "", + 'suffix' => "", 'datasource' => array ( 'type' => 'SQL', 'querystring' => 'SELECT server_id,server_name FROM server WHERE {AUTHSQL} AND mirror_server_id = 0 ORDER BY server_name', 'keyfield'=> 'server_id', diff --git a/interface/web/mail/list/mail_content_filter.list.php b/interface/web/mail/list/mail_content_filter.list.php index 53767a153c..b5c1e09690 100644 --- a/interface/web/mail/list/mail_content_filter.list.php +++ b/interface/web/mail/list/mail_content_filter.list.php @@ -60,11 +60,11 @@ $liste["item"][] = array( 'field' => "server_id", - 'datatype' => "VARCHAR", + 'datatype' => "INTEGER", 'formtype' => "SELECT", - 'op' => "like", - 'prefix' => "%", - 'suffix' => "%", + 'op' => "=", + 'prefix' => "", + 'suffix' => "", 'datasource' => array ( 'type' => 'SQL', 'querystring' => 'SELECT server_id,server_name FROM server WHERE {AUTHSQL} AND mirror_server_id = 0 ORDER BY server_name', 'keyfield'=> 'server_id', diff --git a/interface/web/mail/list/mail_domain.list.php b/interface/web/mail/list/mail_domain.list.php index 5304ab6226..dd6067bb3c 100644 --- a/interface/web/mail/list/mail_domain.list.php +++ b/interface/web/mail/list/mail_domain.list.php @@ -83,7 +83,7 @@ $liste["item"][] = array( 'field' => "server_id", 'datatype' => "INTEGER", 'formtype' => "SELECT", - 'op' => "like", + 'op' => "=", 'prefix' => "", 'suffix' => "", 'datasource' => array ( 'type' => 'SQL', diff --git a/interface/web/mail/list/mail_get.list.php b/interface/web/mail/list/mail_get.list.php index 0a8c0dcc88..71f5fd16fd 100644 --- a/interface/web/mail/list/mail_get.list.php +++ b/interface/web/mail/list/mail_get.list.php @@ -58,11 +58,11 @@ $liste["item"][] = array( 'field' => "server_id", - 'datatype' => "VARCHAR", + 'datatype' => "INTEGER", 'formtype' => "SELECT", - 'op' => "like", - 'prefix' => "%", - 'suffix' => "%", + 'op' => "=", + 'prefix' => "", + 'suffix' => "", 'datasource' => array ( 'type' => 'SQL', 'querystring' => 'SELECT server_id,server_name FROM server WHERE {AUTHSQL} AND mirror_server_id = 0 ORDER BY server_name', 'keyfield'=> 'server_id', diff --git a/interface/web/mail/list/mail_relay_domain.list.php b/interface/web/mail/list/mail_relay_domain.list.php index a6ff783482..70b744d004 100644 --- a/interface/web/mail/list/mail_relay_domain.list.php +++ b/interface/web/mail/list/mail_relay_domain.list.php @@ -86,11 +86,11 @@ $liste["item"][] = array( 'field' => "server_id", - 'datatype' => "VARCHAR", + 'datatype' => "INTEGER", 'formtype' => "SELECT", - 'op' => "like", - 'prefix' => "%", - 'suffix' => "%", + 'op' => "=", + 'prefix' => "", + 'suffix' => "", 'datasource' => array ( 'type' => 'SQL', 'querystring' => 'SELECT server_id,server_name FROM server WHERE {AUTHSQL} AND mirror_server_id = 0 ORDER BY server_name', 'keyfield'=> 'server_id', diff --git a/interface/web/mail/list/mail_relay_recipient.list.php b/interface/web/mail/list/mail_relay_recipient.list.php index af00d7c90c..e26a9a632c 100644 --- a/interface/web/mail/list/mail_relay_recipient.list.php +++ b/interface/web/mail/list/mail_relay_recipient.list.php @@ -58,11 +58,11 @@ $liste["item"][] = array( 'field' => "server_id", - 'datatype' => "VARCHAR", + 'datatype' => "INTEGER", 'formtype' => "SELECT", - 'op' => "like", - 'prefix' => "%", - 'suffix' => "%", + 'op' => "=", + 'prefix' => "", + 'suffix' => "", 'datasource' => array ( 'type' => 'SQL', 'querystring' => 'SELECT server_id,server_name FROM server WHERE {AUTHSQL} AND mirror_server_id = 0 ORDER BY server_name', 'keyfield'=> 'server_id', diff --git a/interface/web/mail/list/mail_spamfilter.list.php b/interface/web/mail/list/mail_spamfilter.list.php index 09d3292bc7..5203a81515 100644 --- a/interface/web/mail/list/mail_spamfilter.list.php +++ b/interface/web/mail/list/mail_spamfilter.list.php @@ -58,11 +58,11 @@ $liste["item"][] = array( 'field' => "server_id", - 'datatype' => "VARCHAR", + 'datatype' => "INTEGER", 'formtype' => "SELECT", - 'op' => "like", - 'prefix' => "%", - 'suffix' => "%", + 'op' => "=", + 'prefix' => "", + 'suffix' => "", 'datasource' => array ( 'type' => 'SQL', 'querystring' => 'SELECT server_id,server_name FROM server WHERE {AUTHSQL} AND mirror_server_id = 0 ORDER BY server_name', 'keyfield'=> 'server_id', diff --git a/interface/web/mail/list/mail_transport.list.php b/interface/web/mail/list/mail_transport.list.php index 3dd87e1710..a88676ba4a 100644 --- a/interface/web/mail/list/mail_transport.list.php +++ b/interface/web/mail/list/mail_transport.list.php @@ -59,11 +59,11 @@ $liste["item"][] = array( 'field' => "server_id", - 'datatype' => "VARCHAR", + 'datatype' => "INTEGER", 'formtype' => "SELECT", - 'op' => "like", - 'prefix' => "%", - 'suffix' => "%", + 'op' => "=", + 'prefix' => "", + 'suffix' => "", 'datasource' => array ( 'type' => 'SQL', 'querystring' => 'SELECT server_id,server_name FROM server WHERE {AUTHSQL} AND mirror_server_id = 0 ORDER BY server_name', 'keyfield'=> 'server_id', diff --git a/interface/web/mail/list/mail_whitelist.list.php b/interface/web/mail/list/mail_whitelist.list.php index b4c97f493f..f6aace0b74 100644 --- a/interface/web/mail/list/mail_whitelist.list.php +++ b/interface/web/mail/list/mail_whitelist.list.php @@ -58,11 +58,11 @@ $liste["item"][] = array( 'field' => "server_id", - 'datatype' => "VARCHAR", + 'datatype' => "INTEGER", 'formtype' => "SELECT", - 'op' => "like", - 'prefix' => "%", - 'suffix' => "%", + 'op' => "=", + 'prefix' => "", + 'suffix' => "", 'datasource' => array ( 'type' => 'SQL', 'querystring' => 'SELECT server_id,server_name FROM server WHERE {AUTHSQL} AND mirror_server_id = 0 ORDER BY server_name', 'keyfield'=> 'server_id', diff --git a/interface/web/mail/list/spamfilter_blacklist.list.php b/interface/web/mail/list/spamfilter_blacklist.list.php index 33e0b433a3..b873c88796 100644 --- a/interface/web/mail/list/spamfilter_blacklist.list.php +++ b/interface/web/mail/list/spamfilter_blacklist.list.php @@ -58,11 +58,11 @@ $liste["item"][] = array( 'field' => "server_id", - 'datatype' => "VARCHAR", + 'datatype' => "INTEGER", 'formtype' => "SELECT", - 'op' => "like", - 'prefix' => "%", - 'suffix' => "%", + 'op' => "=", + 'prefix' => "", + 'suffix' => "", 'datasource' => array ( 'type' => 'SQL', 'querystring' => 'SELECT server_id,server_name FROM server WHERE {AUTHSQL} AND mirror_server_id = 0 ORDER BY server_name', 'keyfield'=> 'server_id', diff --git a/interface/web/mail/list/spamfilter_users.list.php b/interface/web/mail/list/spamfilter_users.list.php index d952640283..9279f05c46 100644 --- a/interface/web/mail/list/spamfilter_users.list.php +++ b/interface/web/mail/list/spamfilter_users.list.php @@ -58,11 +58,11 @@ $liste["item"][] = array( 'field' => "server_id", - 'datatype' => "VARCHAR", + 'datatype' => "INTEGER", 'formtype' => "SELECT", - 'op' => "like", - 'prefix' => "%", - 'suffix' => "%", + 'op' => "=", + 'prefix' => "", + 'suffix' => "", 'datasource' => array ( 'type' => 'SQL', 'querystring' => 'SELECT server_id,server_name FROM server WHERE {AUTHSQL} AND mirror_server_id = 0 ORDER BY server_name', 'keyfield'=> 'server_id', @@ -82,11 +82,11 @@ 'value' => array(1 => 1, 2 => 2, 3 => 3, 4 => 4, 5 => 5, 6 => 6, 7 => 7, 8 => 8, 9 => 9, 10 => 10)); $liste["item"][] = array( 'field' => "policy_id", - 'datatype' => "VARCHAR", + 'datatype' => "INTEGER", 'formtype' => "SELECT", - 'op' => "like", - 'prefix' => "%", - 'suffix' => "%", + 'op' => "=", + 'prefix' => "", + 'suffix' => "", 'datasource' => array ( 'type' => 'SQL', 'querystring' => 'SELECT id,policy_name FROM spamfilter_policy WHERE {AUTHSQL} ORDER BY policy_name', 'keyfield'=> 'id', diff --git a/interface/web/mail/list/spamfilter_whitelist.list.php b/interface/web/mail/list/spamfilter_whitelist.list.php index 0cd3333e69..d85ffc1914 100644 --- a/interface/web/mail/list/spamfilter_whitelist.list.php +++ b/interface/web/mail/list/spamfilter_whitelist.list.php @@ -58,11 +58,11 @@ $liste["item"][] = array( 'field' => "server_id", - 'datatype' => "VARCHAR", + 'datatype' => "INTEGER", 'formtype' => "SELECT", - 'op' => "like", - 'prefix' => "%", - 'suffix' => "%", + 'op' => "=", + 'prefix' => "", + 'suffix' => "", 'datasource' => array ( 'type' => 'SQL', 'querystring' => 'SELECT server_id,server_name FROM server WHERE {AUTHSQL} AND mirror_server_id = 0 ORDER BY server_name', 'keyfield'=> 'server_id', @@ -82,11 +82,11 @@ 'value' => array(1 => 1, 2 => 2, 3 => 3, 4 => 4, 5 => 5, 6 => 6, 7 => 7, 8 => 8, 9 => 9, 10 => 10)); $liste["item"][] = array( 'field' => "rid", - 'datatype' => "VARCHAR", + 'datatype' => "INTEGER", 'formtype' => "SELECT", - 'op' => "like", - 'prefix' => "%", - 'suffix' => "%", + 'op' => "=", + 'prefix' => "", + 'suffix' => "", 'datasource' => array ( 'type' => 'SQL', 'querystring' => 'SELECT id,email FROM spamfilter_users WHERE {AUTHSQL} ORDER BY email', 'keyfield'=> 'id', diff --git a/interface/web/mail/list/xmpp_domain.list.php b/interface/web/mail/list/xmpp_domain.list.php index 191508db39..f0a29a043b 100644 --- a/interface/web/mail/list/xmpp_domain.list.php +++ b/interface/web/mail/list/xmpp_domain.list.php @@ -82,7 +82,7 @@ $liste["item"][] = array( 'field' => "server_id", 'datatype' => "INTEGER", 'formtype' => "SELECT", - 'op' => "like", + 'op' => "=", 'prefix' => "", 'suffix' => "", 'datasource' => array ( 'type' => 'SQL', diff --git a/interface/web/sites/list/cron.list.php b/interface/web/sites/list/cron.list.php index fc8c9691a6..ac5513ad9a 100644 --- a/interface/web/sites/list/cron.list.php +++ b/interface/web/sites/list/cron.list.php @@ -59,11 +59,11 @@ $liste["item"][] = array( 'field' => "server_id", - 'datatype' => "VARCHAR", + 'datatype' => "INTEGER", 'formtype' => "SELECT", - 'op' => "like", - 'prefix' => "%", - 'suffix' => "%", + 'op' => "=", + 'prefix' => "", + 'suffix' => "", 'datasource' => array ( 'type' => 'SQL', 'querystring' => 'SELECT server_id,server_name FROM server WHERE {AUTHSQL} AND mirror_server_id = 0 ORDER BY server_name', 'keyfield'=> 'server_id', @@ -73,7 +73,7 @@ 'value' => ""); $liste["item"][] = array( 'field' => "parent_domain_id", - 'datatype' => "VARCHAR", + 'datatype' => "INTEGER", 'formtype' => "SELECT", 'op' => "=", 'prefix' => "", diff --git a/interface/web/sites/list/database.list.php b/interface/web/sites/list/database.list.php index 853cd0ab9c..438837ffc9 100644 --- a/interface/web/sites/list/database.list.php +++ b/interface/web/sites/list/database.list.php @@ -115,7 +115,7 @@ 'value' => ""); $liste["item"][] = array( 'field' => "parent_domain_id", - 'datatype' => "VARCHAR", + 'datatype' => "INTEGER", 'filters' => array( 0 => array( 'event' => 'SHOW', 'type' => 'IDNTOUTF8') ), diff --git a/interface/web/sites/list/ftp_user.list.php b/interface/web/sites/list/ftp_user.list.php index 20a8a327ac..d754ac07a5 100644 --- a/interface/web/sites/list/ftp_user.list.php +++ b/interface/web/sites/list/ftp_user.list.php @@ -61,9 +61,9 @@ $liste["item"][] = array( 'field' => "server_id", 'datatype' => "INTEGER", 'formtype' => "SELECT", - 'op' => "like", - 'prefix' => "%", - 'suffix' => "%", + 'op' => "=", + 'prefix' => "", + 'suffix' => "", 'datasource' => array ( 'type' => 'SQL', 'querystring' => 'SELECT a.server_id, a.server_name FROM server a, ftp_user b WHERE (a.server_id = b.server_id) AND ({AUTHSQL-B}) ORDER BY a.server_name', 'keyfield'=> 'server_id', @@ -73,7 +73,7 @@ 'value' => ""); $liste["item"][] = array( 'field' => "parent_domain_id", - 'datatype' => "VARCHAR", + 'datatype' => "INTEGER", 'filters' => array( 0 => array( 'event' => 'SHOW', 'type' => 'IDNTOUTF8') ), diff --git a/interface/web/sites/list/shell_user.list.php b/interface/web/sites/list/shell_user.list.php index 3f51082d6e..08fa344d85 100644 --- a/interface/web/sites/list/shell_user.list.php +++ b/interface/web/sites/list/shell_user.list.php @@ -59,11 +59,11 @@ $liste["item"][] = array( 'field' => "server_id", - 'datatype' => "VARCHAR", + 'datatype' => "INTEGER", 'formtype' => "SELECT", - 'op' => "like", - 'prefix' => "%", - 'suffix' => "%", + 'op' => "=", + 'prefix' => "", + 'suffix' => "", 'datasource' => array ( 'type' => 'SQL', 'querystring' => 'SELECT server_id,server_name FROM server WHERE {AUTHSQL} AND mirror_server_id = 0 ORDER BY server_name', 'keyfield'=> 'server_id', @@ -73,7 +73,7 @@ 'value' => ""); $liste["item"][] = array( 'field' => "parent_domain_id", - 'datatype' => "VARCHAR", + 'datatype' => "INTEGER", 'filters' => array( 0 => array( 'event' => 'SHOW', 'type' => 'IDNTOUTF8') ), diff --git a/interface/web/sites/list/web_childdomain.list.php b/interface/web/sites/list/web_childdomain.list.php index 202744e8de..c9760662d7 100644 --- a/interface/web/sites/list/web_childdomain.list.php +++ b/interface/web/sites/list/web_childdomain.list.php @@ -61,9 +61,9 @@ $liste["item"][] = array( 'field' => "server_id", 'datatype' => "INTEGER", 'formtype' => "SELECT", - 'op' => "like", - 'prefix' => "%", - 'suffix' => "%", + 'op' => "=", + 'prefix' => "", + 'suffix' => "", 'datasource' => array ( 'type' => 'SQL', 'querystring' => 'SELECT a.server_id, a.server_name FROM server a, web_domain b WHERE (a.server_id = b.server_id) AND ({AUTHSQL-B}) ORDER BY a.server_name', 'keyfield'=> 'server_id', diff --git a/interface/web/sites/list/web_folder.list.php b/interface/web/sites/list/web_folder.list.php index dc2fb0418a..c881bfc948 100644 --- a/interface/web/sites/list/web_folder.list.php +++ b/interface/web/sites/list/web_folder.list.php @@ -59,11 +59,11 @@ $liste["item"][] = array( 'field' => "server_id", - 'datatype' => "VARCHAR", + 'datatype' => "INTEGER", 'formtype' => "SELECT", - 'op' => "like", - 'prefix' => "%", - 'suffix' => "%", + 'op' => "=", + 'prefix' => "", + 'suffix' => "", 'datasource' => array ( 'type' => 'SQL', 'querystring' => 'SELECT server_id,server_name FROM server WHERE {AUTHSQL} AND mirror_server_id = 0 ORDER BY server_name', 'keyfield'=> 'server_id', @@ -73,7 +73,7 @@ 'value' => ""); $liste["item"][] = array( 'field' => "parent_domain_id", - 'datatype' => "VARCHAR", + 'datatype' => "INTEGER", 'filters' => array( 0 => array( 'event' => 'SHOW', 'type' => 'IDNTOUTF8') ), diff --git a/interface/web/sites/list/web_folder_user.list.php b/interface/web/sites/list/web_folder_user.list.php index f0a1cd8ad2..a6f50fa2a4 100644 --- a/interface/web/sites/list/web_folder_user.list.php +++ b/interface/web/sites/list/web_folder_user.list.php @@ -61,7 +61,7 @@ $liste["item"][] = array( 'field' => "web_folder_id", - 'datatype' => "VARCHAR", + 'datatype' => "INTEGER", 'filters' => array( 0 => array( 'event' => 'SHOW', 'type' => 'IDNTOUTF8') ), diff --git a/interface/web/sites/list/webdav_user.list.php b/interface/web/sites/list/webdav_user.list.php index 04b772d156..66e8a221a0 100644 --- a/interface/web/sites/list/webdav_user.list.php +++ b/interface/web/sites/list/webdav_user.list.php @@ -59,11 +59,11 @@ $liste["item"][] = array( 'field' => "server_id", - 'datatype' => "VARCHAR", + 'datatype' => "INTEGER", 'formtype' => "SELECT", - 'op' => "like", - 'prefix' => "%", - 'suffix' => "%", + 'op' => "=", + 'prefix' => "", + 'suffix' => "", 'datasource' => array ( 'type' => 'SQL', 'querystring' => 'SELECT server_id,server_name FROM server WHERE {AUTHSQL} and mirror_server_id = 0 ORDER BY server_name', 'keyfield'=> 'server_id', @@ -73,7 +73,7 @@ 'value' => ""); $liste["item"][] = array( 'field' => "parent_domain_id", - 'datatype' => "VARCHAR", + 'datatype' => "INTEGER", 'formtype' => "SELECT", 'op' => "=", 'prefix' => "", diff --git a/interface/web/vm/list/openvz_ip.list.php b/interface/web/vm/list/openvz_ip.list.php index 80869918ad..b5decae51e 100644 --- a/interface/web/vm/list/openvz_ip.list.php +++ b/interface/web/vm/list/openvz_ip.list.php @@ -48,9 +48,9 @@ *****************************************************/ $liste["item"][] = array( 'field' => "server_id", - 'datatype' => "VARCHAR", + 'datatype' => "INTEGER", 'formtype' => "SELECT", - 'op' => "like", + 'op' => "=", 'prefix' => "", 'suffix' => "", 'datasource' => array ( 'type' => 'SQL', @@ -62,9 +62,9 @@ 'value' => ""); $liste["item"][] = array( 'field' => "vm_id", - 'datatype' => "VARCHAR", + 'datatype' => "INTEGER", 'formtype' => "SELECT", - 'op' => "like", + 'op' => "=", 'prefix' => "", 'suffix' => "", 'datasource' => array ( 'type' => 'SQL', diff --git a/interface/web/vm/list/openvz_ostemplate.list.php b/interface/web/vm/list/openvz_ostemplate.list.php index c2df7eb386..036f0b855e 100644 --- a/interface/web/vm/list/openvz_ostemplate.list.php +++ b/interface/web/vm/list/openvz_ostemplate.list.php @@ -76,9 +76,9 @@ 'value' => ""); $liste["item"][] = array( 'field' => "server_id", - 'datatype' => "VARCHAR", + 'datatype' => "INTEGER", 'formtype' => "SELECT", - 'op' => "like", + 'op' => "=", 'prefix' => "", 'suffix' => "", 'datasource' => array ( 'type' => 'SQL', diff --git a/interface/web/vm/list/openvz_vm.list.php b/interface/web/vm/list/openvz_vm.list.php index 261427491b..894d1bc6b9 100644 --- a/interface/web/vm/list/openvz_vm.list.php +++ b/interface/web/vm/list/openvz_vm.list.php @@ -66,9 +66,9 @@ 'value' => ""); $liste["item"][] = array( 'field' => "server_id", - 'datatype' => "VARCHAR", + 'datatype' => "INTEGER", 'formtype' => "SELECT", - 'op' => "like", + 'op' => "=", 'prefix' => "", 'suffix' => "", 'datasource' => array ( 'type' => 'SQL', From 9a2aeb590bb74a0f1d75638939fa67401a3a1c0b Mon Sep 17 00:00:00 2001 From: Herman van Rink Date: Mon, 17 Apr 2023 21:02:42 +0200 Subject: [PATCH 104/621] Treat tmpdir as a directory, #6472 --- server/lib/classes/functions.inc.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/lib/classes/functions.inc.php b/server/lib/classes/functions.inc.php index 34e5943cda..daf45b875b 100644 --- a/server/lib/classes/functions.inc.php +++ b/server/lib/classes/functions.inc.php @@ -470,14 +470,14 @@ public function generate_ssh_key($client_id, $username = ''){ // generate the SSH key pair for the client $app->system->exec_safe('mktemp -dt id_rsa.XXXXXXXX'); $tmpdir = $app->system->last_exec_out(); - $id_rsa_file = $tmpdir . uniqid('',true); + $id_rsa_file = $tmpdir[0] '/' . uniqid('',true); $id_rsa_pub_file = $id_rsa_file.'.pub'; if(file_exists($id_rsa_file)) unset($id_rsa_file); if(file_exists($id_rsa_pub_file)) unset($id_rsa_pub_file); if(!file_exists($id_rsa_file) && !file_exists($id_rsa_pub_file)) { $app->system->exec_safe('ssh-keygen -t rsa -C ? -f ? -N ""', $username.'-rsa-key-'.time(), $id_rsa_file); $app->db->query("UPDATE client SET created_at = UNIX_TIMESTAMP(), id_rsa = ?, ssh_rsa = ? WHERE client_id = ?", $app->system->file_get_contents($id_rsa_file), $app->system->file_get_contents($id_rsa_pub_file), $client_id); - $app->system->rmdir($tmpdir, true); + $app->system->rmdir($tmpdir[0], true); } else { $app->log("Failed to create SSH keypair for ".$username, LOGLEVEL_WARN); } From cdff1de6630d7baab289bb2de6b6b6d15bb26f8a Mon Sep 17 00:00:00 2001 From: Herman van Rink Date: Mon, 17 Apr 2023 21:17:15 +0200 Subject: [PATCH 105/621] syntax fix --- server/lib/classes/functions.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/lib/classes/functions.inc.php b/server/lib/classes/functions.inc.php index daf45b875b..f7a44a82c0 100644 --- a/server/lib/classes/functions.inc.php +++ b/server/lib/classes/functions.inc.php @@ -470,7 +470,7 @@ public function generate_ssh_key($client_id, $username = ''){ // generate the SSH key pair for the client $app->system->exec_safe('mktemp -dt id_rsa.XXXXXXXX'); $tmpdir = $app->system->last_exec_out(); - $id_rsa_file = $tmpdir[0] '/' . uniqid('',true); + $id_rsa_file = $tmpdir[0] . '/' . uniqid('',true); $id_rsa_pub_file = $id_rsa_file.'.pub'; if(file_exists($id_rsa_file)) unset($id_rsa_file); if(file_exists($id_rsa_pub_file)) unset($id_rsa_pub_file); From ba4c321b79869531a3d347d66dca62d93a3baa8d Mon Sep 17 00:00:00 2001 From: Herman van Rink Date: Thu, 20 Apr 2023 22:50:26 +0200 Subject: [PATCH 106/621] Hide the info tab when creating a new client. --- interface/web/client/client_edit.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/interface/web/client/client_edit.php b/interface/web/client/client_edit.php index b1c96e0679..1e53bb1fed 100644 --- a/interface/web/client/client_edit.php +++ b/interface/web/client/client_edit.php @@ -70,6 +70,10 @@ function onShowNew() { } } + // Hide the info tab when creating a new client. + unset($app->tform->formDef["tabs"]['info']); + $app->tform->formDef["tab_default"] = "address"; + parent::onShowNew(); } From 1db06ade14dda3baa5cee85d1c7b44137764213e Mon Sep 17 00:00:00 2001 From: Herman van Rink Date: Fri, 21 Apr 2023 19:53:40 +0200 Subject: [PATCH 107/621] Remove duplicate query One was also without a placeholder --- server/plugins-available/shelluser_base_plugin.inc.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/server/plugins-available/shelluser_base_plugin.inc.php b/server/plugins-available/shelluser_base_plugin.inc.php index 7116092d0e..3e512caa56 100755 --- a/server/plugins-available/shelluser_base_plugin.inc.php +++ b/server/plugins-available/shelluser_base_plugin.inc.php @@ -336,13 +336,12 @@ function delete($event_name, $data) { // Get the UID of the user $userid = intval($app->system->getuid($data['old']['username'])); if($userid > $this->min_uid) { - $web = $app->db->queryOneRecord("SELECT * FROM web_domain WHERE domain_id = ".intval($data['old']['parent_domain_id'])); + $web = $app->db->queryOneRecord("SELECT * FROM web_domain WHERE domain_id = ?", $data['old']['parent_domain_id']); // check if we have to delete the dir $check = $app->db->queryOneRecord('SELECT shell_user_id FROM `shell_user` WHERE `dir` = ?', $data['old']['dir']); if(!$check && is_dir($data['old']['dir'])) { - $web = $app->db->queryOneRecord("SELECT * FROM web_domain WHERE domain_id = ?", $data['old']['parent_domain_id']); $app->system->web_folder_protection($web['document_root'], false); // delete dir From 1047d14ba0b4d03c2df63898f20d2ab6f8ba9465 Mon Sep 17 00:00:00 2001 From: Herman van Rink Date: Fri, 21 Apr 2023 22:42:57 +0200 Subject: [PATCH 108/621] Fix function default value, null fails the sub query --- interface/lib/classes/tools_sites.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interface/lib/classes/tools_sites.inc.php b/interface/lib/classes/tools_sites.inc.php index b2881f57cc..149a9fb67a 100644 --- a/interface/lib/classes/tools_sites.inc.php +++ b/interface/lib/classes/tools_sites.inc.php @@ -145,7 +145,7 @@ function convertClientName($name){ } /* TODO: rewrite SQL */ - function getDomainModuleDomains($not_used_in_table = null, $selected_domain = null) { + function getDomainModuleDomains($not_used_in_table = null, $selected_domain = '') { global $app; $sql = "SELECT domain_id, domain FROM domain WHERE"; From 349ed8a9ddb4915bde2cf31aff8be11dca158ffc Mon Sep 17 00:00:00 2001 From: Herman van Rink Date: Fri, 21 Apr 2023 22:43:23 +0200 Subject: [PATCH 109/621] remove invalid argument --- interface/web/dns/dns_wizard.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interface/web/dns/dns_wizard.php b/interface/web/dns/dns_wizard.php index 90e2fef1c4..defaad8618 100644 --- a/interface/web/dns/dns_wizard.php +++ b/interface/web/dns/dns_wizard.php @@ -196,7 +196,7 @@ /* * The domain-module is in use. */ - $domains = $app->tools_sites->getDomainModuleDomains("dns_soa", 'domain'); + $domains = $app->tools_sites->getDomainModuleDomains("dns_soa"); $domain_select = ""; if(is_array($domains) && sizeof($domains) > 0) { /* We have domains in the list, so create the drop-down-list */ From 03d007bf788f47d93c71c2d0036961e1cb6fa159 Mon Sep 17 00:00:00 2001 From: Herman van Rink Date: Fri, 21 Apr 2023 22:44:02 +0200 Subject: [PATCH 110/621] Pass the current domain to exclude it from teh filter --- interface/web/sites/web_childdomain_edit.php | 2 +- interface/web/sites/web_vhost_domain_edit.php | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/interface/web/sites/web_childdomain_edit.php b/interface/web/sites/web_childdomain_edit.php index 019057b3be..3f2726a040 100644 --- a/interface/web/sites/web_childdomain_edit.php +++ b/interface/web/sites/web_childdomain_edit.php @@ -105,7 +105,7 @@ function onShowEnd() { /* * The domain-module is in use. */ - $domains = $app->tools_sites->getDomainModuleDomains($this->_vhostdomain_type == 'subdomain' ? null : "web_domain"); + $domains = $app->tools_sites->getDomainModuleDomains($this->_vhostdomain_type == 'subdomain' ? null : "web_domain", $this->dataRecord['domain']); $domain_select = ""; $selected_domain = ''; if(is_array($domains) && sizeof($domains) > 0) { diff --git a/interface/web/sites/web_vhost_domain_edit.php b/interface/web/sites/web_vhost_domain_edit.php index 365582e9af..e9e1ef602e 100644 --- a/interface/web/sites/web_vhost_domain_edit.php +++ b/interface/web/sites/web_vhost_domain_edit.php @@ -694,7 +694,8 @@ function onShowEnd() { /* * The domain-module is in use. */ - $domains = $app->tools_sites->getDomainModuleDomains($this->_vhostdomain_type == 'subdomain' ? null : "web_domain"); + $domains = $app->tools_sites->getDomainModuleDomains($this->_vhostdomain_type == 'subdomain' ? null : "web_domain", $this->dataRecord['domain']); + $domain_select = ""; $selected_domain = ''; if(is_array($domains) && sizeof($domains) > 0) { From f02f15ef2c90191710d6c8c8c36ecc26ab7eb7e9 Mon Sep 17 00:00:00 2001 From: Herman van Rink Date: Fri, 21 Apr 2023 22:51:47 +0200 Subject: [PATCH 111/621] Fix a null value passed in by the create new forms, which lack an id. --- interface/lib/classes/tools_sites.inc.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/interface/lib/classes/tools_sites.inc.php b/interface/lib/classes/tools_sites.inc.php index 149a9fb67a..4ff2b4c75c 100644 --- a/interface/lib/classes/tools_sites.inc.php +++ b/interface/lib/classes/tools_sites.inc.php @@ -148,6 +148,10 @@ function convertClientName($name){ function getDomainModuleDomains($not_used_in_table = null, $selected_domain = '') { global $app; + // Fix a null value passed in by the create new forms, which lack an id. + if ($selected_domain == null) { + $selected_domain = ''; + } $sql = "SELECT domain_id, domain FROM domain WHERE"; if ($not_used_in_table) { if (strpos($not_used_in_table, 'dns') !== false) { From c020076804d8a212006a7bf3cb4e71030d773913 Mon Sep 17 00:00:00 2001 From: Herman van Rink Date: Thu, 20 Apr 2023 22:57:27 +0200 Subject: [PATCH 112/621] Deprecate ICQ, #6493 --- interface/web/client/form/client.tform.php | 1 + interface/web/client/templates/client_edit_address.htm | 3 --- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/interface/web/client/form/client.tform.php b/interface/web/client/form/client.tform.php index c6d05f9eb3..aaf7dd3be2 100644 --- a/interface/web/client/form/client.tform.php +++ b/interface/web/client/form/client.tform.php @@ -422,6 +422,7 @@ 'cols' => '', 'searchable' => 2 ), + // Deprecated 'icq' => array ( 'datatype' => 'VARCHAR', 'formtype' => 'TEXT', diff --git a/interface/web/client/templates/client_edit_address.htm b/interface/web/client/templates/client_edit_address.htm index 835b264400..cc43e489dd 100644 --- a/interface/web/client/templates/client_edit_address.htm +++ b/interface/web/client/templates/client_edit_address.htm @@ -93,9 +93,6 @@
-
- -
From 69a9295a8768ed3d07117a49318fb57cb788decb Mon Sep 17 00:00:00 2001 From: Herman van Rink Date: Thu, 20 Apr 2023 22:59:55 +0200 Subject: [PATCH 113/621] Move the email field higher up on the client form, #6494 --- interface/web/client/templates/client_edit_address.htm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/interface/web/client/templates/client_edit_address.htm b/interface/web/client/templates/client_edit_address.htm index 835b264400..7e611d8ac0 100644 --- a/interface/web/client/templates/client_edit_address.htm +++ b/interface/web/client/templates/client_edit_address.htm @@ -48,6 +48,9 @@
+
+ +
-
- -
From 90aee5ce47306de128ad148cf0fabc70c0703a76 Mon Sep 17 00:00:00 2001 From: Adam Date: Sun, 23 Apr 2023 10:27:47 +0000 Subject: [PATCH 114/621] Move dns wizard function to class --- interface/lib/classes/dns_wizard.inc.php | 297 +++++++++++++++++++++ interface/lib/classes/remote.d/dns.inc.php | 156 ++--------- interface/web/dns/dns_wizard.php | 238 +---------------- 3 files changed, 328 insertions(+), 363 deletions(-) create mode 100644 interface/lib/classes/dns_wizard.inc.php diff --git a/interface/lib/classes/dns_wizard.inc.php b/interface/lib/classes/dns_wizard.inc.php new file mode 100644 index 0000000000..10c6eae473 --- /dev/null +++ b/interface/lib/classes/dns_wizard.inc.php @@ -0,0 +1,297 @@ + +All rights reserved. + +Copyright (c) 2008, Till Brehm, projektfarm Gmbh +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of ISPConfig nor the names of its contributors + may be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, +INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, +EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +class dns_wizard +{ + function create(array $data) + { + global $app; + $app->uses('getconf'); + + // get the correct server_id + if (isset($data['server_id'])) { + $server_id = $app->functions->intval($data['server_id']); + $post_server_id = true; + } elseif (isset($data['server_id_value'])) { + $server_id = $app->functions->intval($data['server_id_value']); + $post_server_id = true; + } else { + $settings = $app->getconf->get_global_config('dns'); + $server_id = $app->functions->intval($settings['default_dnsserver']); + $post_server_id = false; + } + + $error = ''; + + if ($post_server_id) + { + $client_group_id = $app->functions->intval($_SESSION["s"]["user"]["default_group"]); + $client = $app->db->queryOneRecord("SELECT dns_servers FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = ?", $client_group_id); + + $client['dns_servers_ids'] = explode(',', $client['dns_servers']); + + // Check if chosen server is in authorized servers for this client + if (!(is_array($client['dns_servers_ids']) && in_array($server_id, $client['dns_servers_ids'])) && $_SESSION["s"]["user"]["typ"] != 'admin') { + $error .= $app->lng('error_not_allowed_server_id').'
'; + } + } + /* + else + { + $error .= $app->lng('error_no_server_id').'
'; + } + */ + + // apply filters + if(isset($data['domain']) && $data['domain'] != ''){ + /* check if the domain module is used - and check if the selected domain can be used! */ + if ($domains_settings['use_domain_module'] == 'y') { + if ($_SESSION["s"]["user"]["typ"] == 'admin' || $app->auth->has_clients($_SESSION['s']['user']['userid'])) { + $data['client_group_id'] = $app->tools_sites->getClientIdForDomain($data['domain']); + } + $domain_check = $app->tools_sites->checkDomainModuleDomain($data['domain']); + if(!$domain_check) { + // invalid domain selected + $data['domain'] = ''; + } else { + $data['domain'] = $domain_check; + } + } else { + $data['domain'] = $app->functions->idn_encode($data['domain']); + $data['domain'] = strtolower($data['domain']); + } + } + if(isset($data['ns1']) && $data['ns1'] != ''){ + $data['ns1'] = $app->functions->idn_encode($data['ns1']); + $data['ns1'] = strtolower($data['ns1']); + } + if(isset($data['ns2']) && $data['ns2'] != ''){ + $data['ns2'] = $app->functions->idn_encode($data['ns2']); + $data['ns2'] = strtolower($data['ns2']); + } + if(isset($data['email']) && $data['email'] != ''){ + $data['email'] = $app->functions->idn_encode($data['email']); + $data['email'] = strtolower($data['email']); + } + + + # fixme: this regex is pretty poor for domain validation + if(isset($data['domain']) && $data['domain'] == '') $error .= $app->lng('error_domain_empty').'
'; + elseif(isset($data['domain']) && !preg_match('/^[\w\.\-]{1,64}\.[a-zA-Z0-9\-]{2,63}$/', $data['domain'])) $error .= $app->lng('error_domain_regex').'
'; + + if(isset($data['ip']) && $data['ip'] == '') $error .= $app->lng('error_ip_empty').'
'; + + if(isset($data['ipv6']) && $data['ipv6'] == '') $error .= $app->lng('error_ipv6_empty').'
'; + + # fixme: this regex is pretty poor for hostname validation + if(isset($data['ns1']) && $data['ns1'] == '') $error .= $app->lng('error_ns1_empty').'
'; + elseif(isset($data['ns1']) && !preg_match('/^[\w\.\-]{1,64}\.[a-zA-Z0-9]{2,63}$/', $data['ns1'])) $error .= $app->lng('error_ns1_regex').'
'; + + if(isset($data['ns2']) && $data['ns2'] == '') $error .= $app->lng('error_ns2_empty').'
'; + elseif(isset($data['ns2']) && !preg_match('/^[\w\.\-]{1,64}\.[a-zA-Z0-9]{2,63}$/', $data['ns2'])) $error .= $app->lng('error_ns2_regex').'
'; + + if(isset($data['email']) && $data['email'] == '') $error .= $app->lng('error_email_empty').'
'; + elseif(isset($data['email']) && filter_var($data['email'], FILTER_VALIDATE_EMAIL) === false) $error .= $app->lng('error_email_regex').'
'; + + // make sure that the record belongs to the client group and not the admin group when admin inserts it + if($_SESSION["s"]["user"]["typ"] == 'admin' && isset($data['client_group_id'])) { + $sys_groupid = $app->functions->intval($data['client_group_id']); + } elseif($app->auth->has_clients($_SESSION['s']['user']['userid']) && isset($data['client_group_id'])) { + $sys_groupid = $app->functions->intval($data['client_group_id']); + } else { + $sys_groupid = $_SESSION["s"]["user"]["default_group"]; + } + + $tform_def_file = "../../web/dns/form/dns_soa.tform.php"; + $app->uses('tform'); + $app->tform->loadFormDef($tform_def_file); + + if($_SESSION['s']['user']['typ'] != 'admin') { + if(!$app->tform->checkClientLimit('limit_dns_zone')) { + $error .= $app->tform->wordbook["limit_dns_zone_txt"]; + } + if(!$app->tform->checkResellerLimit('limit_dns_zone')) { + $error .= $app->tform->wordbook["limit_dns_zone_txt"]; + } + } + + + // replace template placeholders + $template_id = (isset($data['template_id']))?$app->functions->intval($data['template_id']):0; + $template_record = $app->db->queryOneRecord("SELECT * FROM dns_template WHERE template_id = ?", $template_id); + $tpl_content = $template_record['template']; + if($data['domain'] != '') $tpl_content = str_replace('{DOMAIN}', $data['domain'], $tpl_content); + if($data['ip'] != '') $tpl_content = str_replace('{IP}', $data['ip'], $tpl_content); + if($data['ipv6'] != '') $tpl_content = str_replace('{IPV6}',$data['ipv6'],$tpl_content); + if($data['ns1'] != '') $tpl_content = str_replace('{NS1}', $data['ns1'], $tpl_content); + if($data['ns2'] != '') $tpl_content = str_replace('{NS2}', $data['ns2'], $tpl_content); + if($data['email'] != '') $tpl_content = str_replace('{EMAIL}', $data['email'], $tpl_content); + // $enable_dnssec = (($data['dnssec'] == 'Y') ? 'Y' : 'N'); + // if(isset($data['dnssec'])) $vars['dnssec_wanted'] = 'Y'; + if(isset($data['dnssec'])) $tpl_content = str_replace('[ZONE]', '[ZONE]'."\n".'dnssec_wanted=Y', $tpl_content); + if(isset($data['dkim']) && preg_match('/^[\w\.\-\/]{1,255}\.[a-zA-Z0-9\-]{2,63}[\.]{0,1}$/', $data['domain'])) { + $sql = $app->db->queryOneRecord("SELECT dkim_public, dkim_selector FROM mail_domain WHERE domain = ? AND dkim = 'y' AND ".$app->tform->getAuthSQL('r'), $data['domain']); + $public_key = $sql['dkim_public']; + if ($public_key!='') { + if (empty($sql['dkim_selector'])) $sql['dkim_selector'] = 'default'; + $dns_record=str_replace(array("\r\n", "\n", "\r", "-----BEGIN PUBLIC KEY-----", "-----END PUBLIC KEY-----"), '', $public_key); + $tpl_content .= "\n".'TXT|'.$sql['dkim_selector'].'._domainkey.'.$data['domain'].'.|v=DKIM1; t=s; p='.$dns_record; + } + } + + // Parse the template + $tpl_rows = explode("\n", $tpl_content); + $section = ''; + $vars = array(); + $vars['xfer']=''; + $vars['dnssec_wanted']='N'; + $vars['dnssec_algo']='ECDSAP256SHA256'; + $dns_rr = array(); + foreach($tpl_rows as $row) { + $row = trim($row); + if(substr($row, 0, 1) == '[') { + if($row == '[ZONE]') { + $section = 'zone'; + } elseif($row == '[DNS_RECORDS]') { + $section = 'dns_records'; + } else { + die('Unknown section type'); + } + } else { + if($row != '') { + // Handle zone section + if($section == 'zone') { + $parts = explode('=', $row); + $key = trim($parts[0]); + $val = trim($parts[1]); + if($key != '') $vars[$key] = $val; + } + // Handle DNS Record rows + if($section == 'dns_records') { + $parts = explode('|', $row); + $dns_rr[] = array( + 'name' => $parts[1], + 'type' => $parts[0], + 'data' => $parts[2], + 'aux' => $parts[3], + 'ttl' => $parts[4] + ); + } + } + } + + } // end foreach + + if($vars['origin'] == '') $error .= $app->lng('error_origin_empty').'
'; + if($vars['ns'] == '') $error .= $app->lng('error_ns_empty').'
'; + if($vars['mbox'] == '') $error .= $app->lng('error_mbox_empty').'
'; + if($vars['refresh'] == '') $error .= $app->lng('error_refresh_empty').'
'; + if($vars['retry'] == '') $error .= $app->lng('error_retry_empty').'
'; + if($vars['expire'] == '') $error .= $app->lng('error_expire_empty').'
'; + if($vars['minimum'] == '') $error .= $app->lng('error_minimum_empty').'
'; + if($vars['ttl'] == '') $error .= $app->lng('error_ttl_empty').'
'; + + if($error == '') { + // Insert the soa record + $sys_userid = $_SESSION['s']['user']['userid']; + $origin = $vars['origin']; + $ns = $vars['ns']; + $mbox = str_replace('@', '.', $vars['mbox']); + $refresh = $vars['refresh']; + $retry = $vars['retry']; + $expire = $vars['expire']; + $minimum = $vars['minimum']; + $ttl = $vars['ttl']; + $xfer = $vars['xfer']; + $also_notify = $vars['also_notify']; + $update_acl = $vars['update_acl']; + $dnssec_wanted = $vars['dnssec_wanted']; + $dnssec_algo = $vars['dnssec_algo']; + $serial = $app->validate_dns->increase_serial(0); + + $insert_data = array( + "sys_userid" => $sys_userid, + "sys_groupid" => $sys_groupid, + "sys_perm_user" => 'riud', + "sys_perm_group" => 'riud', + "sys_perm_other" => '', + "server_id" => $server_id, + "origin" => $origin, + "ns" => $ns, + "mbox" => $mbox, + "serial" => $serial, + "refresh" => $refresh, + "retry" => $retry, + "expire" => $expire, + "minimum" => $minimum, + "ttl" => $ttl, + "active" => 'Y', + "xfer" => $xfer, + "also_notify" => $also_notify, + "update_acl" => $update_acl, + "dnssec_wanted" => $dnssec_wanted, + "dnssec_algo" => $dnssec_algo + ); + + $dns_soa_id = $app->db->datalogInsert('dns_soa', $insert_data, 'id'); + if($dns_soa_id > 0) $app->plugin->raiseEvent('dns:wizard:on_after_insert', $dns_soa_id); + + // Insert the dns_rr records + if(is_array($dns_rr) && $dns_soa_id > 0) { + foreach($dns_rr as $rr) { + $insert_data = array( + "sys_userid" => $sys_userid, + "sys_groupid" => $sys_groupid, + "sys_perm_user" => 'riud', + "sys_perm_group" => 'riud', + "sys_perm_other" => '', + "server_id" => $server_id, + "zone" => $dns_soa_id, + "name" => $rr['name'], + "type" => $rr['type'], + "data" => $rr['data'], + "aux" => $rr['aux'], + "ttl" => $rr['ttl'], + "active" => 'Y' + ); + $dns_rr_id = $app->db->datalogInsert('dns_rr', $insert_data, 'id'); + } + } + + return 'ok'; + + } else { + return $error; + } + } + +} diff --git a/interface/lib/classes/remote.d/dns.inc.php b/interface/lib/classes/remote.d/dns.inc.php index 67b97e722d..3a2b11022f 100644 --- a/interface/lib/classes/remote.d/dns.inc.php +++ b/interface/lib/classes/remote.d/dns.inc.php @@ -44,143 +44,41 @@ class remoting_dns extends remoting { //* Create Zone with Template public function dns_templatezone_add($session_id, $client_id, $template_id, $domain, $ip, $ns1, $ns2, $email, $ipv6 = '') { global $app, $conf; + if(!$this->checkPerm($session_id, 'dns_templatezone_add')) { throw new SoapFault('permission_denied', 'You do not have the permissions to access this function.'); } - $client = $app->db->queryOneRecord("SELECT default_dnsserver FROM client WHERE client_id = ?", $client_id); - $server_id = $client["default_dnsserver"]; - $template_record = $app->db->queryOneRecord("SELECT * FROM dns_template WHERE template_id = ?", $template_id); - $fields = explode(',', $template_record['fields']); - $tform_def_file = "../../web/dns/form/dns_soa.tform.php"; - $app->uses('tform'); - $app->tform->loadFormDef($tform_def_file); - $app->uses('tpl,validate_dns,remoting_lib'); + $client_id = $app->functions->intval($client_id); + + // Get client group id + $rec = $app->db->queryOneRecord("SELECT groupid FROM sys_group WHERE client_id = ?", $client_id); + if(isset($rec['groupid'])) { + $client_group_id = $app->functions->intval($rec['groupid']); + } else { + throw new SoapFault('no_group_found', 'There is no group for this client ID.'); + return false; + } + $app->uses('remoting_lib,dns_wizard'); $app->remoting_lib->loadUserProfile($client_id); - //* replace template placeholders - $tpl_content = $template_record['template']; - if($domain != '') $tpl_content = str_replace('{DOMAIN}', $domain, $tpl_content); - if($ip != '') $tpl_content = str_replace('{IP}', $ip, $tpl_content); - if($ipv6 != '') $tpl_content = str_replace('{IPV6}', $ipv6, $tpl_content); - if($ns1 != '') $tpl_content = str_replace('{NS1}', $ns1, $tpl_content); - if($ns2 != '') $tpl_content = str_replace('{NS2}', $ns2, $tpl_content); - if($email != '') $tpl_content = str_replace('{EMAIL}', $email, $tpl_content); - - //* Parse the template - $tpl_rows = explode("\n", $tpl_content); - $section = ''; - $vars = array(); - $dns_rr = array(); - foreach($tpl_rows as $row) { - $row = trim($row); - if(substr($row, 0, 1) == '[') { - if($row == '[ZONE]') { - $section = 'zone'; - } elseif($row == '[DNS_RECORDS]') { - $section = 'dns_records'; - } else { - die('Unknown section type'); - } - } else { - if($row != '') { - //* Handle zone section - if($section == 'zone') { - $parts = explode('=', $row); - $key = trim($parts[0]); - $val = trim($parts[1]); - if($key != '') $vars[$key] = $val; - } - //* Handle DNS Record rows - if($section == 'dns_records') { - $parts = explode('|', $row); - $dns_rr[] = array( - 'name' => $parts[1], - 'type' => $parts[0], - 'data' => $parts[2], - 'aux' => $parts[3], - 'ttl' => $parts[4] - ); - } - } - } - } // end foreach - - if($vars['origin'] == '') $error .= $app->lng('error_origin_empty').'
'; - if($vars['ns'] == '') $error .= $app->lng('error_ns_empty').'
'; - if($vars['mbox'] == '') $error .= $app->lng('error_mbox_empty').'
'; - if($vars['refresh'] == '') $error .= $app->lng('error_refresh_empty').'
'; - if($vars['retry'] == '') $error .= $app->lng('error_retry_empty').'
'; - if($vars['expire'] == '') $error .= $app->lng('error_expire_empty').'
'; - if($vars['minimum'] == '') $error .= $app->lng('error_minimum_empty').'
'; - if($vars['ttl'] == '') $error .= $app->lng('error_ttl_empty').'
'; - if(!isset($vars['xfer'])) $vars['xfer'] = ''; - - if($error == '') { - // Insert the soa record - $tmp = $app->db->queryOneRecord("SELECT userid,default_group FROM sys_user WHERE client_id = ?", $client_id); - $sys_userid = $tmp['userid']; - $sys_groupid = $tmp['default_group']; - unset($tmp); - $origin = $vars['origin']; - $ns = $vars['ns']; - $mbox = str_replace('@', '.', $vars['mbox']); - $refresh = $vars['refresh']; - $retry = $vars['retry']; - $expire = $vars['expire']; - $minimum = $vars['minimum']; - $ttl = $vars['ttl']; - $xfer = $vars['xfer']; - $also_notify = $vars['also_notify']; - $update_acl = $vars['update_acl']; - $serial = $app->validate_dns->increase_serial(0); - $insert_data = array( - "sys_userid" => $sys_userid, - "sys_groupid" => $sys_groupid, - "sys_perm_user" => 'riud', - "sys_perm_group" => 'riud', - "sys_perm_other" => '', - "server_id" => $server_id, - "origin" => $origin, - "ns" => $ns, - "mbox" => $mbox, - "serial" => $serial, - "refresh" => $refresh, - "retry" => $retry, - "expire" => $expire, - "minimum" => $minimum, - "ttl" => $ttl, - "active" => 'Y', - "xfer" => $xfer, - "also_notify" => $also_notify, - "update_acl" => $update_acl - ); - $dns_soa_id = $app->db->datalogInsert('dns_soa', $insert_data, 'id'); - // Insert the dns_rr records - if(is_array($dns_rr) && $dns_soa_id > 0) { - foreach($dns_rr as $rr) { - $insert_data = array( - "sys_userid" => $sys_userid, - "sys_groupid" => $sys_groupid, - "sys_perm_user" => 'riud', - "sys_perm_group" => 'riud', - "sys_perm_other" => '', - "server_id" => $server_id, - "zone" => $dns_soa_id, - "name" => $rr['name'], - "type" => $rr['type'], - "data" => $rr['data'], - "aux" => $rr['aux'], - "ttl" => $rr['ttl'], - "active" => 'Y' - ); - $dns_rr_id = $app->db->datalogInsert('dns_rr', $insert_data, 'id'); - } - } - exit; + $create = $app->dns_wizard->create([ + 'client_group_id' => $client_group_id, + 'template_id' => $template_id, + 'domain' => $domain, + 'ip' => $ip, + 'ns1' => $ns1, + 'ns2' => $ns2, + 'email' => $email, + 'ipv6' => $ipv6, + ]); + + if ($create == 'ok') { + return true; } else { - throw new SoapFault('permission_denied', $error); + throw new SoapFault('dns_wizard_error', $create); + return false; } } diff --git a/interface/web/dns/dns_wizard.php b/interface/web/dns/dns_wizard.php index 90e2fef1c4..2859b6f9e1 100644 --- a/interface/web/dns/dns_wizard.php +++ b/interface/web/dns/dns_wizard.php @@ -224,243 +224,13 @@ //* CSRF Check $app->auth->csrf_token_check(); - $error = ''; - - if ($post_server_id) - { - $client_group_id = $app->functions->intval($_SESSION["s"]["user"]["default_group"]); - $client = $app->db->queryOneRecord("SELECT dns_servers FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = ?", $client_group_id); - - $client['dns_servers_ids'] = explode(',', $client['dns_servers']); - - // Check if chosen server is in authorized servers for this client - if (!(is_array($client['dns_servers_ids']) && in_array($server_id, $client['dns_servers_ids'])) && $_SESSION["s"]["user"]["typ"] != 'admin') { - $error .= $app->lng('error_not_allowed_server_id').'
'; - } - } - else - { - $error .= $app->lng('error_no_server_id').'
'; - } - - // apply filters - if(isset($_POST['domain']) && $_POST['domain'] != ''){ - /* check if the domain module is used - and check if the selected domain can be used! */ - if ($domains_settings['use_domain_module'] == 'y') { - if ($_SESSION["s"]["user"]["typ"] == 'admin' || $app->auth->has_clients($_SESSION['s']['user']['userid'])) { - $_POST['client_group_id'] = $app->tools_sites->getClientIdForDomain($_POST['domain']); - } - $domain_check = $app->tools_sites->checkDomainModuleDomain($_POST['domain']); - if(!$domain_check) { - // invalid domain selected - $_POST['domain'] = ''; - } else { - $_POST['domain'] = $domain_check; - } - } else { - $_POST['domain'] = $app->functions->idn_encode($_POST['domain']); - $_POST['domain'] = strtolower($_POST['domain']); - } - } - if(isset($_POST['ns1']) && $_POST['ns1'] != ''){ - $_POST['ns1'] = $app->functions->idn_encode($_POST['ns1']); - $_POST['ns1'] = strtolower($_POST['ns1']); - } - if(isset($_POST['ns2']) && $_POST['ns2'] != ''){ - $_POST['ns2'] = $app->functions->idn_encode($_POST['ns2']); - $_POST['ns2'] = strtolower($_POST['ns2']); - } - if(isset($_POST['email']) && $_POST['email'] != ''){ - $_POST['email'] = $app->functions->idn_encode($_POST['email']); - $_POST['email'] = strtolower($_POST['email']); - } - - - # fixme: this regex is pretty poor for domain validation - if(isset($_POST['domain']) && $_POST['domain'] == '') $error .= $app->lng('error_domain_empty').'
'; - elseif(isset($_POST['domain']) && !preg_match('/^[\w\.\-]{1,64}\.[a-zA-Z0-9\-]{2,63}$/', $_POST['domain'])) $error .= $app->lng('error_domain_regex').'
'; - - if(isset($_POST['ip']) && $_POST['ip'] == '') $error .= $app->lng('error_ip_empty').'
'; - - if(isset($_POST['ipv6']) && $_POST['ipv6'] == '') $error .= $app->lng('error_ipv6_empty').'
'; - - # fixme: this regex is pretty poor for hostname validation - if(isset($_POST['ns1']) && $_POST['ns1'] == '') $error .= $app->lng('error_ns1_empty').'
'; - elseif(isset($_POST['ns1']) && !preg_match('/^[\w\.\-]{1,64}\.[a-zA-Z0-9]{2,63}$/', $_POST['ns1'])) $error .= $app->lng('error_ns1_regex').'
'; - - if(isset($_POST['ns2']) && $_POST['ns2'] == '') $error .= $app->lng('error_ns2_empty').'
'; - elseif(isset($_POST['ns2']) && !preg_match('/^[\w\.\-]{1,64}\.[a-zA-Z0-9]{2,63}$/', $_POST['ns2'])) $error .= $app->lng('error_ns2_regex').'
'; - - if(isset($_POST['email']) && $_POST['email'] == '') $error .= $app->lng('error_email_empty').'
'; - elseif(isset($_POST['email']) && filter_var($_POST['email'], FILTER_VALIDATE_EMAIL) === false) $error .= $app->lng('error_email_regex').'
'; - - // make sure that the record belongs to the client group and not the admin group when admin inserts it - if($_SESSION["s"]["user"]["typ"] == 'admin' && isset($_POST['client_group_id'])) { - $sys_groupid = $app->functions->intval($_POST['client_group_id']); - } elseif($app->auth->has_clients($_SESSION['s']['user']['userid']) && isset($_POST['client_group_id'])) { - $sys_groupid = $app->functions->intval($_POST['client_group_id']); - } else { - $sys_groupid = $_SESSION["s"]["user"]["default_group"]; - } - - $tform_def_file = "form/dns_soa.tform.php"; - $app->uses('tform'); - $app->tform->loadFormDef($tform_def_file); - - if($_SESSION['s']['user']['typ'] != 'admin') { - if(!$app->tform->checkClientLimit('limit_dns_zone')) { - $error .= $app->tform->wordbook["limit_dns_zone_txt"]; - } - if(!$app->tform->checkResellerLimit('limit_dns_zone')) { - $error .= $app->tform->wordbook["limit_dns_zone_txt"]; - } - } - - - // replace template placeholders - $tpl_content = $template_record['template']; - if($_POST['domain'] != '') $tpl_content = str_replace('{DOMAIN}', $_POST['domain'], $tpl_content); - if($_POST['ip'] != '') $tpl_content = str_replace('{IP}', $_POST['ip'], $tpl_content); - if($_POST['ipv6'] != '') $tpl_content = str_replace('{IPV6}',$_POST['ipv6'],$tpl_content); - if($_POST['ns1'] != '') $tpl_content = str_replace('{NS1}', $_POST['ns1'], $tpl_content); - if($_POST['ns2'] != '') $tpl_content = str_replace('{NS2}', $_POST['ns2'], $tpl_content); - if($_POST['email'] != '') $tpl_content = str_replace('{EMAIL}', $_POST['email'], $tpl_content); - // $enable_dnssec = (($_POST['dnssec'] == 'Y') ? 'Y' : 'N'); - // if(isset($_POST['dnssec'])) $vars['dnssec_wanted'] = 'Y'; - if(isset($_POST['dnssec'])) $tpl_content = str_replace('[ZONE]', '[ZONE]'."\n".'dnssec_wanted=Y', $tpl_content); - if(isset($_POST['dkim']) && preg_match('/^[\w\.\-\/]{1,255}\.[a-zA-Z0-9\-]{2,63}[\.]{0,1}$/', $_POST['domain'])) { - $sql = $app->db->queryOneRecord("SELECT dkim_public, dkim_selector FROM mail_domain WHERE domain = ? AND dkim = 'y' AND ".$app->tform->getAuthSQL('r'), $_POST['domain']); - $public_key = $sql['dkim_public']; - if ($public_key!='') { - if (empty($sql['dkim_selector'])) $sql['dkim_selector'] = 'default'; - $dns_record=str_replace(array("\r\n", "\n", "\r", "-----BEGIN PUBLIC KEY-----", "-----END PUBLIC KEY-----"), '', $public_key); - $tpl_content .= "\n".'TXT|'.$sql['dkim_selector'].'._domainkey.'.$_POST['domain'].'.|v=DKIM1; t=s; p='.$dns_record; - } - } - - // Parse the template - $tpl_rows = explode("\n", $tpl_content); - $section = ''; - $vars = array(); - $vars['xfer']=''; - $vars['dnssec_wanted']='N'; - $vars['dnssec_algo']='ECDSAP256SHA256'; - $dns_rr = array(); - foreach($tpl_rows as $row) { - $row = trim($row); - if(substr($row, 0, 1) == '[') { - if($row == '[ZONE]') { - $section = 'zone'; - } elseif($row == '[DNS_RECORDS]') { - $section = 'dns_records'; - } else { - die('Unknown section type'); - } - } else { - if($row != '') { - // Handle zone section - if($section == 'zone') { - $parts = explode('=', $row); - $key = trim($parts[0]); - $val = trim($parts[1]); - if($key != '') $vars[$key] = $val; - } - // Handle DNS Record rows - if($section == 'dns_records') { - $parts = explode('|', $row); - $dns_rr[] = array( - 'name' => $parts[1], - 'type' => $parts[0], - 'data' => $parts[2], - 'aux' => $parts[3], - 'ttl' => $parts[4] - ); - } - } - } - - } // end foreach - - if($vars['origin'] == '') $error .= $app->lng('error_origin_empty').'
'; - if($vars['ns'] == '') $error .= $app->lng('error_ns_empty').'
'; - if($vars['mbox'] == '') $error .= $app->lng('error_mbox_empty').'
'; - if($vars['refresh'] == '') $error .= $app->lng('error_refresh_empty').'
'; - if($vars['retry'] == '') $error .= $app->lng('error_retry_empty').'
'; - if($vars['expire'] == '') $error .= $app->lng('error_expire_empty').'
'; - if($vars['minimum'] == '') $error .= $app->lng('error_minimum_empty').'
'; - if($vars['ttl'] == '') $error .= $app->lng('error_ttl_empty').'
'; - - if($error == '') { - // Insert the soa record - $sys_userid = $_SESSION['s']['user']['userid']; - $origin = $vars['origin']; - $ns = $vars['ns']; - $mbox = str_replace('@', '.', $vars['mbox']); - $refresh = $vars['refresh']; - $retry = $vars['retry']; - $expire = $vars['expire']; - $minimum = $vars['minimum']; - $ttl = $vars['ttl']; - $xfer = $vars['xfer']; - $also_notify = $vars['also_notify']; - $update_acl = $vars['update_acl']; - $dnssec_wanted = $vars['dnssec_wanted']; - $dnssec_algo = $vars['dnssec_algo']; - $serial = $app->validate_dns->increase_serial(0); - - $insert_data = array( - "sys_userid" => $sys_userid, - "sys_groupid" => $sys_groupid, - "sys_perm_user" => 'riud', - "sys_perm_group" => 'riud', - "sys_perm_other" => '', - "server_id" => $server_id, - "origin" => $origin, - "ns" => $ns, - "mbox" => $mbox, - "serial" => $serial, - "refresh" => $refresh, - "retry" => $retry, - "expire" => $expire, - "minimum" => $minimum, - "ttl" => $ttl, - "active" => 'Y', - "xfer" => $xfer, - "also_notify" => $also_notify, - "update_acl" => $update_acl, - "dnssec_wanted" => $dnssec_wanted, - "dnssec_algo" => $dnssec_algo - ); - $dns_soa_id = $app->db->datalogInsert('dns_soa', $insert_data, 'id'); - if($dns_soa_id > 0) $app->plugin->raiseEvent('dns:wizard:on_after_insert', $dns_soa_id); - - // Insert the dns_rr records - if(is_array($dns_rr) && $dns_soa_id > 0) { - foreach($dns_rr as $rr) { - $insert_data = array( - "sys_userid" => $sys_userid, - "sys_groupid" => $sys_groupid, - "sys_perm_user" => 'riud', - "sys_perm_group" => 'riud', - "sys_perm_other" => '', - "server_id" => $server_id, - "zone" => $dns_soa_id, - "name" => $rr['name'], - "type" => $rr['type'], - "data" => $rr['data'], - "aux" => $rr['aux'], - "ttl" => $rr['ttl'], - "active" => 'Y' - ); - $dns_rr_id = $app->db->datalogInsert('dns_rr', $insert_data, 'id'); - } - } - + $app->uses('dns_wizard'); + $create = $app->dns_wizard->create($_POST); + if ($create == 'ok') { header("Location: dns_soa_list.php"); exit; - } else { - $app->tpl->setVar("error", $error); + $app->tpl->setVar("error", $create); } } From d7478f191798a714c3b06c2d170f47ea08659d0d Mon Sep 17 00:00:00 2001 From: Herman van Rink Date: Sun, 23 Apr 2023 13:28:48 +0200 Subject: [PATCH 115/621] Add script to add a new string to multiple translation files --- helper_scripts/multifile_add | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100755 helper_scripts/multifile_add diff --git a/helper_scripts/multifile_add b/helper_scripts/multifile_add new file mode 100755 index 0000000000..d5e58937a6 --- /dev/null +++ b/helper_scripts/multifile_add @@ -0,0 +1,32 @@ +#!/bin/bash + +# Adding a new translation string to the files for all languages. +# If you already added the string to your current language, be sure to deduplicate. + +new=$(cat << 'EOD' +$wb['foo_txt'] = 'Some translation'; +EOD +) + +if [ -z "$1" ]; then + echo "Usage: $0 " + exit 1 +fi + +for f in $*; do + # Preserve a php close tag as the last line. + close='?>' + if [ "$(tail -n 1 $f)" == "$close" ]; then + ( + head -n -1 $f; + echo "$new"; + echo "?>"; + ) > ${f}.new + + mv ${f}.new $f + + + else + echo "$new" >> $f + fi +done From d2e901aba497e88da63cab3d1394e8c286d84829 Mon Sep 17 00:00:00 2001 From: Johannes Date: Wed, 26 Apr 2023 08:47:08 +0000 Subject: [PATCH 116/621] 6497 sorting for php versions --- .../sql/incremental/upd_dev_collection.sql | 1 + install/sql/ispconfig3.sql | 1 + interface/web/admin/form/server_php.tform.php | 16 ++++++++++++ .../web/admin/lib/lang/ar_server_php.lng | 3 +++ .../web/admin/lib/lang/ar_server_php_list.lng | 1 + .../web/admin/lib/lang/bg_server_php.lng | 3 +++ .../web/admin/lib/lang/bg_server_php_list.lng | 1 + .../web/admin/lib/lang/br_server_php.lng | 3 +++ .../web/admin/lib/lang/ca_server_php.lng | 3 +++ .../web/admin/lib/lang/ca_server_php_list.lng | 1 + .../web/admin/lib/lang/cz_server_php.lng | 3 +++ .../web/admin/lib/lang/de_server_php.lng | 3 +++ .../web/admin/lib/lang/de_server_php_list.lng | 1 + .../web/admin/lib/lang/dk_server_php.lng | 3 +++ .../web/admin/lib/lang/dk_server_php_list.lng | 1 + .../web/admin/lib/lang/el_server_php.lng | 3 +++ .../web/admin/lib/lang/el_server_php_list.lng | 1 + .../web/admin/lib/lang/en_server_php.lng | 3 +++ .../web/admin/lib/lang/en_server_php_list.lng | 1 + .../web/admin/lib/lang/es_server_php.lng | 3 +++ .../web/admin/lib/lang/es_server_php_list.lng | 1 + .../web/admin/lib/lang/fi_server_php.lng | 3 +++ .../web/admin/lib/lang/fi_server_php_list.lng | 1 + .../web/admin/lib/lang/fr_server_php.lng | 3 +++ .../web/admin/lib/lang/fr_server_php_list.lng | 1 + .../web/admin/lib/lang/hr_server_php.lng | 3 +++ .../web/admin/lib/lang/hr_server_php_list.lng | 1 + .../web/admin/lib/lang/hu_server_php.lng | 3 +++ .../web/admin/lib/lang/hu_server_php_list.lng | 1 + .../web/admin/lib/lang/id_server_php.lng | 3 +++ .../web/admin/lib/lang/id_server_php_list.lng | 1 + .../web/admin/lib/lang/it_server_php.lng | 3 +++ .../web/admin/lib/lang/it_server_php_list.lng | 1 + .../web/admin/lib/lang/ja_server_php.lng | 3 +++ .../web/admin/lib/lang/ja_server_php_list.lng | 1 + .../web/admin/lib/lang/nl_server_php.lng | 3 +++ .../web/admin/lib/lang/nl_server_php_list.lng | 1 + .../web/admin/lib/lang/pl_server_php.lng | 3 +++ .../web/admin/lib/lang/pl_server_php_list.lng | 1 + .../web/admin/lib/lang/pt_server_php.lng | 3 +++ .../web/admin/lib/lang/pt_server_php_list.lng | 1 + .../web/admin/lib/lang/ro_server_php.lng | 3 +++ .../web/admin/lib/lang/ro_server_php_list.lng | 1 + .../web/admin/lib/lang/ru_server_php.lng | 3 +++ .../web/admin/lib/lang/ru_server_php_list.lng | 1 + .../web/admin/lib/lang/se_server_php.lng | 3 +++ .../web/admin/lib/lang/se_server_php_list.lng | 1 + .../web/admin/lib/lang/sk_server_php.lng | 3 +++ .../web/admin/lib/lang/sk_server_php_list.lng | 1 + .../web/admin/lib/lang/tr_server_php.lng | 3 +++ .../web/admin/lib/lang/tr_server_php_list.lng | 1 + interface/web/admin/server_php_edit.php | 8 +++++- .../web/admin/templates/server_php_list.htm | 6 +++-- .../admin/templates/server_php_sort_edit.htm | 11 ++++++++ interface/web/sites/ajax_get_json.php | 26 ++++++++++--------- .../sites/templates/web_vhost_domain_edit.htm | 4 ++- 56 files changed, 155 insertions(+), 16 deletions(-) create mode 100644 interface/web/admin/templates/server_php_sort_edit.htm diff --git a/install/sql/incremental/upd_dev_collection.sql b/install/sql/incremental/upd_dev_collection.sql index c3d8c5b210..e84a33ec41 100644 --- a/install/sql/incremental/upd_dev_collection.sql +++ b/install/sql/incremental/upd_dev_collection.sql @@ -1,2 +1,3 @@ ALTER TABLE `mail_user` CHANGE `quota` `quota` BIGINT(20) NOT NULL DEFAULT '0'; +ALTER TABLE `server_php` ADD `sortprio` INT(20) NOT NULL DEFAULT '100' AFTER `active`; diff --git a/install/sql/ispconfig3.sql b/install/sql/ispconfig3.sql index e9ed67c86a..2055c6a9a3 100644 --- a/install/sql/ispconfig3.sql +++ b/install/sql/ispconfig3.sql @@ -1460,6 +1460,7 @@ CREATE TABLE `server_php` ( `php_fpm_pool_dir` varchar(255) DEFAULT NULL, `php_fpm_socket_dir` varchar(255) DEFAULT NULL, `active` enum('n','y') NOT NULL DEFAULT 'y', + `sortprio` int(20) NOT NULL DEFAULT 100, PRIMARY KEY (`server_php_id`) ) DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; diff --git a/interface/web/admin/form/server_php.tform.php b/interface/web/admin/form/server_php.tform.php index 2a37a1e6d1..67f22cbeb4 100644 --- a/interface/web/admin/form/server_php.tform.php +++ b/interface/web/admin/form/server_php.tform.php @@ -248,4 +248,20 @@ //################################# ) ); +$form["tabs"]['php_sort'] = array ( + 'title' => "PHP Sort Priority", + 'width' => 80, + 'template' => "templates/server_php_sort_edit.htm", + 'fields' => array( + 'sortprio' => array ( + 'datatype' => 'INTEGER', + 'formtype' => 'TEXT', + 'default' => '100', + 'value' => '', + 'separator' => '', + 'width' => '10', + 'maxlength' => '20' + ), + ) +); ?> diff --git a/interface/web/admin/lib/lang/ar_server_php.lng b/interface/web/admin/lib/lang/ar_server_php.lng index 491be1aae2..4d71bb50b7 100644 --- a/interface/web/admin/lib/lang/ar_server_php.lng +++ b/interface/web/admin/lib/lang/ar_server_php.lng @@ -17,4 +17,7 @@ $wb['php_fpm_socket_dir_txt'] = 'PHP-FPM socket directory'; $wb['active_txt'] = 'Active'; $wb['php_in_use_error'] = 'This PHP-Version is in use.'; $wb['php_name_in_use_error'] = 'The name can not be changed.'; +$wb['PHP Sort Priority'] = 'Priority'; +$wb['sortprio_txt'] = 'Priority'; +$wb['sortprio_long_txt'] = 'Priority of PHP version in the PHP version select box
Default PHP has prio 0 if enabled
Lower value is higher priority'; ?> diff --git a/interface/web/admin/lib/lang/ar_server_php_list.lng b/interface/web/admin/lib/lang/ar_server_php_list.lng index 291302cbb7..d5e6ad3c7f 100644 --- a/interface/web/admin/lib/lang/ar_server_php_list.lng +++ b/interface/web/admin/lib/lang/ar_server_php_list.lng @@ -6,4 +6,5 @@ $wb['client_id_txt'] = 'Client'; $wb['name_txt'] = 'PHP Name'; $wb['active_txt'] = 'Active'; $wb['usage_txt'] = 'Usage count'; +$wb['sortprio_txt'] = 'Priority'; ?> diff --git a/interface/web/admin/lib/lang/bg_server_php.lng b/interface/web/admin/lib/lang/bg_server_php.lng index 491be1aae2..4d71bb50b7 100644 --- a/interface/web/admin/lib/lang/bg_server_php.lng +++ b/interface/web/admin/lib/lang/bg_server_php.lng @@ -17,4 +17,7 @@ $wb['php_fpm_socket_dir_txt'] = 'PHP-FPM socket directory'; $wb['active_txt'] = 'Active'; $wb['php_in_use_error'] = 'This PHP-Version is in use.'; $wb['php_name_in_use_error'] = 'The name can not be changed.'; +$wb['PHP Sort Priority'] = 'Priority'; +$wb['sortprio_txt'] = 'Priority'; +$wb['sortprio_long_txt'] = 'Priority of PHP version in the PHP version select box
Default PHP has prio 0 if enabled
Lower value is higher priority'; ?> diff --git a/interface/web/admin/lib/lang/bg_server_php_list.lng b/interface/web/admin/lib/lang/bg_server_php_list.lng index 291302cbb7..d5e6ad3c7f 100644 --- a/interface/web/admin/lib/lang/bg_server_php_list.lng +++ b/interface/web/admin/lib/lang/bg_server_php_list.lng @@ -6,4 +6,5 @@ $wb['client_id_txt'] = 'Client'; $wb['name_txt'] = 'PHP Name'; $wb['active_txt'] = 'Active'; $wb['usage_txt'] = 'Usage count'; +$wb['sortprio_txt'] = 'Priority'; ?> diff --git a/interface/web/admin/lib/lang/br_server_php.lng b/interface/web/admin/lib/lang/br_server_php.lng index d0a1015833..791db7e3ec 100644 --- a/interface/web/admin/lib/lang/br_server_php.lng +++ b/interface/web/admin/lib/lang/br_server_php.lng @@ -17,4 +17,7 @@ $wb['php_fpm_socket_dir_txt'] = 'PHP-FPM socket directory'; $wb['active_txt'] = 'Ativo'; $wb['php_in_use_error'] = 'Esta versão PHP está em uso.'; $wb['php_name_in_use_error'] = 'O nome não pode ser modificado.'; +$wb['PHP Sort Priority'] = 'Priority'; +$wb['sortprio_txt'] = 'Priority'; +$wb['sortprio_long_txt'] = 'Priority of PHP version in the PHP version select box
Default PHP has prio 0 if enabled
Lower value is higher priority'; ?> diff --git a/interface/web/admin/lib/lang/ca_server_php.lng b/interface/web/admin/lib/lang/ca_server_php.lng index 491be1aae2..4d71bb50b7 100644 --- a/interface/web/admin/lib/lang/ca_server_php.lng +++ b/interface/web/admin/lib/lang/ca_server_php.lng @@ -17,4 +17,7 @@ $wb['php_fpm_socket_dir_txt'] = 'PHP-FPM socket directory'; $wb['active_txt'] = 'Active'; $wb['php_in_use_error'] = 'This PHP-Version is in use.'; $wb['php_name_in_use_error'] = 'The name can not be changed.'; +$wb['PHP Sort Priority'] = 'Priority'; +$wb['sortprio_txt'] = 'Priority'; +$wb['sortprio_long_txt'] = 'Priority of PHP version in the PHP version select box
Default PHP has prio 0 if enabled
Lower value is higher priority'; ?> diff --git a/interface/web/admin/lib/lang/ca_server_php_list.lng b/interface/web/admin/lib/lang/ca_server_php_list.lng index 291302cbb7..d5e6ad3c7f 100644 --- a/interface/web/admin/lib/lang/ca_server_php_list.lng +++ b/interface/web/admin/lib/lang/ca_server_php_list.lng @@ -6,4 +6,5 @@ $wb['client_id_txt'] = 'Client'; $wb['name_txt'] = 'PHP Name'; $wb['active_txt'] = 'Active'; $wb['usage_txt'] = 'Usage count'; +$wb['sortprio_txt'] = 'Priority'; ?> diff --git a/interface/web/admin/lib/lang/cz_server_php.lng b/interface/web/admin/lib/lang/cz_server_php.lng index c1c67f05ef..6490928429 100644 --- a/interface/web/admin/lib/lang/cz_server_php.lng +++ b/interface/web/admin/lib/lang/cz_server_php.lng @@ -17,4 +17,7 @@ $wb['php_fpm_socket_dir_txt'] = 'PHP-FPM socket directory'; $wb['active_txt'] = 'Aktivní'; $wb['php_in_use_error'] = 'This PHP-Version is in use.'; $wb['php_name_in_use_error'] = 'The name can not be changed.'; +$wb['PHP Sort Priority'] = 'Priority'; +$wb['sortprio_txt'] = 'Priority'; +$wb['sortprio_long_txt'] = 'Priority of PHP version in the PHP version select box
Default PHP has prio 0 if enabled
Lower value is higher priority'; ?> diff --git a/interface/web/admin/lib/lang/de_server_php.lng b/interface/web/admin/lib/lang/de_server_php.lng index b3ad5d9913..4100957b9d 100644 --- a/interface/web/admin/lib/lang/de_server_php.lng +++ b/interface/web/admin/lib/lang/de_server_php.lng @@ -17,4 +17,7 @@ $wb['php_fpm_socket_dir_txt'] = 'PHP-FPM socket directory'; $wb['active_txt'] = 'Aktiv'; $wb['php_in_use_error'] = 'Diese PHP-Version wird noch benutzt.'; $wb['php_name_in_use_error'] = 'Der Name kann nicht geändert werden.'; +$wb['PHP Sort Priority'] = 'Priorität'; +$wb['sortprio_txt'] = 'Sorting Priority'; +$wb['sortprio_long_txt'] = 'Priority of PHP Version in the PHP version select box
Default PHP has prio 0 if enabled
Lower value is higher priority'; ?> diff --git a/interface/web/admin/lib/lang/de_server_php_list.lng b/interface/web/admin/lib/lang/de_server_php_list.lng index f9da54d84c..6b0a084746 100644 --- a/interface/web/admin/lib/lang/de_server_php_list.lng +++ b/interface/web/admin/lib/lang/de_server_php_list.lng @@ -6,4 +6,5 @@ $wb['client_id_txt'] = 'Kunde'; $wb['name_txt'] = 'PHP Name'; $wb['active_txt'] = 'Aktiv'; $wb['usage_txt'] = 'Usage count'; +$wb['sortprio_txt'] = 'Priority'; ?> diff --git a/interface/web/admin/lib/lang/dk_server_php.lng b/interface/web/admin/lib/lang/dk_server_php.lng index db6ef1f98a..e9b42a5133 100644 --- a/interface/web/admin/lib/lang/dk_server_php.lng +++ b/interface/web/admin/lib/lang/dk_server_php.lng @@ -17,4 +17,7 @@ $wb['php_fpm_socket_dir_txt'] = 'PHP-FPM socket directory'; $wb['active_txt'] = 'Active'; $wb['php_in_use_error'] = 'This PHP-Version is in use.'; $wb['php_name_in_use_error'] = 'The name can not be changed.'; +$wb['PHP Sort Priority'] = 'Priority'; +$wb['sortprio_txt'] = 'Priority'; +$wb['sortprio_long_txt'] = 'Priority of PHP version in the PHP version select box
Default PHP has prio 0 if enabled
Lower value is higher priority'; ?> diff --git a/interface/web/admin/lib/lang/dk_server_php_list.lng b/interface/web/admin/lib/lang/dk_server_php_list.lng index 65869ce2ed..4be3b3446b 100644 --- a/interface/web/admin/lib/lang/dk_server_php_list.lng +++ b/interface/web/admin/lib/lang/dk_server_php_list.lng @@ -6,4 +6,5 @@ $wb['client_id_txt'] = 'Kunde'; $wb['name_txt'] = 'PHP Navn'; $wb['active_txt'] = 'Active'; $wb['usage_txt'] = 'Usage count'; +$wb['sortprio_txt'] = 'Priority'; ?> diff --git a/interface/web/admin/lib/lang/el_server_php.lng b/interface/web/admin/lib/lang/el_server_php.lng index 491be1aae2..4d71bb50b7 100644 --- a/interface/web/admin/lib/lang/el_server_php.lng +++ b/interface/web/admin/lib/lang/el_server_php.lng @@ -17,4 +17,7 @@ $wb['php_fpm_socket_dir_txt'] = 'PHP-FPM socket directory'; $wb['active_txt'] = 'Active'; $wb['php_in_use_error'] = 'This PHP-Version is in use.'; $wb['php_name_in_use_error'] = 'The name can not be changed.'; +$wb['PHP Sort Priority'] = 'Priority'; +$wb['sortprio_txt'] = 'Priority'; +$wb['sortprio_long_txt'] = 'Priority of PHP version in the PHP version select box
Default PHP has prio 0 if enabled
Lower value is higher priority'; ?> diff --git a/interface/web/admin/lib/lang/el_server_php_list.lng b/interface/web/admin/lib/lang/el_server_php_list.lng index 291302cbb7..d5e6ad3c7f 100644 --- a/interface/web/admin/lib/lang/el_server_php_list.lng +++ b/interface/web/admin/lib/lang/el_server_php_list.lng @@ -6,4 +6,5 @@ $wb['client_id_txt'] = 'Client'; $wb['name_txt'] = 'PHP Name'; $wb['active_txt'] = 'Active'; $wb['usage_txt'] = 'Usage count'; +$wb['sortprio_txt'] = 'Priority'; ?> diff --git a/interface/web/admin/lib/lang/en_server_php.lng b/interface/web/admin/lib/lang/en_server_php.lng index 491be1aae2..4d71bb50b7 100644 --- a/interface/web/admin/lib/lang/en_server_php.lng +++ b/interface/web/admin/lib/lang/en_server_php.lng @@ -17,4 +17,7 @@ $wb['php_fpm_socket_dir_txt'] = 'PHP-FPM socket directory'; $wb['active_txt'] = 'Active'; $wb['php_in_use_error'] = 'This PHP-Version is in use.'; $wb['php_name_in_use_error'] = 'The name can not be changed.'; +$wb['PHP Sort Priority'] = 'Priority'; +$wb['sortprio_txt'] = 'Priority'; +$wb['sortprio_long_txt'] = 'Priority of PHP version in the PHP version select box
Default PHP has prio 0 if enabled
Lower value is higher priority'; ?> diff --git a/interface/web/admin/lib/lang/en_server_php_list.lng b/interface/web/admin/lib/lang/en_server_php_list.lng index 291302cbb7..d5e6ad3c7f 100644 --- a/interface/web/admin/lib/lang/en_server_php_list.lng +++ b/interface/web/admin/lib/lang/en_server_php_list.lng @@ -6,4 +6,5 @@ $wb['client_id_txt'] = 'Client'; $wb['name_txt'] = 'PHP Name'; $wb['active_txt'] = 'Active'; $wb['usage_txt'] = 'Usage count'; +$wb['sortprio_txt'] = 'Priority'; ?> diff --git a/interface/web/admin/lib/lang/es_server_php.lng b/interface/web/admin/lib/lang/es_server_php.lng index df2f0778f4..e75aa0e4e4 100644 --- a/interface/web/admin/lib/lang/es_server_php.lng +++ b/interface/web/admin/lib/lang/es_server_php.lng @@ -17,4 +17,7 @@ $wb['php_fpm_socket_dir_txt'] = 'PHP-FPM socket directory'; $wb['active_txt'] = 'Active'; $wb['php_in_use_error'] = 'This PHP-Version is in use.'; $wb['php_name_in_use_error'] = 'The name can not be changed.'; +$wb['PHP Sort Priority'] = 'Priority'; +$wb['sortprio_txt'] = 'Priority'; +$wb['sortprio_long_txt'] = 'Priority of PHP version in the PHP version select box
Default PHP has prio 0 if enabled
Lower value is higher priority'; ?> diff --git a/interface/web/admin/lib/lang/es_server_php_list.lng b/interface/web/admin/lib/lang/es_server_php_list.lng index 8d62ee8919..1efd239d31 100644 --- a/interface/web/admin/lib/lang/es_server_php_list.lng +++ b/interface/web/admin/lib/lang/es_server_php_list.lng @@ -6,4 +6,5 @@ $wb['name_txt'] = 'Versión de PHP'; $wb['server_id_txt'] = 'Servidor'; $wb['active_txt'] = 'Active'; $wb['usage_txt'] = 'Usage count'; +$wb['sortprio_txt'] = 'Priority'; ?> diff --git a/interface/web/admin/lib/lang/fi_server_php.lng b/interface/web/admin/lib/lang/fi_server_php.lng index 491be1aae2..4d71bb50b7 100644 --- a/interface/web/admin/lib/lang/fi_server_php.lng +++ b/interface/web/admin/lib/lang/fi_server_php.lng @@ -17,4 +17,7 @@ $wb['php_fpm_socket_dir_txt'] = 'PHP-FPM socket directory'; $wb['active_txt'] = 'Active'; $wb['php_in_use_error'] = 'This PHP-Version is in use.'; $wb['php_name_in_use_error'] = 'The name can not be changed.'; +$wb['PHP Sort Priority'] = 'Priority'; +$wb['sortprio_txt'] = 'Priority'; +$wb['sortprio_long_txt'] = 'Priority of PHP version in the PHP version select box
Default PHP has prio 0 if enabled
Lower value is higher priority'; ?> diff --git a/interface/web/admin/lib/lang/fi_server_php_list.lng b/interface/web/admin/lib/lang/fi_server_php_list.lng index 291302cbb7..d5e6ad3c7f 100644 --- a/interface/web/admin/lib/lang/fi_server_php_list.lng +++ b/interface/web/admin/lib/lang/fi_server_php_list.lng @@ -6,4 +6,5 @@ $wb['client_id_txt'] = 'Client'; $wb['name_txt'] = 'PHP Name'; $wb['active_txt'] = 'Active'; $wb['usage_txt'] = 'Usage count'; +$wb['sortprio_txt'] = 'Priority'; ?> diff --git a/interface/web/admin/lib/lang/fr_server_php.lng b/interface/web/admin/lib/lang/fr_server_php.lng index 491be1aae2..4d71bb50b7 100644 --- a/interface/web/admin/lib/lang/fr_server_php.lng +++ b/interface/web/admin/lib/lang/fr_server_php.lng @@ -17,4 +17,7 @@ $wb['php_fpm_socket_dir_txt'] = 'PHP-FPM socket directory'; $wb['active_txt'] = 'Active'; $wb['php_in_use_error'] = 'This PHP-Version is in use.'; $wb['php_name_in_use_error'] = 'The name can not be changed.'; +$wb['PHP Sort Priority'] = 'Priority'; +$wb['sortprio_txt'] = 'Priority'; +$wb['sortprio_long_txt'] = 'Priority of PHP version in the PHP version select box
Default PHP has prio 0 if enabled
Lower value is higher priority'; ?> diff --git a/interface/web/admin/lib/lang/fr_server_php_list.lng b/interface/web/admin/lib/lang/fr_server_php_list.lng index 291302cbb7..d5e6ad3c7f 100644 --- a/interface/web/admin/lib/lang/fr_server_php_list.lng +++ b/interface/web/admin/lib/lang/fr_server_php_list.lng @@ -6,4 +6,5 @@ $wb['client_id_txt'] = 'Client'; $wb['name_txt'] = 'PHP Name'; $wb['active_txt'] = 'Active'; $wb['usage_txt'] = 'Usage count'; +$wb['sortprio_txt'] = 'Priority'; ?> diff --git a/interface/web/admin/lib/lang/hr_server_php.lng b/interface/web/admin/lib/lang/hr_server_php.lng index 15ec1b30f5..9db79d4f9b 100644 --- a/interface/web/admin/lib/lang/hr_server_php.lng +++ b/interface/web/admin/lib/lang/hr_server_php.lng @@ -17,4 +17,7 @@ $wb['php_fpm_socket_dir_txt'] = 'PHP-FPM socket directory'; $wb['active_txt'] = 'Active'; $wb['php_in_use_error'] = 'This PHP-Version is in use.'; $wb['php_name_in_use_error'] = 'The name can not be changed.'; +$wb['PHP Sort Priority'] = 'Priority'; +$wb['sortprio_txt'] = 'Priority'; +$wb['sortprio_long_txt'] = 'Priority of PHP version in the PHP version select box
Default PHP has prio 0 if enabled
Lower value is higher priority'; ?> diff --git a/interface/web/admin/lib/lang/hr_server_php_list.lng b/interface/web/admin/lib/lang/hr_server_php_list.lng index 1851ac8395..4e5381c1f3 100644 --- a/interface/web/admin/lib/lang/hr_server_php_list.lng +++ b/interface/web/admin/lib/lang/hr_server_php_list.lng @@ -6,4 +6,5 @@ $wb['client_id_txt'] = 'Klijent'; $wb['name_txt'] = 'PHP Name'; $wb['active_txt'] = 'Active'; $wb['usage_txt'] = 'Usage count'; +$wb['sortprio_txt'] = 'Priority'; ?> diff --git a/interface/web/admin/lib/lang/hu_server_php.lng b/interface/web/admin/lib/lang/hu_server_php.lng index 491be1aae2..4d71bb50b7 100644 --- a/interface/web/admin/lib/lang/hu_server_php.lng +++ b/interface/web/admin/lib/lang/hu_server_php.lng @@ -17,4 +17,7 @@ $wb['php_fpm_socket_dir_txt'] = 'PHP-FPM socket directory'; $wb['active_txt'] = 'Active'; $wb['php_in_use_error'] = 'This PHP-Version is in use.'; $wb['php_name_in_use_error'] = 'The name can not be changed.'; +$wb['PHP Sort Priority'] = 'Priority'; +$wb['sortprio_txt'] = 'Priority'; +$wb['sortprio_long_txt'] = 'Priority of PHP version in the PHP version select box
Default PHP has prio 0 if enabled
Lower value is higher priority'; ?> diff --git a/interface/web/admin/lib/lang/hu_server_php_list.lng b/interface/web/admin/lib/lang/hu_server_php_list.lng index 291302cbb7..d5e6ad3c7f 100644 --- a/interface/web/admin/lib/lang/hu_server_php_list.lng +++ b/interface/web/admin/lib/lang/hu_server_php_list.lng @@ -6,4 +6,5 @@ $wb['client_id_txt'] = 'Client'; $wb['name_txt'] = 'PHP Name'; $wb['active_txt'] = 'Active'; $wb['usage_txt'] = 'Usage count'; +$wb['sortprio_txt'] = 'Priority'; ?> diff --git a/interface/web/admin/lib/lang/id_server_php.lng b/interface/web/admin/lib/lang/id_server_php.lng index 491be1aae2..4d71bb50b7 100644 --- a/interface/web/admin/lib/lang/id_server_php.lng +++ b/interface/web/admin/lib/lang/id_server_php.lng @@ -17,4 +17,7 @@ $wb['php_fpm_socket_dir_txt'] = 'PHP-FPM socket directory'; $wb['active_txt'] = 'Active'; $wb['php_in_use_error'] = 'This PHP-Version is in use.'; $wb['php_name_in_use_error'] = 'The name can not be changed.'; +$wb['PHP Sort Priority'] = 'Priority'; +$wb['sortprio_txt'] = 'Priority'; +$wb['sortprio_long_txt'] = 'Priority of PHP version in the PHP version select box
Default PHP has prio 0 if enabled
Lower value is higher priority'; ?> diff --git a/interface/web/admin/lib/lang/id_server_php_list.lng b/interface/web/admin/lib/lang/id_server_php_list.lng index 291302cbb7..d5e6ad3c7f 100644 --- a/interface/web/admin/lib/lang/id_server_php_list.lng +++ b/interface/web/admin/lib/lang/id_server_php_list.lng @@ -6,4 +6,5 @@ $wb['client_id_txt'] = 'Client'; $wb['name_txt'] = 'PHP Name'; $wb['active_txt'] = 'Active'; $wb['usage_txt'] = 'Usage count'; +$wb['sortprio_txt'] = 'Priority'; ?> diff --git a/interface/web/admin/lib/lang/it_server_php.lng b/interface/web/admin/lib/lang/it_server_php.lng index 7569ba9b52..d4feb7cb0c 100644 --- a/interface/web/admin/lib/lang/it_server_php.lng +++ b/interface/web/admin/lib/lang/it_server_php.lng @@ -17,4 +17,7 @@ $wb['php_fpm_socket_dir_txt'] = 'PHP-FPM socket directory'; $wb['active_txt'] = 'Attivo'; $wb['php_in_use_error'] = 'Questa versione PHP è in uso.'; $wb['php_name_in_use_error'] = 'Il nome non può essere cambiato.'; +$wb['PHP Sort Priority'] = 'Priority'; +$wb['sortprio_txt'] = 'Priority'; +$wb['sortprio_long_txt'] = 'Priority of PHP version in the PHP version select box
Default PHP has prio 0 if enabled
Lower value is higher priority'; ?> diff --git a/interface/web/admin/lib/lang/it_server_php_list.lng b/interface/web/admin/lib/lang/it_server_php_list.lng index 5ff1ebe314..ca117bf38a 100644 --- a/interface/web/admin/lib/lang/it_server_php_list.lng +++ b/interface/web/admin/lib/lang/it_server_php_list.lng @@ -6,4 +6,5 @@ $wb['client_id_txt'] = 'Cliente'; $wb['name_txt'] = 'Nome PHP'; $wb['active_txt'] = 'Active'; $wb['usage_txt'] = 'Usage count'; +$wb['sortprio_txt'] = 'Priority'; ?> diff --git a/interface/web/admin/lib/lang/ja_server_php.lng b/interface/web/admin/lib/lang/ja_server_php.lng index 491be1aae2..4d71bb50b7 100644 --- a/interface/web/admin/lib/lang/ja_server_php.lng +++ b/interface/web/admin/lib/lang/ja_server_php.lng @@ -17,4 +17,7 @@ $wb['php_fpm_socket_dir_txt'] = 'PHP-FPM socket directory'; $wb['active_txt'] = 'Active'; $wb['php_in_use_error'] = 'This PHP-Version is in use.'; $wb['php_name_in_use_error'] = 'The name can not be changed.'; +$wb['PHP Sort Priority'] = 'Priority'; +$wb['sortprio_txt'] = 'Priority'; +$wb['sortprio_long_txt'] = 'Priority of PHP version in the PHP version select box
Default PHP has prio 0 if enabled
Lower value is higher priority'; ?> diff --git a/interface/web/admin/lib/lang/ja_server_php_list.lng b/interface/web/admin/lib/lang/ja_server_php_list.lng index 291302cbb7..d5e6ad3c7f 100644 --- a/interface/web/admin/lib/lang/ja_server_php_list.lng +++ b/interface/web/admin/lib/lang/ja_server_php_list.lng @@ -6,4 +6,5 @@ $wb['client_id_txt'] = 'Client'; $wb['name_txt'] = 'PHP Name'; $wb['active_txt'] = 'Active'; $wb['usage_txt'] = 'Usage count'; +$wb['sortprio_txt'] = 'Priority'; ?> diff --git a/interface/web/admin/lib/lang/nl_server_php.lng b/interface/web/admin/lib/lang/nl_server_php.lng index 491be1aae2..4d71bb50b7 100644 --- a/interface/web/admin/lib/lang/nl_server_php.lng +++ b/interface/web/admin/lib/lang/nl_server_php.lng @@ -17,4 +17,7 @@ $wb['php_fpm_socket_dir_txt'] = 'PHP-FPM socket directory'; $wb['active_txt'] = 'Active'; $wb['php_in_use_error'] = 'This PHP-Version is in use.'; $wb['php_name_in_use_error'] = 'The name can not be changed.'; +$wb['PHP Sort Priority'] = 'Priority'; +$wb['sortprio_txt'] = 'Priority'; +$wb['sortprio_long_txt'] = 'Priority of PHP version in the PHP version select box
Default PHP has prio 0 if enabled
Lower value is higher priority'; ?> diff --git a/interface/web/admin/lib/lang/nl_server_php_list.lng b/interface/web/admin/lib/lang/nl_server_php_list.lng index 291302cbb7..d5e6ad3c7f 100644 --- a/interface/web/admin/lib/lang/nl_server_php_list.lng +++ b/interface/web/admin/lib/lang/nl_server_php_list.lng @@ -6,4 +6,5 @@ $wb['client_id_txt'] = 'Client'; $wb['name_txt'] = 'PHP Name'; $wb['active_txt'] = 'Active'; $wb['usage_txt'] = 'Usage count'; +$wb['sortprio_txt'] = 'Priority'; ?> diff --git a/interface/web/admin/lib/lang/pl_server_php.lng b/interface/web/admin/lib/lang/pl_server_php.lng index de4ce60ac1..d86e2cf01f 100644 --- a/interface/web/admin/lib/lang/pl_server_php.lng +++ b/interface/web/admin/lib/lang/pl_server_php.lng @@ -17,4 +17,7 @@ $wb['php_fpm_socket_dir_txt'] = 'PHP-FPM socket directory'; $wb['active_txt'] = 'Active'; $wb['php_in_use_error'] = 'This PHP-Version is in use.'; $wb['php_name_in_use_error'] = 'The name can not be changed.'; +$wb['PHP Sort Priority'] = 'Priority'; +$wb['sortprio_txt'] = 'Priority'; +$wb['sortprio_long_txt'] = 'Priority of PHP version in the PHP version select box
Default PHP has prio 0 if enabled
Lower value is higher priority'; ?> diff --git a/interface/web/admin/lib/lang/pl_server_php_list.lng b/interface/web/admin/lib/lang/pl_server_php_list.lng index 291302cbb7..d5e6ad3c7f 100644 --- a/interface/web/admin/lib/lang/pl_server_php_list.lng +++ b/interface/web/admin/lib/lang/pl_server_php_list.lng @@ -6,4 +6,5 @@ $wb['client_id_txt'] = 'Client'; $wb['name_txt'] = 'PHP Name'; $wb['active_txt'] = 'Active'; $wb['usage_txt'] = 'Usage count'; +$wb['sortprio_txt'] = 'Priority'; ?> diff --git a/interface/web/admin/lib/lang/pt_server_php.lng b/interface/web/admin/lib/lang/pt_server_php.lng index 491be1aae2..4d71bb50b7 100644 --- a/interface/web/admin/lib/lang/pt_server_php.lng +++ b/interface/web/admin/lib/lang/pt_server_php.lng @@ -17,4 +17,7 @@ $wb['php_fpm_socket_dir_txt'] = 'PHP-FPM socket directory'; $wb['active_txt'] = 'Active'; $wb['php_in_use_error'] = 'This PHP-Version is in use.'; $wb['php_name_in_use_error'] = 'The name can not be changed.'; +$wb['PHP Sort Priority'] = 'Priority'; +$wb['sortprio_txt'] = 'Priority'; +$wb['sortprio_long_txt'] = 'Priority of PHP version in the PHP version select box
Default PHP has prio 0 if enabled
Lower value is higher priority'; ?> diff --git a/interface/web/admin/lib/lang/pt_server_php_list.lng b/interface/web/admin/lib/lang/pt_server_php_list.lng index 291302cbb7..d5e6ad3c7f 100644 --- a/interface/web/admin/lib/lang/pt_server_php_list.lng +++ b/interface/web/admin/lib/lang/pt_server_php_list.lng @@ -6,4 +6,5 @@ $wb['client_id_txt'] = 'Client'; $wb['name_txt'] = 'PHP Name'; $wb['active_txt'] = 'Active'; $wb['usage_txt'] = 'Usage count'; +$wb['sortprio_txt'] = 'Priority'; ?> diff --git a/interface/web/admin/lib/lang/ro_server_php.lng b/interface/web/admin/lib/lang/ro_server_php.lng index 491be1aae2..4d71bb50b7 100644 --- a/interface/web/admin/lib/lang/ro_server_php.lng +++ b/interface/web/admin/lib/lang/ro_server_php.lng @@ -17,4 +17,7 @@ $wb['php_fpm_socket_dir_txt'] = 'PHP-FPM socket directory'; $wb['active_txt'] = 'Active'; $wb['php_in_use_error'] = 'This PHP-Version is in use.'; $wb['php_name_in_use_error'] = 'The name can not be changed.'; +$wb['PHP Sort Priority'] = 'Priority'; +$wb['sortprio_txt'] = 'Priority'; +$wb['sortprio_long_txt'] = 'Priority of PHP version in the PHP version select box
Default PHP has prio 0 if enabled
Lower value is higher priority'; ?> diff --git a/interface/web/admin/lib/lang/ro_server_php_list.lng b/interface/web/admin/lib/lang/ro_server_php_list.lng index 291302cbb7..d5e6ad3c7f 100644 --- a/interface/web/admin/lib/lang/ro_server_php_list.lng +++ b/interface/web/admin/lib/lang/ro_server_php_list.lng @@ -6,4 +6,5 @@ $wb['client_id_txt'] = 'Client'; $wb['name_txt'] = 'PHP Name'; $wb['active_txt'] = 'Active'; $wb['usage_txt'] = 'Usage count'; +$wb['sortprio_txt'] = 'Priority'; ?> diff --git a/interface/web/admin/lib/lang/ru_server_php.lng b/interface/web/admin/lib/lang/ru_server_php.lng index c5c4942b8e..ca1a8147a3 100644 --- a/interface/web/admin/lib/lang/ru_server_php.lng +++ b/interface/web/admin/lib/lang/ru_server_php.lng @@ -17,4 +17,7 @@ $wb['php_fpm_socket_dir_txt'] = 'PHP-FPM socket directory'; $wb['active_txt'] = 'Active'; $wb['php_in_use_error'] = 'This PHP-Version is in use.'; $wb['php_name_in_use_error'] = 'The name can not be changed.'; +$wb['PHP Sort Priority'] = 'Priority'; +$wb['sortprio_txt'] = 'Priority'; +$wb['sortprio_long_txt'] = 'Priority of PHP version in the PHP version select box
Default PHP has prio 0 if enabled
Lower value is higher priority'; ?> diff --git a/interface/web/admin/lib/lang/ru_server_php_list.lng b/interface/web/admin/lib/lang/ru_server_php_list.lng index 5be582f23d..1a2068057f 100644 --- a/interface/web/admin/lib/lang/ru_server_php_list.lng +++ b/interface/web/admin/lib/lang/ru_server_php_list.lng @@ -6,4 +6,5 @@ $wb['client_id_txt'] = 'ID Клиента'; $wb['name_txt'] = 'Имя PHP'; $wb['active_txt'] = 'Active'; $wb['usage_txt'] = 'Usage count'; +$wb['sortprio_txt'] = 'Priority'; ?> diff --git a/interface/web/admin/lib/lang/se_server_php.lng b/interface/web/admin/lib/lang/se_server_php.lng index 491be1aae2..4d71bb50b7 100644 --- a/interface/web/admin/lib/lang/se_server_php.lng +++ b/interface/web/admin/lib/lang/se_server_php.lng @@ -17,4 +17,7 @@ $wb['php_fpm_socket_dir_txt'] = 'PHP-FPM socket directory'; $wb['active_txt'] = 'Active'; $wb['php_in_use_error'] = 'This PHP-Version is in use.'; $wb['php_name_in_use_error'] = 'The name can not be changed.'; +$wb['PHP Sort Priority'] = 'Priority'; +$wb['sortprio_txt'] = 'Priority'; +$wb['sortprio_long_txt'] = 'Priority of PHP version in the PHP version select box
Default PHP has prio 0 if enabled
Lower value is higher priority'; ?> diff --git a/interface/web/admin/lib/lang/se_server_php_list.lng b/interface/web/admin/lib/lang/se_server_php_list.lng index b2f8b55112..86adb0f2a6 100644 --- a/interface/web/admin/lib/lang/se_server_php_list.lng +++ b/interface/web/admin/lib/lang/se_server_php_list.lng @@ -6,4 +6,5 @@ $wb['client_id_txt'] = 'Kund'; $wb['name_txt'] = 'PHP-namn'; $wb['active_txt'] = 'Active'; $wb['usage_txt'] = 'Usage count'; +$wb['sortprio_txt'] = 'Priority'; ?> diff --git a/interface/web/admin/lib/lang/sk_server_php.lng b/interface/web/admin/lib/lang/sk_server_php.lng index 491be1aae2..4d71bb50b7 100644 --- a/interface/web/admin/lib/lang/sk_server_php.lng +++ b/interface/web/admin/lib/lang/sk_server_php.lng @@ -17,4 +17,7 @@ $wb['php_fpm_socket_dir_txt'] = 'PHP-FPM socket directory'; $wb['active_txt'] = 'Active'; $wb['php_in_use_error'] = 'This PHP-Version is in use.'; $wb['php_name_in_use_error'] = 'The name can not be changed.'; +$wb['PHP Sort Priority'] = 'Priority'; +$wb['sortprio_txt'] = 'Priority'; +$wb['sortprio_long_txt'] = 'Priority of PHP version in the PHP version select box
Default PHP has prio 0 if enabled
Lower value is higher priority'; ?> diff --git a/interface/web/admin/lib/lang/sk_server_php_list.lng b/interface/web/admin/lib/lang/sk_server_php_list.lng index 291302cbb7..d5e6ad3c7f 100644 --- a/interface/web/admin/lib/lang/sk_server_php_list.lng +++ b/interface/web/admin/lib/lang/sk_server_php_list.lng @@ -6,4 +6,5 @@ $wb['client_id_txt'] = 'Client'; $wb['name_txt'] = 'PHP Name'; $wb['active_txt'] = 'Active'; $wb['usage_txt'] = 'Usage count'; +$wb['sortprio_txt'] = 'Priority'; ?> diff --git a/interface/web/admin/lib/lang/tr_server_php.lng b/interface/web/admin/lib/lang/tr_server_php.lng index 71b130e3d2..914d28f167 100644 --- a/interface/web/admin/lib/lang/tr_server_php.lng +++ b/interface/web/admin/lib/lang/tr_server_php.lng @@ -17,4 +17,7 @@ $wb['php_fpm_socket_dir_txt'] = 'PHP-FPM socket directory'; $wb['active_txt'] = 'Etkin'; $wb['php_in_use_error'] = 'This PHP-Version is in use.'; $wb['php_name_in_use_error'] = 'The name can not be changed.'; +$wb['PHP Sort Priority'] = 'Priority'; +$wb['sortprio_txt'] = 'Priority'; +$wb['sortprio_long_txt'] = 'Priority of PHP version in the PHP version select box
Default PHP has prio 0 if enabled
Lower value is higher priority'; ?> diff --git a/interface/web/admin/lib/lang/tr_server_php_list.lng b/interface/web/admin/lib/lang/tr_server_php_list.lng index 4468e7ead9..82fb3cc32e 100644 --- a/interface/web/admin/lib/lang/tr_server_php_list.lng +++ b/interface/web/admin/lib/lang/tr_server_php_list.lng @@ -6,4 +6,5 @@ $wb['client_id_txt'] = 'Müşteri'; $wb['name_txt'] = 'PHP Adı'; $wb['active_txt'] = 'Etkin'; $wb['usage_txt'] = 'Usage count'; +$wb['sortprio_txt'] = 'Priority'; ?> diff --git a/interface/web/admin/server_php_edit.php b/interface/web/admin/server_php_edit.php index a9e7b38bbb..8ad055624d 100644 --- a/interface/web/admin/server_php_edit.php +++ b/interface/web/admin/server_php_edit.php @@ -54,7 +54,13 @@ function onSubmit() { parent::onSubmit(); } function onBeforeUpdate() { - global $app; + + global $app; + + //check if Prio tab got update/save if yes disable datalog update - not needed + if(isset($this->dataRecord["sortprio"])) { + $app->tform->formDef['db_history'] = 'no'; + } //* Check if the server has been changed // We do this only for the admin or reseller users, as normal clients can not change the server ID anyway diff --git a/interface/web/admin/templates/server_php_list.htm b/interface/web/admin/templates/server_php_list.htm index a2595a8474..5f6fae91db 100644 --- a/interface/web/admin/templates/server_php_list.htm +++ b/interface/web/admin/templates/server_php_list.htm @@ -19,6 +19,7 @@

+ {tmpl_var name='search_limit'} @@ -27,7 +28,7 @@

- + @@ -40,7 +41,8 @@

{tmpl_var name="server_id"} {tmpl_var name="client_id"} {tmpl_var name="name"} - {tmpl_var name="usage"} + {tmpl_var name="sortprio"} + {tmpl_var name="usage"} diff --git a/interface/web/admin/templates/server_php_sort_edit.htm b/interface/web/admin/templates/server_php_sort_edit.htm new file mode 100644 index 0000000000..c7ca24adfa --- /dev/null +++ b/interface/web/admin/templates/server_php_sort_edit.htm @@ -0,0 +1,11 @@ +
+ +
+
+ + + +
+ + +
diff --git a/interface/web/sites/ajax_get_json.php b/interface/web/sites/ajax_get_json.php index 936a584f20..f1d8433c8a 100644 --- a/interface/web/sites/ajax_get_json.php +++ b/interface/web/sites/ajax_get_json.php @@ -64,7 +64,7 @@ } if($type == 'getserverphp'){ - $json = '{'; + $json = '{"phpversion":['; //Wrap Objects into Array because chrome reorder objects itself $server_type = 'apache'; $web_config = $app->getconf->get_server_config($server_id, 'web'); @@ -74,10 +74,10 @@ //* Client: If the logged in user is not admin and has no sub clients (no reseller) if($_SESSION["s"]["user"]["typ"] != 'admin' && !$app->auth->has_clients($_SESSION['s']['user']['userid'])) { - $sql_where = " AND (client_id = 0 OR client_id = ".$app->functions->intval($_SESSION["s"]["user"]["client_id"]) . ")"; + $sql_where = " AND (client_id = 0 OR client_id = ".$app->functions->intval($_SESSION["s"]["user"]["client_id"]) . ") ORDER BY sortprio"; //* Reseller: If the logged in user is not admin and has sub clients (is a reseller) } elseif ($_SESSION["s"]["user"]["typ"] != 'admin' && $app->auth->has_clients($_SESSION['s']['user']['userid'])) { - $client = $app->db->queryOneRecord("SELECT client_id FROM sys_group WHERE groupid = ?", $client_group_id); + $client = $app->db->queryOneRecord("SELECT client_id FROM sys_group WHERE groupid = ? ORDER BY sortprio", $client_group_id); //$sql_where = " AND (client_id = 0 OR client_id = ".$_SESSION["s"]["user"]["client_id"]; $sql_where = " AND (client_id = 0"; if($app->functions->intval($client['client_id']) > 0) $sql_where .= " OR client_id = ".$app->functions->intval($client['client_id']); @@ -89,7 +89,7 @@ //$sql_where = " AND (client_id = 0 OR client_id = ".$_SESSION["s"]["user"]["client_id"]; $sql_where = " AND (client_id = 0"; if($app->functions->intval($client['client_id']) > 0) $sql_where .= " OR client_id = ".$app->functions->intval($client['client_id']); - $sql_where .= ")"; + $sql_where .= ") ORDER BY sortprio"; } $php_records = array(); @@ -98,10 +98,11 @@ } elseif($php_type == 'fast-cgi'){ $php_records = $app->db->queryAllRecords("SELECT * FROM server_php WHERE php_fastcgi_binary != '' AND php_fastcgi_ini_dir != '' AND server_id = ? AND active = 'y'".$sql_where, $server_id); } + $usePHPDefault=false; + $usePHPDefaultDone=false; if (empty($web_config['php_default_hide']) || 'n' === $web_config['php_default_hide']) { - $php_records[]=array('name' => $app->functions->htmlentities($web_config['php_default_name'])); + $usePHPDefault=true; } - uasort($php_records, 'sort_php'); $php_select = ""; if(is_array($php_records) && !empty($php_records)) { foreach( $php_records as $php_record) { @@ -110,16 +111,17 @@ } else { $php_version = $php_record['server_php_id']; } - if($php_record['name'] != $web_config['php_default_name']) { - $json .= '"'.$php_version.'": "'.$php_record['name'].'",'; - } else { - $json .= '"0": "'.$php_record['name'].'",'; - } + if ($php_record['sortprio'] > 0 && $usePHPDefault && $usePHPDefaultDone == false) //if DefaultPHP is enable insert it on virtual position 0 + { + $json .= '{"0": "'.$web_config['php_default_name'].'"},'; + $usePHPDefaultDone = true; + } + $json .= '{"'.$php_version.'": "'.$php_record['name'].'"},'; } } unset($php_records); if(substr($json, -1) == ',') $json = substr($json, 0, -1); - $json .= '}'; + $json .= ']}'; } if($type == 'getphptype'){ diff --git a/interface/web/sites/templates/web_vhost_domain_edit.htm b/interface/web/sites/templates/web_vhost_domain_edit.htm index c4421aac74..356e03e2dc 100644 --- a/interface/web/sites/templates/web_vhost_domain_edit.htm +++ b/interface/web/sites/templates/web_vhost_domain_edit.htm @@ -456,7 +456,9 @@ //var options = ''; var options = ''; var serverphpidselected = ''; - $.each(data, function(key, val) { + $.each(data.phpversion, function(akey,aval) { + key=Object.getOwnPropertyNames(aval)[0]; + val=aval[key]; if($('#server_php_id').val() == key){ serverphpidselected = ' selected="selected"'; From f55392a0e32b2924f0497ff4216ba53c3d486f03 Mon Sep 17 00:00:00 2001 From: Michael Seevogel Date: Thu, 27 Apr 2023 17:36:55 +0200 Subject: [PATCH 117/621] Misc PHP 8.x fixes --- install/lib/installer_base.lib.php | 10 +++++----- install/update.php | 12 ++++++------ server/plugins-available/firewall_plugin.inc.php | 2 +- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php index d0aab93088..482a8444bf 100644 --- a/install/lib/installer_base.lib.php +++ b/install/lib/installer_base.lib.php @@ -1136,7 +1136,7 @@ public function configure_postfix($options = '') { //* If there are RBL's defined, format the list and add them to smtp_recipient_restrictions to prevent removal after an update $rbl_list = ''; - if (@isset($server_ini_array['mail']['realtime_blackhole_list']) && $server_ini_array['mail']['realtime_blackhole_list'] != '') { + if(@isset($server_ini_array['mail']['realtime_blackhole_list']) && $server_ini_array['mail']['realtime_blackhole_list'] != '') { $rbl_hosts = explode(",", str_replace(" ", "", $server_ini_array['mail']['realtime_blackhole_list'])); foreach ($rbl_hosts as $key => $value) { $rbl_list .= ", reject_rbl_client ". $value; @@ -1146,13 +1146,13 @@ public function configure_postfix($options = '') { //* If Postgrey is installed, configure it $greylisting = ''; - if($conf['postgrey']['installed'] == true) { + if(isset($conf['postgrey']['installed']) && ($conf['postgrey']['installed'] == true)) { $greylisting = ', check_recipient_access mysql:/etc/postfix/mysql-virtual_policy_greylist.cf'; } $reject_sender_login_mismatch = ''; $reject_authenticated_sender_login_mismatch = ''; - if (isset($server_ini_array['mail']['reject_sender_login_mismatch']) && ($server_ini_array['mail']['reject_sender_login_mismatch'] == 'y')) { + if(isset($server_ini_array['mail']['reject_sender_login_mismatch']) && ($server_ini_array['mail']['reject_sender_login_mismatch'] == 'y')) { $reject_sender_login_mismatch = ',reject_sender_login_mismatch,'; $reject_authenticated_sender_login_mismatch = 'reject_authenticated_sender_login_mismatch, '; } @@ -1162,11 +1162,11 @@ public function configure_postfix($options = '') { $stress_adaptive = (isset($server_ini_array['mail']['stress_adaptive']) && ($server_ini_array['mail']['stress_adaptive'] == 'y')) ? '' : $stress_adaptive_placeholder; $reject_unknown_client_hostname=''; - if (isset($server_ini_array['mail']['reject_unknown']) && ($server_ini_array['mail']['reject_unknown'] == 'client' || $server_ini_array['mail']['reject_unknown'] == 'client_helo')) { + if(isset($server_ini_array['mail']['reject_unknown']) && ($server_ini_array['mail']['reject_unknown'] == 'client' || $server_ini_array['mail']['reject_unknown'] == 'client_helo')) { $reject_unknown_client_hostname=',reject_unknown_client_hostname'; } $reject_unknown_helo_hostname=''; - if ((!isset($server_ini_array['mail']['reject_unknown'])) || $server_ini_array['mail']['reject_unknown'] == 'helo' || $server_ini_array['mail']['reject_unknown'] == 'client_helo') { + if((!isset($server_ini_array['mail']['reject_unknown'])) || $server_ini_array['mail']['reject_unknown'] == 'helo' || $server_ini_array['mail']['reject_unknown'] == 'client_helo') { $reject_unknown_helo_hostname=',reject_unknown_helo_hostname'; } diff --git a/install/update.php b/install/update.php index d0b63d8605..ea5041f5c8 100644 --- a/install/update.php +++ b/install/update.php @@ -366,12 +366,12 @@ //** Check for current service config state and compare to our results if ($conf['mysql']['master_slave_setup'] == 'y') $current_svc_config = $inst->dbmaster->queryOneRecord("SELECT mail_server,web_server,dns_server,xmpp_server,firewall_server,vserver_server,db_server FROM ?? WHERE server_id=?", $conf['mysql']['master_database'] . '.server', $conf['server_id']); else $current_svc_config = $inst->db->queryOneRecord("SELECT mail_server,web_server,dns_server,xmpp_server,firewall_server,vserver_server,db_server FROM ?? WHERE server_id=?", $conf["mysql"]["database"] . '.server', $conf['server_id']); -$conf['services']['mail'] = check_service_config_state('mail_server', $conf['postfix']['installed']); -$conf['services']['dns'] = check_service_config_state('dns_server', ($conf['powerdns']['installed'] || $conf['bind']['installed'] || $conf['mydns']['installed'])); -$conf['services']['web'] = check_service_config_state('web_server', ($conf['apache']['installed'] || $conf['nginx']['installed'])); -$conf['services']['xmpp'] = check_service_config_state('xmpp_server', $conf['xmpp']['installed']); -$conf['services']['firewall'] = check_service_config_state('firewall_server', ($conf['ufw']['installed'] || $conf['firewall']['installed'])); -$conf['services']['vserver'] = check_service_config_state('vserver_server', $conf['services']['vserver']); +$conf['services']['mail'] = check_service_config_state('mail_server', isset($conf['postfix']['installed'])); +$conf['services']['dns'] = check_service_config_state('dns_server', (isset($conf['powerdns']['installed']) || isset($conf['bind']['installed']) || isset($conf['mydns']['installed']))); +$conf['services']['web'] = check_service_config_state('web_server', (isset($conf['apache']['installed']) || isset($conf['nginx']['installed']))); +$conf['services']['xmpp'] = check_service_config_state('xmpp_server', isset($conf['xmpp']['installed'])); +$conf['services']['firewall'] = check_service_config_state('firewall_server', (isset($conf['ufw']['installed']) || isset($conf['firewall']['installed']))); +$conf['services']['vserver'] = check_service_config_state('vserver_server', isset($conf['services']['vserver'])); $conf['services']['db'] = check_service_config_state('db_server', true); /* Will always offer as MySQL is of course installed on this host as it's a requirement for ISPC to work... */ unset($current_svc_config); diff --git a/server/plugins-available/firewall_plugin.inc.php b/server/plugins-available/firewall_plugin.inc.php index b924f43a26..3545f573ee 100644 --- a/server/plugins-available/firewall_plugin.inc.php +++ b/server/plugins-available/firewall_plugin.inc.php @@ -38,7 +38,7 @@ class firewall_plugin { public function onInstall() { global $conf; - if(($conf['bastille']['installed'] == true || $conf['ufw']['installed'] == true || $conf['firewall']['installed'] == true) && $conf['services']['firewall'] == true) { + if((isset($conf['bastille']['installed']) && $conf['bastille']['installed'] == true || isset($conf['ufw']['installed']) && $conf['ufw']['installed'] == true || isset($conf['firewall']['installed']) && $conf['firewall']['installed'] == true || isset($conf['services']['firewall']) && $conf['services']['firewall'] == true)) { return true; } else { return false; From c2a01f35eaf74d590d09166c1d9343df2e800b50 Mon Sep 17 00:00:00 2001 From: Michael Seevogel Date: Thu, 27 Apr 2023 22:52:52 +0200 Subject: [PATCH 118/621] Switch check_service_config_state part to if constructs --- install/update.php | 33 +++++++++++++++++++++++++++------ 1 file changed, 27 insertions(+), 6 deletions(-) diff --git a/install/update.php b/install/update.php index ea5041f5c8..8c4bb15113 100644 --- a/install/update.php +++ b/install/update.php @@ -366,15 +366,36 @@ //** Check for current service config state and compare to our results if ($conf['mysql']['master_slave_setup'] == 'y') $current_svc_config = $inst->dbmaster->queryOneRecord("SELECT mail_server,web_server,dns_server,xmpp_server,firewall_server,vserver_server,db_server FROM ?? WHERE server_id=?", $conf['mysql']['master_database'] . '.server', $conf['server_id']); else $current_svc_config = $inst->db->queryOneRecord("SELECT mail_server,web_server,dns_server,xmpp_server,firewall_server,vserver_server,db_server FROM ?? WHERE server_id=?", $conf["mysql"]["database"] . '.server', $conf['server_id']); -$conf['services']['mail'] = check_service_config_state('mail_server', isset($conf['postfix']['installed'])); -$conf['services']['dns'] = check_service_config_state('dns_server', (isset($conf['powerdns']['installed']) || isset($conf['bind']['installed']) || isset($conf['mydns']['installed']))); -$conf['services']['web'] = check_service_config_state('web_server', (isset($conf['apache']['installed']) || isset($conf['nginx']['installed']))); -$conf['services']['xmpp'] = check_service_config_state('xmpp_server', isset($conf['xmpp']['installed'])); -$conf['services']['firewall'] = check_service_config_state('firewall_server', (isset($conf['ufw']['installed']) || isset($conf['firewall']['installed']))); -$conf['services']['vserver'] = check_service_config_state('vserver_server', isset($conf['services']['vserver'])); + + +if(isset($conf['postfix']['installed']) && $conf['postfix']['installed'] == true) +$conf['services']['mail'] = check_service_config_state('mail_server', true); +else $conf['services']['mail'] = check_service_config_state('mail_server', false); + +if(isset($conf['powerdns']['installed']) && $conf['powerdns']['installed'] == true || isset($conf['bind']['installed']) && $conf['bind']['installed'] == true || isset($conf['mydns']['installed']) && $conf['mydns']['installed'] == true) +$conf['services']['dns'] = check_service_config_state('dns_server', true); +else $conf['services']['dns'] = check_service_config_state('dns_server', false); + +if(isset($conf['apache']['installed']) && $conf['apache']['installed'] == true || isset($conf['nginx']['installed']) && $conf['nginx']['installed'] == true) +$conf['services']['web'] = check_service_config_state('web_server', true); +else $conf['services']['web'] = check_service_config_state('web_server', false); + +if(isset($conf['xmpp']['installed']) && $conf['xmpp']['installed'] == true) +$conf['services']['xmpp'] = check_service_config_state('xmpp_server', true); +else $conf['services']['xmpp'] = check_service_config_state('xmpp_server', false); + +if(isset($conf['ufw']['installed']) && $conf['ufw']['installed'] == true || isset($conf['firewall']['installed']) && $conf['firewall']['installed'] == true) +$conf['services']['firewall'] = check_service_config_state('firewall_server', true); +else $conf['services']['firewall'] = check_service_config_state('firewall_server', false); + +if(isset($conf['vserver']['installed']) && $conf['vserver']['installed'] == true) +$conf['services']['vserver'] = check_service_config_state('vserver_server', true); +else $conf['services']['vserver'] = check_service_config_state('vserver_server', false); + $conf['services']['db'] = check_service_config_state('db_server', true); /* Will always offer as MySQL is of course installed on this host as it's a requirement for ISPC to work... */ unset($current_svc_config); + //** Write new decisions into DB $sql = "UPDATE ?? SET mail_server = '{$conf['services']['mail']}', web_server = '{$conf['services']['web']}', dns_server = '{$conf['services']['dns']}', file_server = '{$conf['services']['file']}', db_server = '{$conf['services']['db']}', vserver_server = '{$conf['services']['vserver']}', proxy_server = '{$conf['services']['proxy']}', firewall_server = '{$conf['services']['firewall']}', xmpp_server = '{$conf['services']['xmpp']}' WHERE server_id = ?"; $inst->db->query($sql, $conf['mysql']['database'].'.server', $conf['server_id']); From bfd88937c34d2387057a59a00eedb2e3e6a118c5 Mon Sep 17 00:00:00 2001 From: Judah - MW <6523-maximaweb@users.noreply.git.ispconfig.org> Date: Fri, 28 Apr 2023 09:27:37 +0000 Subject: [PATCH 119/621] Support configurable IMAP prefix per mailbox --- .../sql/incremental/upd_dev_collection.sql | 4 +++- install/sql/ispconfig3.sql | 1 + install/tpl/debian6_dovecot-sql.conf.master | 4 ++-- install/tpl/debian_dovecot-sql.conf.master | 4 ++-- install/tpl/fedora_dovecot-sql.conf.master | 4 ++-- install/tpl/opensuse_dovecot-sql.conf.master | 4 ++-- interface/web/mail/form/mail_user.tform.php | 24 ++++++++++++++++++- interface/web/mail/lib/lang/ar_mail_user.lng | 2 ++ interface/web/mail/lib/lang/bg_mail_user.lng | 2 ++ interface/web/mail/lib/lang/ca_mail_user.lng | 2 ++ interface/web/mail/lib/lang/de_mail_user.lng | 3 +++ interface/web/mail/lib/lang/dk_mail_user.lng | 2 ++ interface/web/mail/lib/lang/el_mail_user.lng | 2 ++ interface/web/mail/lib/lang/en_mail_user.lng | 2 ++ interface/web/mail/lib/lang/es_mail_user.lng | 2 ++ interface/web/mail/lib/lang/fi_mail_user.lng | 2 ++ interface/web/mail/lib/lang/fr_mail_user.lng | 2 ++ interface/web/mail/lib/lang/hr_mail_user.lng | 2 ++ interface/web/mail/lib/lang/hu_mail_user.lng | 2 ++ interface/web/mail/lib/lang/id_mail_user.lng | 2 ++ interface/web/mail/lib/lang/it_mail_user.lng | 2 ++ interface/web/mail/lib/lang/ja_mail_user.lng | 2 ++ interface/web/mail/lib/lang/nl_mail_user.lng | 2 ++ interface/web/mail/lib/lang/pl_mail_user.lng | 2 ++ interface/web/mail/lib/lang/pt_mail_user.lng | 2 ++ interface/web/mail/lib/lang/ro_mail_user.lng | 2 ++ interface/web/mail/lib/lang/ru_mail_user.lng | 2 ++ interface/web/mail/lib/lang/se_mail_user.lng | 2 ++ interface/web/mail/lib/lang/sk_mail_user.lng | 2 ++ interface/web/mail/lib/lang/tr_mail_user.lng | 2 ++ .../mail/templates/mail_user_mailbox_edit.htm | 6 +++++ server/conf/sieve_filter.master | 4 ++-- .../cron.d/500-clean_mailboxes.inc.php | 20 ++++++++++++---- .../maildeliver_plugin.inc.php | 1 + 34 files changed, 106 insertions(+), 17 deletions(-) diff --git a/install/sql/incremental/upd_dev_collection.sql b/install/sql/incremental/upd_dev_collection.sql index c3d8c5b210..55bb0f294a 100644 --- a/install/sql/incremental/upd_dev_collection.sql +++ b/install/sql/incremental/upd_dev_collection.sql @@ -1,2 +1,4 @@ - ALTER TABLE `mail_user` CHANGE `quota` `quota` BIGINT(20) NOT NULL DEFAULT '0'; +-- 5918 add imap_prefix column to mail_user table +ALTER TABLE `mail_user` ADD COLUMN `imap_prefix` varchar(255) NULL default NULL AFTER `backup_copies`; + diff --git a/install/sql/ispconfig3.sql b/install/sql/ispconfig3.sql index e9ed67c86a..985720b845 100644 --- a/install/sql/ispconfig3.sql +++ b/install/sql/ispconfig3.sql @@ -1101,6 +1101,7 @@ CREATE TABLE `mail_user` ( `last_quota_notification` date NULL default NULL, `backup_interval` VARCHAR( 255 ) NOT NULL default 'none', `backup_copies` INT NOT NULL DEFAULT '1', + `imap_prefix` varchar(255) NULL default NULL, PRIMARY KEY (`mailuser_id`), KEY `server_id` (`server_id`,`email`), KEY `email_access` (`email`,`access`) diff --git a/install/tpl/debian6_dovecot-sql.conf.master b/install/tpl/debian6_dovecot-sql.conf.master index d0b5269e13..370c2aa9cb 100644 --- a/install/tpl/debian6_dovecot-sql.conf.master +++ b/install/tpl/debian6_dovecot-sql.conf.master @@ -5,9 +5,9 @@ connect = host={mysql_server_host} dbname={mysql_server_database} user={mysql_se default_pass_scheme = CRYPT # password-query with prefetch -password_query = SELECT email as user, password, maildir as userdb_home, CONCAT( maildir_format, ':', maildir, '/', IF(maildir_format='maildir','Maildir',maildir_format)) as userdb_mail, uid as userdb_uid, gid as userdb_gid, CONCAT('*:storage=', quota, 'B') AS userdb_quota_rule, CONCAT(maildir, '/.sieve') as userdb_sieve FROM mail_user WHERE (login = '%u' OR email = '%u') AND `disable%Ls` = 'n' AND server_id = '{server_id}' AND NOT EXISTS (SELECT domain_id FROM mail_domain WHERE domain = '%d' AND active = 'n' AND server_id = {server_id}) +password_query = SELECT email as user, password, maildir as userdb_home, CONCAT( maildir_format, ':', maildir, '/', IF(maildir_format='maildir','Maildir',maildir_format)) as userdb_mail, uid as userdb_uid, gid as userdb_gid, CONCAT('*:storage=', quota, 'B') AS userdb_quota_rule, CONCAT(maildir, '/.sieve') as userdb_sieve, NULLIF(imap_prefix, '') as "userdb_namespace/inbox/prefix" FROM mail_user WHERE (login = '%u' OR email = '%u') AND `disable%Ls` = 'n' AND server_id = '{server_id}' AND NOT EXISTS (SELECT domain_id FROM mail_domain WHERE domain = '%d' AND active = 'n' AND server_id = {server_id}) -user_query = SELECT email as user, maildir as home, CONCAT( maildir_format, ':', maildir, '/', IF(maildir_format='maildir','Maildir',maildir_format)) as mail, uid, gid, CONCAT('*:storage=', quota, 'B') AS quota_rule, CONCAT(maildir, '/.sieve') as sieve FROM mail_user WHERE (login = '%u' OR email = '%u') AND `disable%Ls` = 'n' AND server_id = '{server_id}' +user_query = SELECT email as user, maildir as home, CONCAT( maildir_format, ':', maildir, '/', IF(maildir_format='maildir','Maildir',maildir_format)) as mail, uid, gid, CONCAT('*:storage=', quota, 'B') AS quota_rule, CONCAT(maildir, '/.sieve') as sieve, NULLIF(imap_prefix, '') as "namespace/inbox/prefix" FROM mail_user WHERE (login = '%u' OR email = '%u') AND `disable%Ls` = 'n' AND server_id = '{server_id}' # The iterate_query is required for the doveadm command only and works only on dovecot 2 servers. # Do not enable it on Dovecot 1.x servers diff --git a/install/tpl/debian_dovecot-sql.conf.master b/install/tpl/debian_dovecot-sql.conf.master index d0b5269e13..370c2aa9cb 100644 --- a/install/tpl/debian_dovecot-sql.conf.master +++ b/install/tpl/debian_dovecot-sql.conf.master @@ -5,9 +5,9 @@ connect = host={mysql_server_host} dbname={mysql_server_database} user={mysql_se default_pass_scheme = CRYPT # password-query with prefetch -password_query = SELECT email as user, password, maildir as userdb_home, CONCAT( maildir_format, ':', maildir, '/', IF(maildir_format='maildir','Maildir',maildir_format)) as userdb_mail, uid as userdb_uid, gid as userdb_gid, CONCAT('*:storage=', quota, 'B') AS userdb_quota_rule, CONCAT(maildir, '/.sieve') as userdb_sieve FROM mail_user WHERE (login = '%u' OR email = '%u') AND `disable%Ls` = 'n' AND server_id = '{server_id}' AND NOT EXISTS (SELECT domain_id FROM mail_domain WHERE domain = '%d' AND active = 'n' AND server_id = {server_id}) +password_query = SELECT email as user, password, maildir as userdb_home, CONCAT( maildir_format, ':', maildir, '/', IF(maildir_format='maildir','Maildir',maildir_format)) as userdb_mail, uid as userdb_uid, gid as userdb_gid, CONCAT('*:storage=', quota, 'B') AS userdb_quota_rule, CONCAT(maildir, '/.sieve') as userdb_sieve, NULLIF(imap_prefix, '') as "userdb_namespace/inbox/prefix" FROM mail_user WHERE (login = '%u' OR email = '%u') AND `disable%Ls` = 'n' AND server_id = '{server_id}' AND NOT EXISTS (SELECT domain_id FROM mail_domain WHERE domain = '%d' AND active = 'n' AND server_id = {server_id}) -user_query = SELECT email as user, maildir as home, CONCAT( maildir_format, ':', maildir, '/', IF(maildir_format='maildir','Maildir',maildir_format)) as mail, uid, gid, CONCAT('*:storage=', quota, 'B') AS quota_rule, CONCAT(maildir, '/.sieve') as sieve FROM mail_user WHERE (login = '%u' OR email = '%u') AND `disable%Ls` = 'n' AND server_id = '{server_id}' +user_query = SELECT email as user, maildir as home, CONCAT( maildir_format, ':', maildir, '/', IF(maildir_format='maildir','Maildir',maildir_format)) as mail, uid, gid, CONCAT('*:storage=', quota, 'B') AS quota_rule, CONCAT(maildir, '/.sieve') as sieve, NULLIF(imap_prefix, '') as "namespace/inbox/prefix" FROM mail_user WHERE (login = '%u' OR email = '%u') AND `disable%Ls` = 'n' AND server_id = '{server_id}' # The iterate_query is required for the doveadm command only and works only on dovecot 2 servers. # Do not enable it on Dovecot 1.x servers diff --git a/install/tpl/fedora_dovecot-sql.conf.master b/install/tpl/fedora_dovecot-sql.conf.master index d0b5269e13..370c2aa9cb 100644 --- a/install/tpl/fedora_dovecot-sql.conf.master +++ b/install/tpl/fedora_dovecot-sql.conf.master @@ -5,9 +5,9 @@ connect = host={mysql_server_host} dbname={mysql_server_database} user={mysql_se default_pass_scheme = CRYPT # password-query with prefetch -password_query = SELECT email as user, password, maildir as userdb_home, CONCAT( maildir_format, ':', maildir, '/', IF(maildir_format='maildir','Maildir',maildir_format)) as userdb_mail, uid as userdb_uid, gid as userdb_gid, CONCAT('*:storage=', quota, 'B') AS userdb_quota_rule, CONCAT(maildir, '/.sieve') as userdb_sieve FROM mail_user WHERE (login = '%u' OR email = '%u') AND `disable%Ls` = 'n' AND server_id = '{server_id}' AND NOT EXISTS (SELECT domain_id FROM mail_domain WHERE domain = '%d' AND active = 'n' AND server_id = {server_id}) +password_query = SELECT email as user, password, maildir as userdb_home, CONCAT( maildir_format, ':', maildir, '/', IF(maildir_format='maildir','Maildir',maildir_format)) as userdb_mail, uid as userdb_uid, gid as userdb_gid, CONCAT('*:storage=', quota, 'B') AS userdb_quota_rule, CONCAT(maildir, '/.sieve') as userdb_sieve, NULLIF(imap_prefix, '') as "userdb_namespace/inbox/prefix" FROM mail_user WHERE (login = '%u' OR email = '%u') AND `disable%Ls` = 'n' AND server_id = '{server_id}' AND NOT EXISTS (SELECT domain_id FROM mail_domain WHERE domain = '%d' AND active = 'n' AND server_id = {server_id}) -user_query = SELECT email as user, maildir as home, CONCAT( maildir_format, ':', maildir, '/', IF(maildir_format='maildir','Maildir',maildir_format)) as mail, uid, gid, CONCAT('*:storage=', quota, 'B') AS quota_rule, CONCAT(maildir, '/.sieve') as sieve FROM mail_user WHERE (login = '%u' OR email = '%u') AND `disable%Ls` = 'n' AND server_id = '{server_id}' +user_query = SELECT email as user, maildir as home, CONCAT( maildir_format, ':', maildir, '/', IF(maildir_format='maildir','Maildir',maildir_format)) as mail, uid, gid, CONCAT('*:storage=', quota, 'B') AS quota_rule, CONCAT(maildir, '/.sieve') as sieve, NULLIF(imap_prefix, '') as "namespace/inbox/prefix" FROM mail_user WHERE (login = '%u' OR email = '%u') AND `disable%Ls` = 'n' AND server_id = '{server_id}' # The iterate_query is required for the doveadm command only and works only on dovecot 2 servers. # Do not enable it on Dovecot 1.x servers diff --git a/install/tpl/opensuse_dovecot-sql.conf.master b/install/tpl/opensuse_dovecot-sql.conf.master index d0b5269e13..370c2aa9cb 100644 --- a/install/tpl/opensuse_dovecot-sql.conf.master +++ b/install/tpl/opensuse_dovecot-sql.conf.master @@ -5,9 +5,9 @@ connect = host={mysql_server_host} dbname={mysql_server_database} user={mysql_se default_pass_scheme = CRYPT # password-query with prefetch -password_query = SELECT email as user, password, maildir as userdb_home, CONCAT( maildir_format, ':', maildir, '/', IF(maildir_format='maildir','Maildir',maildir_format)) as userdb_mail, uid as userdb_uid, gid as userdb_gid, CONCAT('*:storage=', quota, 'B') AS userdb_quota_rule, CONCAT(maildir, '/.sieve') as userdb_sieve FROM mail_user WHERE (login = '%u' OR email = '%u') AND `disable%Ls` = 'n' AND server_id = '{server_id}' AND NOT EXISTS (SELECT domain_id FROM mail_domain WHERE domain = '%d' AND active = 'n' AND server_id = {server_id}) +password_query = SELECT email as user, password, maildir as userdb_home, CONCAT( maildir_format, ':', maildir, '/', IF(maildir_format='maildir','Maildir',maildir_format)) as userdb_mail, uid as userdb_uid, gid as userdb_gid, CONCAT('*:storage=', quota, 'B') AS userdb_quota_rule, CONCAT(maildir, '/.sieve') as userdb_sieve, NULLIF(imap_prefix, '') as "userdb_namespace/inbox/prefix" FROM mail_user WHERE (login = '%u' OR email = '%u') AND `disable%Ls` = 'n' AND server_id = '{server_id}' AND NOT EXISTS (SELECT domain_id FROM mail_domain WHERE domain = '%d' AND active = 'n' AND server_id = {server_id}) -user_query = SELECT email as user, maildir as home, CONCAT( maildir_format, ':', maildir, '/', IF(maildir_format='maildir','Maildir',maildir_format)) as mail, uid, gid, CONCAT('*:storage=', quota, 'B') AS quota_rule, CONCAT(maildir, '/.sieve') as sieve FROM mail_user WHERE (login = '%u' OR email = '%u') AND `disable%Ls` = 'n' AND server_id = '{server_id}' +user_query = SELECT email as user, maildir as home, CONCAT( maildir_format, ':', maildir, '/', IF(maildir_format='maildir','Maildir',maildir_format)) as mail, uid, gid, CONCAT('*:storage=', quota, 'B') AS quota_rule, CONCAT(maildir, '/.sieve') as sieve, NULLIF(imap_prefix, '') as "namespace/inbox/prefix" FROM mail_user WHERE (login = '%u' OR email = '%u') AND `disable%Ls` = 'n' AND server_id = '{server_id}' # The iterate_query is required for the doveadm command only and works only on dovecot 2 servers. # Do not enable it on Dovecot 1.x servers diff --git a/interface/web/mail/form/mail_user.tform.php b/interface/web/mail/form/mail_user.tform.php index f513aeb9d3..d135e4f3de 100644 --- a/interface/web/mail/form/mail_user.tform.php +++ b/interface/web/mail/form/mail_user.tform.php @@ -216,6 +216,29 @@ 'maxlength' => '255', 'searchable' => 2 ), + ) +); + +if($app->auth->is_admin()) { + $form["tabs"]['mailuser']['fields'] += array( + 'imap_prefix' => array ( + 'datatype' => 'VARCHAR', + 'formtype' => 'TEXT', + 'filters' => array( + 0 => array( 'event' => 'SAVE', + 'type' => 'STRIPTAGS'), + 1 => array( 'event' => 'SAVE', + 'type' => 'STRIPNL') + ), + 'default' => '', + 'value' => '', + 'width' => '30', + 'maxlength' => '255', + ), + ); +} + +$form["tabs"]['mailuser']['fields'] += array( 'maildir' => array ( 'datatype' => 'VARCHAR', 'formtype' => 'TEXT', @@ -321,7 +344,6 @@ //################################# // END Datatable fields //################################# - ) ); if($global_config['mail']['mail_password_onlyascii'] == 'y') { diff --git a/interface/web/mail/lib/lang/ar_mail_user.lng b/interface/web/mail/lib/lang/ar_mail_user.lng index 36d274c7ab..a879201cb0 100644 --- a/interface/web/mail/lib/lang/ar_mail_user.lng +++ b/interface/web/mail/lib/lang/ar_mail_user.lng @@ -75,4 +75,6 @@ $wb['purge_trash_days_txt'] = 'Purge Trash automatically after X days'; $wb['tooltip_purge_trash_days_txt'] = '0 = disabled'; $wb['purge_junk_days_txt'] = 'Purge Junk automatically after X days'; $wb['tooltip_purge_junk_days_txt'] = '0 = disabled'; +$wb['imap_prefix_txt'] = 'IMAP prefix'; +$wb['tooltip_imap_prefix_txt'] = 'In most cases this should be left empty. To allow seamless per-mailbox migration of legacy systems you can specify a prefix followed by the hierarchy separator. e.g.: \'INBOX.\''; ?> diff --git a/interface/web/mail/lib/lang/bg_mail_user.lng b/interface/web/mail/lib/lang/bg_mail_user.lng index d051c9efd9..3084b0d050 100644 --- a/interface/web/mail/lib/lang/bg_mail_user.lng +++ b/interface/web/mail/lib/lang/bg_mail_user.lng @@ -75,4 +75,6 @@ $wb['purge_trash_days_txt'] = 'Purge Trash automatically after X days'; $wb['tooltip_purge_trash_days_txt'] = '0 = disabled'; $wb['purge_junk_days_txt'] = 'Purge Junk automatically after X days'; $wb['tooltip_purge_junk_days_txt'] = '0 = disabled'; +$wb['imap_prefix_txt'] = 'IMAP prefix'; +$wb['tooltip_imap_prefix_txt'] = 'In most cases this should be left empty. To allow seamless per-mailbox migration of legacy systems you can specify a prefix followed by the hierarchy separator. e.g.: \'INBOX.\''; ?> diff --git a/interface/web/mail/lib/lang/ca_mail_user.lng b/interface/web/mail/lib/lang/ca_mail_user.lng index 0862ca5d1d..9489390a7e 100644 --- a/interface/web/mail/lib/lang/ca_mail_user.lng +++ b/interface/web/mail/lib/lang/ca_mail_user.lng @@ -74,4 +74,6 @@ $wb['purge_trash_days_txt'] = 'Purge Trash automatically after X days'; $wb['tooltip_purge_trash_days_txt'] = '0 = disabled'; $wb['purge_junk_days_txt'] = 'Purge Junk automatically after X days'; $wb['tooltip_purge_junk_days_txt'] = '0 = disabled'; +$wb['imap_prefix_txt'] = 'IMAP prefix'; +$wb['tooltip_imap_prefix_txt'] = 'In most cases this should be left empty. To allow seamless per-mailbox migration of legacy systems you can specify a prefix followed by the hierarchy separator. e.g.: \'INBOX.\''; ?> diff --git a/interface/web/mail/lib/lang/de_mail_user.lng b/interface/web/mail/lib/lang/de_mail_user.lng index 2c49f352ff..db8c85a2da 100644 --- a/interface/web/mail/lib/lang/de_mail_user.lng +++ b/interface/web/mail/lib/lang/de_mail_user.lng @@ -74,4 +74,7 @@ $wb['purge_trash_days_txt'] = 'Papierkorb automatisch nach X Tagen leeren'; $wb['tooltip_purge_trash_days_txt'] = '0 = deaktiviert'; $wb['purge_junk_days_txt'] = 'Junk-Ordner automatisch nach X Tagen leeren'; $wb['tooltip_purge_junk_days_txt'] = '0 = deaktiviert'; +$wb['imap_prefix_txt'] = 'IMAP prefix'; +$wb['tooltip_imap_prefix_txt'] = 'In most cases this should be left empty. To allow seamless per-mailbox migration of legacy systems you can specify a prefix followed by the hierarchy separator. e.g.: \'INBOX.\''; +?> diff --git a/interface/web/mail/lib/lang/dk_mail_user.lng b/interface/web/mail/lib/lang/dk_mail_user.lng index 47b61bf225..d2e7cfd008 100644 --- a/interface/web/mail/lib/lang/dk_mail_user.lng +++ b/interface/web/mail/lib/lang/dk_mail_user.lng @@ -74,4 +74,6 @@ $wb['purge_trash_days_txt'] = 'Purge Trash automatically after X days'; $wb['tooltip_purge_trash_days_txt'] = '0 = disabled'; $wb['purge_junk_days_txt'] = 'Purge Junk automatically after X days'; $wb['tooltip_purge_junk_days_txt'] = '0 = disabled'; +$wb['imap_prefix_txt'] = 'IMAP prefix'; +$wb['tooltip_imap_prefix_txt'] = 'In most cases this should be left empty. To allow seamless per-mailbox migration of legacy systems you can specify a prefix followed by the hierarchy separator. e.g.: \'INBOX.\''; ?> diff --git a/interface/web/mail/lib/lang/el_mail_user.lng b/interface/web/mail/lib/lang/el_mail_user.lng index 4eb1a35455..52b42874dd 100644 --- a/interface/web/mail/lib/lang/el_mail_user.lng +++ b/interface/web/mail/lib/lang/el_mail_user.lng @@ -74,4 +74,6 @@ $wb['purge_trash_days_txt'] = 'Purge Trash automatically after X days'; $wb['tooltip_purge_trash_days_txt'] = '0 = disabled'; $wb['purge_junk_days_txt'] = 'Purge Junk automatically after X days'; $wb['tooltip_purge_junk_days_txt'] = '0 = disabled'; +$wb['imap_prefix_txt'] = 'IMAP prefix'; +$wb['tooltip_imap_prefix_txt'] = 'In most cases this should be left empty. To allow seamless per-mailbox migration of legacy systems you can specify a prefix followed by the hierarchy separator. e.g.: \'INBOX.\''; ?> diff --git a/interface/web/mail/lib/lang/en_mail_user.lng b/interface/web/mail/lib/lang/en_mail_user.lng index 42004fe5fd..96975a1a70 100644 --- a/interface/web/mail/lib/lang/en_mail_user.lng +++ b/interface/web/mail/lib/lang/en_mail_user.lng @@ -74,4 +74,6 @@ $wb['purge_trash_days_txt'] = 'Purge Trash automatically after X days'; $wb['tooltip_purge_trash_days_txt'] = '0 = disabled'; $wb['purge_junk_days_txt'] = 'Purge Junk automatically after X days'; $wb['tooltip_purge_junk_days_txt'] = '0 = disabled'; +$wb['imap_prefix_txt'] = 'IMAP prefix'; +$wb['tooltip_imap_prefix_txt'] = 'In most cases this should be left empty. To allow seamless per-mailbox migration of legacy systems you can specify a prefix followed by the hierarchy separator. e.g.: \'INBOX.\''; ?> diff --git a/interface/web/mail/lib/lang/es_mail_user.lng b/interface/web/mail/lib/lang/es_mail_user.lng index a5299c488d..43e1c3c550 100644 --- a/interface/web/mail/lib/lang/es_mail_user.lng +++ b/interface/web/mail/lib/lang/es_mail_user.lng @@ -74,4 +74,6 @@ $wb['purge_trash_days_txt'] = 'Purge Trash automatically after X days'; $wb['tooltip_purge_trash_days_txt'] = '0 = disabled'; $wb['purge_junk_days_txt'] = 'Purge Junk automatically after X days'; $wb['tooltip_purge_junk_days_txt'] = '0 = disabled'; +$wb['imap_prefix_txt'] = 'IMAP prefix'; +$wb['tooltip_imap_prefix_txt'] = 'In most cases this should be left empty. To allow seamless per-mailbox migration of legacy systems you can specify a prefix followed by the hierarchy separator. e.g.: \'INBOX.\''; ?> diff --git a/interface/web/mail/lib/lang/fi_mail_user.lng b/interface/web/mail/lib/lang/fi_mail_user.lng index 6f9d0639b7..bbb479d463 100644 --- a/interface/web/mail/lib/lang/fi_mail_user.lng +++ b/interface/web/mail/lib/lang/fi_mail_user.lng @@ -75,4 +75,6 @@ $wb['purge_trash_days_txt'] = 'Purge Trash automatically after X days'; $wb['tooltip_purge_trash_days_txt'] = '0 = disabled'; $wb['purge_junk_days_txt'] = 'Purge Junk automatically after X days'; $wb['tooltip_purge_junk_days_txt'] = '0 = disabled'; +$wb['imap_prefix_txt'] = 'IMAP prefix'; +$wb['tooltip_imap_prefix_txt'] = 'In most cases this should be left empty. To allow seamless per-mailbox migration of legacy systems you can specify a prefix followed by the hierarchy separator. e.g.: \'INBOX.\''; ?> diff --git a/interface/web/mail/lib/lang/fr_mail_user.lng b/interface/web/mail/lib/lang/fr_mail_user.lng index ddc82352f0..74abb9de7f 100644 --- a/interface/web/mail/lib/lang/fr_mail_user.lng +++ b/interface/web/mail/lib/lang/fr_mail_user.lng @@ -74,4 +74,6 @@ $wb['purge_trash_days_txt'] = 'Purge Trash automatically after X days'; $wb['tooltip_purge_trash_days_txt'] = '0 = disabled'; $wb['purge_junk_days_txt'] = 'Purge Junk automatically after X days'; $wb['tooltip_purge_junk_days_txt'] = '0 = disabled'; +$wb['imap_prefix_txt'] = 'IMAP prefix'; +$wb['tooltip_imap_prefix_txt'] = 'In most cases this should be left empty. To allow seamless per-mailbox migration of legacy systems you can specify a prefix followed by the hierarchy separator. e.g.: \'INBOX.\''; ?> diff --git a/interface/web/mail/lib/lang/hr_mail_user.lng b/interface/web/mail/lib/lang/hr_mail_user.lng index 6c22395eca..0fa0370ceb 100644 --- a/interface/web/mail/lib/lang/hr_mail_user.lng +++ b/interface/web/mail/lib/lang/hr_mail_user.lng @@ -75,4 +75,6 @@ $wb['purge_trash_days_txt'] = 'Purge Trash automatically after X days'; $wb['tooltip_purge_trash_days_txt'] = '0 = disabled'; $wb['purge_junk_days_txt'] = 'Purge Junk automatically after X days'; $wb['tooltip_purge_junk_days_txt'] = '0 = disabled'; +$wb['imap_prefix_txt'] = 'IMAP prefix'; +$wb['tooltip_imap_prefix_txt'] = 'In most cases this should be left empty. To allow seamless per-mailbox migration of legacy systems you can specify a prefix followed by the hierarchy separator. e.g.: \'INBOX.\''; ?> diff --git a/interface/web/mail/lib/lang/hu_mail_user.lng b/interface/web/mail/lib/lang/hu_mail_user.lng index 7d26eab5cf..1661f5b669 100644 --- a/interface/web/mail/lib/lang/hu_mail_user.lng +++ b/interface/web/mail/lib/lang/hu_mail_user.lng @@ -75,4 +75,6 @@ $wb['purge_trash_days_txt'] = 'Purge Trash automatically after X days'; $wb['tooltip_purge_trash_days_txt'] = '0 = disabled'; $wb['purge_junk_days_txt'] = 'Purge Junk automatically after X days'; $wb['tooltip_purge_junk_days_txt'] = '0 = disabled'; +$wb['imap_prefix_txt'] = 'IMAP prefix'; +$wb['tooltip_imap_prefix_txt'] = 'In most cases this should be left empty. To allow seamless per-mailbox migration of legacy systems you can specify a prefix followed by the hierarchy separator. e.g.: \'INBOX.\''; ?> diff --git a/interface/web/mail/lib/lang/id_mail_user.lng b/interface/web/mail/lib/lang/id_mail_user.lng index 31a8bcb18e..fa5b74e8ea 100644 --- a/interface/web/mail/lib/lang/id_mail_user.lng +++ b/interface/web/mail/lib/lang/id_mail_user.lng @@ -75,4 +75,6 @@ $wb['purge_trash_days_txt'] = 'Purge Trash automatically after X days'; $wb['tooltip_purge_trash_days_txt'] = '0 = disabled'; $wb['purge_junk_days_txt'] = 'Purge Junk automatically after X days'; $wb['tooltip_purge_junk_days_txt'] = '0 = disabled'; +$wb['imap_prefix_txt'] = 'IMAP prefix'; +$wb['tooltip_imap_prefix_txt'] = 'In most cases this should be left empty. To allow seamless per-mailbox migration of legacy systems you can specify a prefix followed by the hierarchy separator. e.g.: \'INBOX.\''; ?> diff --git a/interface/web/mail/lib/lang/it_mail_user.lng b/interface/web/mail/lib/lang/it_mail_user.lng index fbfdfd2ae4..dba7214e90 100644 --- a/interface/web/mail/lib/lang/it_mail_user.lng +++ b/interface/web/mail/lib/lang/it_mail_user.lng @@ -75,4 +75,6 @@ $wb['purge_trash_days_txt'] = 'Svuota automaticamente il Cestino dopo X giorni'; $wb['tooltip_purge_trash_days_txt'] = '0 = Disabilitato'; $wb['purge_junk_days_txt'] = 'Svuota cartella Indesiderati automaticamente dopo X giorni'; $wb['tooltip_purge_junk_days_txt'] = '0 = Disabilitato'; +$wb['imap_prefix_txt'] = 'IMAP prefix'; +$wb['tooltip_imap_prefix_txt'] = 'In most cases this should be left empty. To allow seamless per-mailbox migration of legacy systems you can specify a prefix followed by the hierarchy separator. e.g.: \'INBOX.\''; ?> diff --git a/interface/web/mail/lib/lang/ja_mail_user.lng b/interface/web/mail/lib/lang/ja_mail_user.lng index 961dd4166a..fc094c352a 100644 --- a/interface/web/mail/lib/lang/ja_mail_user.lng +++ b/interface/web/mail/lib/lang/ja_mail_user.lng @@ -75,4 +75,6 @@ $wb['purge_trash_days_txt'] = 'Purge Trash automatically after X days'; $wb['tooltip_purge_trash_days_txt'] = '0 = disabled'; $wb['purge_junk_days_txt'] = 'Purge Junk automatically after X days'; $wb['tooltip_purge_junk_days_txt'] = '0 = disabled'; +$wb['imap_prefix_txt'] = 'IMAP prefix'; +$wb['tooltip_imap_prefix_txt'] = 'In most cases this should be left empty. To allow seamless per-mailbox migration of legacy systems you can specify a prefix followed by the hierarchy separator. e.g.: \'INBOX.\''; ?> diff --git a/interface/web/mail/lib/lang/nl_mail_user.lng b/interface/web/mail/lib/lang/nl_mail_user.lng index f2263aeea5..bf57cd61a9 100644 --- a/interface/web/mail/lib/lang/nl_mail_user.lng +++ b/interface/web/mail/lib/lang/nl_mail_user.lng @@ -74,4 +74,6 @@ $wb['purge_trash_days_txt'] = 'Purge Trash automatically after X days'; $wb['tooltip_purge_trash_days_txt'] = '0 = disabled'; $wb['purge_junk_days_txt'] = 'Purge Junk automatically after X days'; $wb['tooltip_purge_junk_days_txt'] = '0 = disabled'; +$wb['imap_prefix_txt'] = 'IMAP prefix'; +$wb['tooltip_imap_prefix_txt'] = 'In most cases this should be left empty. To allow seamless per-mailbox migration of legacy systems you can specify a prefix followed by the hierarchy separator. e.g.: \'INBOX.\''; ?> diff --git a/interface/web/mail/lib/lang/pl_mail_user.lng b/interface/web/mail/lib/lang/pl_mail_user.lng index 6fe385fb3c..7ed80ace95 100644 --- a/interface/web/mail/lib/lang/pl_mail_user.lng +++ b/interface/web/mail/lib/lang/pl_mail_user.lng @@ -75,4 +75,6 @@ $wb['purge_trash_days_txt'] = 'Purge Trash automatically after X days'; $wb['tooltip_purge_trash_days_txt'] = '0 = disabled'; $wb['purge_junk_days_txt'] = 'Purge Junk automatically after X days'; $wb['tooltip_purge_junk_days_txt'] = '0 = disabled'; +$wb['imap_prefix_txt'] = 'IMAP prefix'; +$wb['tooltip_imap_prefix_txt'] = 'In most cases this should be left empty. To allow seamless per-mailbox migration of legacy systems you can specify a prefix followed by the hierarchy separator. e.g.: \'INBOX.\''; ?> diff --git a/interface/web/mail/lib/lang/pt_mail_user.lng b/interface/web/mail/lib/lang/pt_mail_user.lng index c69e9e00cd..3bc325a52e 100644 --- a/interface/web/mail/lib/lang/pt_mail_user.lng +++ b/interface/web/mail/lib/lang/pt_mail_user.lng @@ -75,4 +75,6 @@ $wb['purge_trash_days_txt'] = 'Purge Trash automatically after X days'; $wb['tooltip_purge_trash_days_txt'] = '0 = disabled'; $wb['purge_junk_days_txt'] = 'Purge Junk automatically after X days'; $wb['tooltip_purge_junk_days_txt'] = '0 = disabled'; +$wb['imap_prefix_txt'] = 'IMAP prefix'; +$wb['tooltip_imap_prefix_txt'] = 'In most cases this should be left empty. To allow seamless per-mailbox migration of legacy systems you can specify a prefix followed by the hierarchy separator. e.g.: \'INBOX.\''; ?> diff --git a/interface/web/mail/lib/lang/ro_mail_user.lng b/interface/web/mail/lib/lang/ro_mail_user.lng index 9970ea87f4..a7f2c4164d 100644 --- a/interface/web/mail/lib/lang/ro_mail_user.lng +++ b/interface/web/mail/lib/lang/ro_mail_user.lng @@ -75,4 +75,6 @@ $wb['purge_trash_days_txt'] = 'Purge Trash automatically after X days'; $wb['tooltip_purge_trash_days_txt'] = '0 = disabled'; $wb['purge_junk_days_txt'] = 'Purge Junk automatically after X days'; $wb['tooltip_purge_junk_days_txt'] = '0 = disabled'; +$wb['imap_prefix_txt'] = 'IMAP prefix'; +$wb['tooltip_imap_prefix_txt'] = 'In most cases this should be left empty. To allow seamless per-mailbox migration of legacy systems you can specify a prefix followed by the hierarchy separator. e.g.: \'INBOX.\''; ?> diff --git a/interface/web/mail/lib/lang/ru_mail_user.lng b/interface/web/mail/lib/lang/ru_mail_user.lng index f35ae2f750..f0ab8c0bba 100644 --- a/interface/web/mail/lib/lang/ru_mail_user.lng +++ b/interface/web/mail/lib/lang/ru_mail_user.lng @@ -75,4 +75,6 @@ $wb['purge_trash_days_txt'] = 'Purge Trash automatically after X days'; $wb['tooltip_purge_trash_days_txt'] = '0 = disabled'; $wb['purge_junk_days_txt'] = 'Purge Junk automatically after X days'; $wb['tooltip_purge_junk_days_txt'] = '0 = disabled'; +$wb['imap_prefix_txt'] = 'IMAP prefix'; +$wb['tooltip_imap_prefix_txt'] = 'In most cases this should be left empty. To allow seamless per-mailbox migration of legacy systems you can specify a prefix followed by the hierarchy separator. e.g.: \'INBOX.\''; ?> diff --git a/interface/web/mail/lib/lang/se_mail_user.lng b/interface/web/mail/lib/lang/se_mail_user.lng index 46f8776755..40c91caaa8 100644 --- a/interface/web/mail/lib/lang/se_mail_user.lng +++ b/interface/web/mail/lib/lang/se_mail_user.lng @@ -75,4 +75,6 @@ $wb['purge_trash_days_txt'] = 'Purge Trash automatically after X days'; $wb['tooltip_purge_trash_days_txt'] = '0 = disabled'; $wb['purge_junk_days_txt'] = 'Purge Junk automatically after X days'; $wb['tooltip_purge_junk_days_txt'] = '0 = disabled'; +$wb['imap_prefix_txt'] = 'IMAP prefix'; +$wb['tooltip_imap_prefix_txt'] = 'In most cases this should be left empty. To allow seamless per-mailbox migration of legacy systems you can specify a prefix followed by the hierarchy separator. e.g.: \'INBOX.\''; ?> diff --git a/interface/web/mail/lib/lang/sk_mail_user.lng b/interface/web/mail/lib/lang/sk_mail_user.lng index b9f59ec403..6af4528543 100644 --- a/interface/web/mail/lib/lang/sk_mail_user.lng +++ b/interface/web/mail/lib/lang/sk_mail_user.lng @@ -75,4 +75,6 @@ $wb['purge_trash_days_txt'] = 'Purge Trash automatically after X days'; $wb['tooltip_purge_trash_days_txt'] = '0 = disabled'; $wb['purge_junk_days_txt'] = 'Purge Junk automatically after X days'; $wb['tooltip_purge_junk_days_txt'] = '0 = disabled'; +$wb['imap_prefix_txt'] = 'IMAP prefix'; +$wb['tooltip_imap_prefix_txt'] = 'In most cases this should be left empty. To allow seamless per-mailbox migration of legacy systems you can specify a prefix followed by the hierarchy separator. e.g.: \'INBOX.\''; ?> diff --git a/interface/web/mail/lib/lang/tr_mail_user.lng b/interface/web/mail/lib/lang/tr_mail_user.lng index 8a0bd4e27a..c3dfbf1ecf 100644 --- a/interface/web/mail/lib/lang/tr_mail_user.lng +++ b/interface/web/mail/lib/lang/tr_mail_user.lng @@ -74,4 +74,6 @@ $wb['purge_trash_days_txt'] = 'Purge Trash automatically after X days'; $wb['tooltip_purge_trash_days_txt'] = '0 = disabled'; $wb['purge_junk_days_txt'] = 'Purge Junk automatically after X days'; $wb['tooltip_purge_junk_days_txt'] = '0 = disabled'; +$wb['imap_prefix_txt'] = 'IMAP prefix'; +$wb['tooltip_imap_prefix_txt'] = 'In most cases this should be left empty. To allow seamless per-mailbox migration of legacy systems you can specify a prefix followed by the hierarchy separator. e.g.: \'INBOX.\''; ?> diff --git a/interface/web/mail/templates/mail_user_mailbox_edit.htm b/interface/web/mail/templates/mail_user_mailbox_edit.htm index 4bc77ac74d..7f6594267b 100644 --- a/interface/web/mail/templates/mail_user_mailbox_edit.htm +++ b/interface/web/mail/templates/mail_user_mailbox_edit.htm @@ -69,6 +69,12 @@
  {tmpl_var name='name_optional_txt'} {tmpl_var name='sender_cc_note_txt'}
+
+ +
+ +
  {tmpl_var name='name_optional_txt'}
+
+ {tmpl_var name='mailbox_soft_delete'} +
diff --git a/server/lib/classes/cron.d/500-clean_mailboxes.inc.php b/server/lib/classes/cron.d/500-clean_mailboxes.inc.php index 4a879dd7d7..cc5e249348 100755 --- a/server/lib/classes/cron.d/500-clean_mailboxes.inc.php +++ b/server/lib/classes/cron.d/500-clean_mailboxes.inc.php @@ -53,15 +53,29 @@ public function onBeforeRun() { public function onRunJob() { global $app, $conf; - $trash_names=array('Trash', 'Papierkorb', 'Deleted Items', 'Deleted Messages', 'Corbeille'); - $junk_names=array('Junk', 'Junk Email', 'SPAM'); + $this->purge_junk_thrash(); + $this->purge_soft_deleted_maildir(); + + parent::onRunJob(); + } + + private function purge_junk_thrash() { + global $app, $conf; + + $trash_names = array('Trash', 'Papierkorb', 'Deleted Items', 'Deleted Messages', 'Corbeille'); + $junk_names = array('Junk', 'Junk Email', 'SPAM'); $expunge_cmd = 'doveadm expunge -u ? mailbox ? sentbefore '; $purge_cmd = 'doveadm purge -u ?'; $recalc_cmd = 'doveadm quota recalc -u ?'; $server_id = intval($conf['server_id']); - $records = $app->db->queryAllRecords("SELECT email, maildir, purge_trash_days, purge_junk_days, imap_prefix FROM mail_user WHERE maildir_format = 'maildir' AND disableimap = 'n' AND server_id = ? AND (purge_trash_days > 0 OR purge_junk_days > 0)", $server_id); + $records = $app->db->queryAllRecords(" + SELECT email, maildir, purge_trash_days, purge_junk_days, imap_prefix + FROM mail_user + WHERE maildir_format = 'maildir' AND disableimap = 'n' AND server_id = ? + AND (purge_trash_days > 0 OR purge_junk_days > 0)", + $server_id); if(is_array($records) && !empty($records)) { foreach($records as $email) { @@ -93,8 +107,34 @@ public function onRunJob() { $app->system->exec_safe($recalc_cmd, $email['email']); } } + } - parent::onRunJob(); + // Purge soft deleted mailboxes. + private function purge_soft_deleted_maildir() { + global $app, $conf; + $mail_config = $app->getconf->get_server_config($conf["server_id"], 'mail'); + + if ($mail_config['mailbox_soft_delete'] == 'y') { + // Backward compatibility for dev installs between 3.2.9 and 3.2.10. + $mail_config['mailbox_soft_delete'] = 7; + } + if ($mail_config['mailbox_soft_delete'] > 0) { + $matched_dirs = glob($mail_config['homedir_path'] . "/*/[a-z0-9.-]*-deleted-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]"); + + if (!empty($matched_dirs)) { + $delay_days = $mail_config['mailbox_soft_delete']; + foreach($matched_dirs as $dir) { + if (is_dir($dir)) { + $mtime = filemtime($dir); + echo "$mtime < " . strtotime("-$delay_days days") ; + if ($mtime < strtotime("-$delay_days days")) { + // do remove + $app->system->exec_safe('rm -rf ?', $dir); + } + } + } + } + } } /* this function is optional if it contains no custom code */ diff --git a/server/scripts/handle_mailbox_soft_deleted.sh b/server/scripts/handle_mailbox_soft_deleted.sh deleted file mode 100644 index 7c7f280839..0000000000 --- a/server/scripts/handle_mailbox_soft_deleted.sh +++ /dev/null @@ -1,49 +0,0 @@ -#!/bin/bash - -# Archive directories for deleted mailboxes. -delay_days=7 - -# Test if there is something to do... to avoid 'No such file or directory' from find later. -ls /var/vmail/*/[a-z0-9.-]*-deleted-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9] >/dev/null 2>&1 -if [ $? != 0 ]; then - exit 0; -fi - -function remove_soft_deleted_mailbox { - dir=$1 - - echo "Purging $dir" - rm -r "$dir" -} - -function compress_soft_deleted_mailbox { - dir=$1 - - backupfile="${dir}.tar.bz2" - - # Test if backup file already exists - if [ -f $backupfile ]; then - # Skip - echo "ERROR: Backupfile($backupfile) exists!" >&2 - continue - fi - - echo "Compressing for $dir" - tar cvfj "$backupfile" --remove-files "$dir" 2> >( grep -v "tar: Removing leading" >&2) -} - -# List deleted mailboxs to archive -# -mtime +7 ===> Only mailboxes deleted more then 7 days ago -# Test that the last dir component matches e.g. xxx-deleted-20220101094242 (14 digits) -# command: xxx-`date "+%Y%m%d%H%M%S"` -find /var/vmail/*/[a-z0-9.-]*-deleted-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9] -maxdepth 0 -type d -mtime +$delay_days | while read line; do - # example $line: "/var/vmail/example.com/info-20220101094242" - - dir=$line - - # Uncomment the desired cleanup method below, or be creative and create your own. - - remove_soft_deleted_mailbox $dir - #compress_soft_deleted_mailbox $dir - -done From 7375ff15aeafd89e2a9f4b00e0e0ccf3e08b1454 Mon Sep 17 00:00:00 2001 From: Herman van Rink Date: Sat, 6 May 2023 15:16:47 +0200 Subject: [PATCH 131/621] Cleanup debug statement --- server/lib/classes/cron.d/500-clean_mailboxes.inc.php | 1 - 1 file changed, 1 deletion(-) diff --git a/server/lib/classes/cron.d/500-clean_mailboxes.inc.php b/server/lib/classes/cron.d/500-clean_mailboxes.inc.php index cc5e249348..e481f28efe 100755 --- a/server/lib/classes/cron.d/500-clean_mailboxes.inc.php +++ b/server/lib/classes/cron.d/500-clean_mailboxes.inc.php @@ -126,7 +126,6 @@ private function purge_soft_deleted_maildir() { foreach($matched_dirs as $dir) { if (is_dir($dir)) { $mtime = filemtime($dir); - echo "$mtime < " . strtotime("-$delay_days days") ; if ($mtime < strtotime("-$delay_days days")) { // do remove $app->system->exec_safe('rm -rf ?', $dir); From e44f640c26e3a61f2f2b0009d98321be2efeea57 Mon Sep 17 00:00:00 2001 From: Herman van Rink Date: Sat, 6 May 2023 16:05:54 +0200 Subject: [PATCH 132/621] Integrate 600-purge_mailboxes.inc.php into 500-clean_mailboxes.inc.php Both are supposed to run before midnight. --- .../cron.d/500-clean_mailboxes.inc.php | 15 ++++ .../cron.d/600-purge_mailboxes.inc.php | 77 ------------------- 2 files changed, 15 insertions(+), 77 deletions(-) delete mode 100644 server/lib/classes/cron.d/600-purge_mailboxes.inc.php diff --git a/server/lib/classes/cron.d/500-clean_mailboxes.inc.php b/server/lib/classes/cron.d/500-clean_mailboxes.inc.php index e481f28efe..a604835249 100755 --- a/server/lib/classes/cron.d/500-clean_mailboxes.inc.php +++ b/server/lib/classes/cron.d/500-clean_mailboxes.inc.php @@ -55,6 +55,7 @@ public function onRunJob() { $this->purge_junk_thrash(); $this->purge_soft_deleted_maildir(); + $this->purge_mdbox_removed(); parent::onRunJob(); } @@ -136,6 +137,20 @@ private function purge_soft_deleted_maildir() { } } + // Remove messages with refcount=0 from mdbox files. + private function purge_mdbox_removed() { + global $app, $conf; + + $sql = "SELECT email FROM mail_user WHERE maildir_format = 'mdbox' AND server_id = ?"; + $records = $app->db->queryAllRecords($sql, $server_id); + + if(is_array($records)) { + foreach($records as $rec) { + $app->system->exec_safe("su -c ?", 'doveadm purge -u "' . $rec["email"] . '"'); + } + } + } + /* this function is optional if it contains no custom code */ public function onAfterRun() { global $app; diff --git a/server/lib/classes/cron.d/600-purge_mailboxes.inc.php b/server/lib/classes/cron.d/600-purge_mailboxes.inc.php deleted file mode 100644 index 451eb56642..0000000000 --- a/server/lib/classes/cron.d/600-purge_mailboxes.inc.php +++ /dev/null @@ -1,77 +0,0 @@ -db->queryAllRecords($sql, $server_id); - - if(is_array($records)) { - foreach($records as $rec){ - $app->system->exec_safe("su -c ?", 'doveadm purge -u "' . $rec["email"] . '"'); - } - } - - parent::onRunJob(); - } - - /* this function is optional if it contains no custom code */ - public function onAfterRun() { - global $app; - - parent::onAfterRun(); - } - -} - -?> From b2cf2a7a19cffc48f1170b78ee4d486e6baa5f56 Mon Sep 17 00:00:00 2001 From: Herman van Rink Date: Sat, 6 May 2023 21:18:46 +0200 Subject: [PATCH 133/621] Use a regular update to avoid waking the slaveserver --- server/lib/classes/cron.d/300-quota_notify.inc.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/server/lib/classes/cron.d/300-quota_notify.inc.php b/server/lib/classes/cron.d/300-quota_notify.inc.php index 2d8ddc5b86..23fff13fc3 100644 --- a/server/lib/classes/cron.d/300-quota_notify.inc.php +++ b/server/lib/classes/cron.d/300-quota_notify.inc.php @@ -232,7 +232,7 @@ public function onRunJob() { // send notifications only if the website is over the quota threshold if($used_ratio <= $web_config['overquota_notify_threshold'] / 100) { // reset notification date - if($rec['last_quota_notification']) $app->dbmaster->datalogUpdate('web_domain', array("last_quota_notification" => null), 'domain_id', $rec['domain_id']); + if($rec['last_quota_notification']) $app->db->query("UPDATE web_domain SET last_quota_notification=null WHERE domain_id=?", $rec['domain_id']); // send notification - everything ok again if($rec['last_quota_notification'] && $web_config['overquota_notify_onok'] == 'y' && ($web_config['overquota_notify_admin'] == 'y' || $web_config['overquota_notify_reseller'] == 'y' || $web_config['overquota_notify_client'] == 'y')) { @@ -274,7 +274,7 @@ public function onRunJob() { //* Send quota notifications if(($web_config['overquota_notify_admin'] == 'y' || $web_config['overquota_notify_reseller'] == 'y' || $web_config['overquota_notify_client'] == 'y') && $send_notification == true) { - $app->dbmaster->datalogUpdate('web_domain', array("last_quota_notification" => date('Y-m-d')), 'domain_id', $rec['domain_id']); + $app->db->query("UPDATE web_domain SET last_quota_notification=? WHERE domain_id=?", date('Y-m-d'), $rec['domain_id']); $placeholders = array('{domain}' => $rec['domain'], '{admin_mail}' => ($global_config['admin_mail'] != ''? $global_config['admin_mail'] : 'root'), @@ -371,7 +371,7 @@ public function onRunJob() { // send notifications only if the mail account is over the quota threshold if($used_ratio <= $mail_config['overquota_notify_threshold'] / 100) { // reset notification date - if($rec['last_quota_notification']) $app->dbmaster->datalogUpdate('mail_user', array("last_quota_notification" => null), 'mailuser_id', $rec['mailuser_id']); + if($rec['last_quota_notification']) $app->db->query("UPDATE mail_user SET last_quota_notification=null WHERE mailuser_id=?", $rec['mailuser_id']); // send notification - everything ok again if($rec['last_quota_notification'] && $mail_config['overquota_notify_onok'] == 'y' && ($mail_config['overquota_notify_admin'] == 'y' || $web_config['overquota_notify_reseller'] == 'y' || $mail_config['overquota_notify_client'] == 'y')) { @@ -413,7 +413,7 @@ public function onRunJob() { elseif($mail_config['overquota_notify_freq'] > 0 && $rec['notified_before'] >= $mail_config['overquota_notify_freq']) $send_notification = true; if(($mail_config['overquota_notify_admin'] == 'y' || $mail_config['overquota_notify_reseller'] == 'y' || $mail_config['overquota_notify_client'] == 'y') && $send_notification == true) { - $app->dbmaster->datalogUpdate('mail_user', array("last_quota_notification" => date('Y-m-d')), 'mailuser_id', $rec['mailuser_id']); + $app->db->query("UPDATE mail_user SET last_quota_notification=? WHERE mailuser_id=?", date('Y-m-d'), $rec['mailuser_id']); $placeholders = array('{email}' => $rec['email'], '{admin_mail}' => ($global_config['admin_mail'] != ''? $global_config['admin_mail'] : 'root'), @@ -502,7 +502,7 @@ public function onRunJob() { //* Send quota notifications if(($web_config['overquota_db_notify_admin'] == 'y' || $web_config['overquota_db_notify_reseller'] == 'y' || $web_config['overquota_db_notify_client'] == 'y') && $send_notification == true) { - $app->dbmaster->datalogUpdate('web_database', array("last_quota_notification" => date('Y-m-d')), 'database_id', $rec['database_id']); + $app->db->query("UPDATE web_database SET last_quota_notification=? WHERE database_id=?", date('Y-m-d'), $rec['database_id']); $placeholders = array( '{database_name}' => $rec['database_name'], '{admin_mail}' => ($global_config['admin_mail'] != ''? $global_config['admin_mail'] : 'root'), @@ -536,7 +536,7 @@ public function onRunJob() { } else { //* reset notification date - if($rec['last_quota_notification']) $app->dbmaster->datalogUpdate('web_database', array("last_quota_notification" => null), 'database_id', $rec['database_id']); + if($rec['last_quota_notification']) $app->db->query("UPDATE web_database SET last_quota_notification=null WHERE database_id=?", $rec['database_id']); // send notification - everything ok again if($rec['last_quota_notification'] && $web_config['overquota_notify_onok'] == 'y' && ($web_config['overquota_db_notify_admin'] == 'y' || $web_config['overquota_db_notify_reseller'] == 'y' || $web_config['overquota_db_notify_client'] == 'y')) { From 56ab7ba4433bad01d80d4b41650f2b292009eeab Mon Sep 17 00:00:00 2001 From: Herman van Rink Date: Sat, 6 May 2023 23:12:34 +0200 Subject: [PATCH 134/621] Add English lng file --- interface/web/admin/lib/lang/en_server_config.lng | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/interface/web/admin/lib/lang/en_server_config.lng b/interface/web/admin/lib/lang/en_server_config.lng index 1ee224a44a..40b82c7780 100644 --- a/interface/web/admin/lib/lang/en_server_config.lng +++ b/interface/web/admin/lib/lang/en_server_config.lng @@ -356,4 +356,10 @@ $wb['jailkit_hardlinks_allow_txt'] = 'Allow hardlinks within the jail'; $wb['jailkit_hardlinks_no_txt'] = 'No, remove hardlinked files'; $wb['jailkit_hardlinks_yes_txt'] = 'Yes, use hardlinks if possible'; $wb['mailbox_soft_delete_txt'] = 'Mailbox soft delete'; -$wb['mailbox_soft_delete_info_txt'] = 'by default cleaned up after 7 days.'; +$wb['soft_delete_directly_txt'] = 'Not enabled, delete directly'; +$wb['soft_delete_keep_indefinately_txt'] = 'Soft delete, leave cleanup for someone else'; +$wb['soft_delete_keep_1_txt'] = 'Purge after 1 day'; +$wb['soft_delete_keep_7_txt'] = 'Purge after 7 days'; +$wb['soft_delete_keep_30_txt'] = 'Purge after 30 days'; +$wb['soft_delete_keep_90_txt'] = 'Purge after 90 days'; +$wb['soft_delete_keep_365_txt'] = 'Purge after 365 days'; From d98ac6440409c1677e8f3f73c3f34048ac11b82f Mon Sep 17 00:00:00 2001 From: Herman van Rink Date: Sat, 6 May 2023 23:29:45 +0200 Subject: [PATCH 135/621] Actively update the mailbox_soft_delete config option --- install/sql/incremental/upd_dev_collection.sql | 6 +++++- server/lib/classes/cron.d/500-clean_mailboxes.inc.php | 4 ---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/install/sql/incremental/upd_dev_collection.sql b/install/sql/incremental/upd_dev_collection.sql index 42cf712a66..cec31dae2c 100644 --- a/install/sql/incremental/upd_dev_collection.sql +++ b/install/sql/incremental/upd_dev_collection.sql @@ -5,4 +5,8 @@ ALTER TABLE `mail_user` ADD COLUMN `imap_prefix` varchar(255) NULL default NULL UPDATE `dns_ssl_ca` SET `ca_issue` = 'sectigo.com' WHERE `ca_issue` = 'comodo.com'; UPDATE `dns_ssl_ca` SET `ca_issue` = 'sectigo.com' WHERE `ca_issue` = 'comodoca.com'; UPDATE `dns_ssl_ca` SET `ca_name` = 'Sectigo (formerly Comodo CA)' WHERE `ca_issue` = 'sectigo.com'; --- not updating the dns_rr table to change all CAA records that have comodo.com / comodoca.com - we should not touch users records imo - TP \ No newline at end of file +-- not updating the dns_rr table to change all CAA records that have comodo.com / comodoca.com - we should not touch users records imo - TP + +-- #6445 Update the mailbox_soft_delete config option to it's new structure. +UPDATE server SET config=REGEXP_REPLACE(config, 'mailbox_soft_delete=n', 'mailbox_soft_delete=0') WHERE config LIKE '%mailbox_soft_delete=n%' +UPDATE server SET config=REGEXP_REPLACE(config, 'mailbox_soft_delete=y', 'mailbox_soft_delete=7') WHERE config LIKE '%mailbox_soft_delete=y%' diff --git a/server/lib/classes/cron.d/500-clean_mailboxes.inc.php b/server/lib/classes/cron.d/500-clean_mailboxes.inc.php index a604835249..2b6d073a98 100755 --- a/server/lib/classes/cron.d/500-clean_mailboxes.inc.php +++ b/server/lib/classes/cron.d/500-clean_mailboxes.inc.php @@ -115,10 +115,6 @@ private function purge_soft_deleted_maildir() { global $app, $conf; $mail_config = $app->getconf->get_server_config($conf["server_id"], 'mail'); - if ($mail_config['mailbox_soft_delete'] == 'y') { - // Backward compatibility for dev installs between 3.2.9 and 3.2.10. - $mail_config['mailbox_soft_delete'] = 7; - } if ($mail_config['mailbox_soft_delete'] > 0) { $matched_dirs = glob($mail_config['homedir_path'] . "/*/[a-z0-9.-]*-deleted-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]"); From 09f40cb706f90838eb7fe8469168f8606842651f Mon Sep 17 00:00:00 2001 From: Herman van Rink Date: Sat, 6 May 2023 23:39:28 +0200 Subject: [PATCH 136/621] Add a util function running_on_master() to improve code readablility --- server/lib/app.inc.php | 10 ++++++++++ server/lib/classes/cron.d/200-logfiles.inc.php | 2 +- server/lib/classes/cron.d/300-quota_notify.inc.php | 8 ++++---- server/lib/classes/cron.d/400-openvz.inc.php | 2 +- server/plugins-available/bind_plugin.inc.php | 4 ++-- server/plugins-available/powerdns_plugin.inc.php | 2 +- 6 files changed, 19 insertions(+), 9 deletions(-) diff --git a/server/lib/app.inc.php b/server/lib/app.inc.php index b6adb3a102..870b6fece3 100644 --- a/server/lib/app.inc.php +++ b/server/lib/app.inc.php @@ -354,6 +354,16 @@ function error($msg) { $this->log($msg, 3); // isn't this supposed to be error code 2? (gwyneth 20220315) die($msg); } + + /** + * Determin if the current process is running on the master or a slave server. + * + * @return boolean + */ + function running_on_master() { + + return $this->dbmaster == $this->db; + } } /** diff --git a/server/lib/classes/cron.d/200-logfiles.inc.php b/server/lib/classes/cron.d/200-logfiles.inc.php index ef0bbb1201..abc4af68bd 100644 --- a/server/lib/classes/cron.d/200-logfiles.inc.php +++ b/server/lib/classes/cron.d/200-logfiles.inc.php @@ -226,7 +226,7 @@ public function onRunJob() { // Cleanup logs in master database (only the "master-server") //###################################################################################################### - if ($app->dbmaster == $app->db) { + if ($app->running_on_master()) { /** 7 days */ diff --git a/server/lib/classes/cron.d/300-quota_notify.inc.php b/server/lib/classes/cron.d/300-quota_notify.inc.php index 2d8ddc5b86..a616047b19 100644 --- a/server/lib/classes/cron.d/300-quota_notify.inc.php +++ b/server/lib/classes/cron.d/300-quota_notify.inc.php @@ -75,7 +75,7 @@ public function onRunJob() { // enforce traffic quota (run only on the "master-server") //###################################################################################################### - if ($app->dbmaster == $app->db) { + if ($app->running_on_master()) { $global_config = $app->getconf->get_global_config('mail'); @@ -159,7 +159,7 @@ public function onRunJob() { // send website quota warnings by email //###################################################################################################### - if ($app->dbmaster == $app->db) { + if ($app->running_on_master()) { $global_config = $app->getconf->get_global_config('mail'); @@ -315,7 +315,7 @@ public function onRunJob() { // send mail quota warnings by email //###################################################################################################### - if ($app->dbmaster == $app->db) { + if ($app->running_on_master()) { $global_config = $app->getconf->get_global_config('mail'); $mail_config = $app->getconf->get_server_config($conf['server_id'], 'mail'); @@ -453,7 +453,7 @@ public function onRunJob() { // send database quota warnings by email //###################################################################################################### - if ($app->dbmaster == $app->db) { + if ($app->running_on_master()) { $global_config = $app->getconf->get_global_config('mail'); diff --git a/server/lib/classes/cron.d/400-openvz.inc.php b/server/lib/classes/cron.d/400-openvz.inc.php index c88e0e608f..75a1a333f9 100644 --- a/server/lib/classes/cron.d/400-openvz.inc.php +++ b/server/lib/classes/cron.d/400-openvz.inc.php @@ -54,7 +54,7 @@ public function onRunJob() { // deactivate virtual servers (run only on the "master-server") //###################################################################################################### - if ($app->dbmaster == $app->db) { + if ($app->running_on_master()) { //* Check which virtual machines have to be deactivated $sql = "SELECT * FROM openvz_vm WHERE active = 'y' AND active_until_date IS NOT NULL AND active_until_date < CURDATE()"; $records = $app->db->queryAllRecords($sql); diff --git a/server/plugins-available/bind_plugin.inc.php b/server/plugins-available/bind_plugin.inc.php index 2a5ccca269..0952f40f2b 100644 --- a/server/plugins-available/bind_plugin.inc.php +++ b/server/plugins-available/bind_plugin.inc.php @@ -189,7 +189,7 @@ function soa_dnssec_sign(&$data) { } } - if ($app->dbmaster !== $app->db) $app->dbmaster->query('UPDATE dns_soa SET dnssec_info=?, dnssec_initialized=\'Y\', dnssec_last_signed=? WHERE id=?', $dnssecdata, intval(time()), intval($data['new']['id'])); + if (!$app->running_on_master()) $app->dbmaster->query('UPDATE dns_soa SET dnssec_info=?, dnssec_initialized=\'Y\', dnssec_last_signed=? WHERE id=?', $dnssecdata, intval(time()), intval($data['new']['id'])); $app->db->query('UPDATE dns_soa SET dnssec_info=?, dnssec_initialized=\'Y\', dnssec_last_signed=? WHERE id=?', $dnssecdata, intval(time()), intval($data['new']['id'])); } @@ -244,7 +244,7 @@ function soa_dnssec_delete(&$data) { unlink($dns_config['bind_zonefiles_dir'].'/'.$dns_config['bind_zonefiles_masterprefix'].$domain.'.signed'); unlink($dns_config['bind_keyfiles_dir'].'/dsset-'.$domain.'.'); - if ($app->dbmaster !== $app->db) $app->dbmaster->query('UPDATE dns_soa SET dnssec_info=\'\', dnssec_initialized=\'N\' WHERE id=?', intval($data['new']['id'])); + if (!$app->running_on_master()) $app->dbmaster->query('UPDATE dns_soa SET dnssec_info=\'\', dnssec_initialized=\'N\' WHERE id=?', intval($data['new']['id'])); $app->db->query('UPDATE dns_soa SET dnssec_info=\'\', dnssec_initialized=\'N\' WHERE id=?', intval($data['new']['id'])); } diff --git a/server/plugins-available/powerdns_plugin.inc.php b/server/plugins-available/powerdns_plugin.inc.php index 82240f106d..1221c3bc56 100644 --- a/server/plugins-available/powerdns_plugin.inc.php +++ b/server/plugins-available/powerdns_plugin.inc.php @@ -546,7 +546,7 @@ function soa_dnssec_create($data) { $dnssec_info = array_merge($this->format_dnssec_pubkeys($pubkeys), array('', '== Raw log ============================'), $log); $dnssec_info = implode("\r\n", $dnssec_info); - if ($app->dbmaster !== $app->db) { + if (!$app->running_on_master()) { $app->dbmaster->query('UPDATE dns_soa SET dnssec_info=?, dnssec_initialized=? WHERE id=?', $dnssec_info, 'Y', intval($data['new']['id'])); } $app->db->query('UPDATE dns_soa SET dnssec_info=?, dnssec_initialized=? WHERE id=?', $dnssec_info, 'Y', intval($data['new']['id'])); From 32719b7de91420dbef2dc47ab9be0560dc40ce3c Mon Sep 17 00:00:00 2001 From: Herman van Rink Date: Sun, 7 May 2023 11:19:41 +0200 Subject: [PATCH 137/621] Three more uses of running_on_master() --- server/lib/classes/aps_installer.inc.php | 2 +- server/plugins-available/powerdns_plugin.inc.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/server/lib/classes/aps_installer.inc.php b/server/lib/classes/aps_installer.inc.php index e50c601cec..7093b1657e 100644 --- a/server/lib/classes/aps_installer.inc.php +++ b/server/lib/classes/aps_installer.inc.php @@ -693,7 +693,7 @@ public function installHandler($instanceid, $type) { $app->db->query('DELETE FROM aps_instances WHERE id = ?', $task['instance_id']); $app->db->query('DELETE FROM aps_instances_settings WHERE instance_id = ?', $task['instance_id']); - if ($app->dbmaster != $app->db) { + if (!$app->running_on_master()) { $app->dbmaster->query('DELETE FROM aps_instances WHERE id = ?', $task['instance_id']); $app->dbmaster->query('DELETE FROM aps_instances_settings WHERE instance_id = ?', $task['instance_id']); } diff --git a/server/plugins-available/powerdns_plugin.inc.php b/server/plugins-available/powerdns_plugin.inc.php index 1221c3bc56..618e00c2da 100644 --- a/server/plugins-available/powerdns_plugin.inc.php +++ b/server/plugins-available/powerdns_plugin.inc.php @@ -649,7 +649,7 @@ function soa_dnssec_disable($data) { $log[] = sprintf("\r\n%s %s", date('c'), 'Running disable-dnssec command...'); exec($cmd_disable_dnssec, $log); - if ($app->dbmaster !== $app->db) { + if (!$app->running_on_master()) { $app->dbmaster->query('UPDATE dns_soa SET dnssec_initialized=? WHERE id=?', 'N', intval($data['new']['id'])); } $app->db->query('UPDATE dns_soa SET dnssec_initialized=? WHERE id=?', 'N', intval($data['new']['id'])); @@ -680,7 +680,7 @@ function soa_dnssec_delete($data) { $dnssec_info = array_merge(array('== Raw log ============================'), $log); $dnssec_info = implode("\r\n", $dnssec_info); - if ($app->dbmaster !== $app->db) { + if (!$app->running_on_master()) { $app->dbmaster->query('UPDATE dns_soa SET dnssec_info=?, dnssec_initialized=? WHERE id=?', $dnssec_info, 'N', intval($data['new']['id'])); } $app->db->query('UPDATE dns_soa SET dnssec_info=?, dnssec_initialized=? WHERE id=?', $dnssec_info, 'N', intval($data['new']['id'])); From 1b4c1f3ba273f19e99ae3372d5d3936d328b27c7 Mon Sep 17 00:00:00 2001 From: Herman van Rink Date: Sun, 7 May 2023 11:43:33 +0200 Subject: [PATCH 138/621] Add a util function running_on_slaveserver() to improve code readablility --- server/lib/app.inc.php | 10 ++++++++++ server/lib/classes/backup.inc.php | 14 +++++++------- server/lib/classes/cron.d/500-backup_mail.inc.php | 8 ++++---- server/lib/classes/cron.d/550-bind_dnssec.inc.php | 2 +- server/lib/classes/modules.inc.php | 2 +- server/plugins-available/apache2_plugin.inc.php | 2 +- server/plugins-available/backup_plugin.inc.php | 2 +- server/plugins-available/mail_plugin.inc.php | 4 ++-- server/plugins-available/nginx_plugin.inc.php | 2 +- 9 files changed, 28 insertions(+), 18 deletions(-) diff --git a/server/lib/app.inc.php b/server/lib/app.inc.php index 870b6fece3..f5a036d789 100644 --- a/server/lib/app.inc.php +++ b/server/lib/app.inc.php @@ -364,6 +364,16 @@ function running_on_master() { return $this->dbmaster == $this->db; } + + /** + * Determin if the current process is running on the master or a slave server. + * + * @return boolean + */ + function running_on_slaveserver() { + + return $this->dbmaster != $this->db; + } } /** diff --git a/server/lib/classes/backup.inc.php b/server/lib/classes/backup.inc.php index 57f264ec44..a0c15129d3 100644 --- a/server/lib/classes/backup.inc.php +++ b/server/lib/classes/backup.inc.php @@ -504,7 +504,7 @@ public static function deleteBackup($backup_format, $backup_password, $backup_di if ($success) { $sql = "DELETE FROM web_backup WHERE server_id = ? AND parent_domain_id = ? AND filename = ?"; $app->db->query($sql, $server_id, $domain_id, $filename); - if($app->db->dbHost != $app->dbmaster->dbHost) + if($app->running_on_slaveserver()) $app->dbmaster->query($sql, $server_id, $domain_id, $filename); $app->log($sql . ' - ' . json_encode([$server_id, $domain_id, $filename]), LOGLEVEL_DEBUG); } @@ -1126,7 +1126,7 @@ protected static function clearBackups($server_id, $web_id, $max_backup_copies, $password = NULL; $db_list = array($app->db); - if ($app->db->dbHost != $app->dbmaster->dbHost) + if ($app->running_on_slaveserver()) array_push($db_list, $app->dbmaster); if ($backup_mode == "userzip" || $backup_mode == "rootgz") { @@ -1256,7 +1256,7 @@ protected static function backups_garbage_collection($server_id, $backup_type = } $db_list = array($app->db); - if ($app->db->dbHost != $app->dbmaster->dbHost) + if ($app->running_on_slaveserver()) array_push($db_list, $app->dbmaster); // Cleanup web_backup entries for non-existent backup files @@ -1776,7 +1776,7 @@ protected static function make_database_backup($web_domain, $backup_job) //* password is for `Encrypted` column informative purposes, on download password is obtained from web_domain settings $password = $repos_password ? '*secret*' : ''; $app->db->query($sql, $server_id, $domain_id, 'mysql', $backup_mode, $backup_format_db, time(), $db_backup_archive, $archive_size, $password); - if ($app->db->dbHost != $app->dbmaster->dbHost) + if ($app->running_on_slaveserver()) $app->dbmaster->query($sql, $server_id, $domain_id, 'mysql', $backup_mode, $backup_format_db, time(), $db_backup_archive, $archive_size, $password); $success = true; } else { @@ -1832,7 +1832,7 @@ protected static function make_database_backup($web_domain, $backup_job) //Making compatible with previous versions of ISPConfig: $sql_mode = ($backup_format_db == 'gzip') ? 'sqlgz' : ('sql' . $backup_format_db); $app->db->query($sql, $server_id, $domain_id, 'mysql', $sql_mode, $backup_format_db, time(), $db_compressed_file, $file_size, $password); - if ($app->db->dbHost != $app->dbmaster->dbHost) + if ($app->running_on_slaveserver()) $app->dbmaster->query($sql, $server_id, $domain_id, 'mysql', $sql_mode, $backup_format_db, time(), $db_compressed_file, $file_size, $password); $success = true; } @@ -1982,7 +1982,7 @@ protected static function make_web_backup($web_domain, $backup_job) $sql = "INSERT INTO web_backup (server_id, parent_domain_id, backup_type, backup_mode, backup_format, tstamp, filename, filesize, backup_password) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)"; $backup_time = time(); $app->db->query($sql, $server_id, $web_id, 'web', $backup_mode, $backup_format_web, $backup_time, $web_backup_archive, $archive_size, $password); - if ($app->db->dbHost != $app->dbmaster->dbHost) + if ($app->running_on_slaveserver()) $app->dbmaster->query($sql, $server_id, $web_id, 'web', $backup_mode, $backup_format_web, $backup_time, $web_backup_archive, $archive_size, $password); unset($archive_size); $app->log('Backup of web files for domain ' . $web_domain['domain'] . ' completed successfully to archive ' . $full_archive_path, LOGLEVEL_DEBUG); @@ -2004,7 +2004,7 @@ protected static function make_web_backup($web_domain, $backup_job) $file_size = filesize($full_filename); $sql = "INSERT INTO web_backup (server_id, parent_domain_id, backup_type, backup_mode, backup_format, tstamp, filename, filesize, backup_password) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)"; $app->db->query($sql, $server_id, $web_id, 'web', $backup_mode, $backup_format_web, time(), $web_backup_file, $file_size, $password); - if ($app->db->dbHost != $app->dbmaster->dbHost) + if ($app->running_on_slaveserver()) $app->dbmaster->query($sql, $server_id, $web_id, 'web', $backup_mode, $backup_format_web, time(), $web_backup_file, $file_size, $password); unset($file_size); $app->log('Backup of web files for domain ' . $web_domain['domain'] . ' completed successfully to file ' . $full_filename, LOGLEVEL_DEBUG); diff --git a/server/lib/classes/cron.d/500-backup_mail.inc.php b/server/lib/classes/cron.d/500-backup_mail.inc.php index 4dcb199414..92051fa4f2 100644 --- a/server/lib/classes/cron.d/500-backup_mail.inc.php +++ b/server/lib/classes/cron.d/500-backup_mail.inc.php @@ -184,7 +184,7 @@ public function onRunJob() { $filesize = filesize($mail_backup_dir.'/'.$mail_backup_file); $sql = "INSERT INTO mail_backup (server_id, parent_domain_id, mailuser_id, backup_mode, tstamp, filename, filesize) VALUES (?, ?, ?, ?, ?, ?, ?)"; $app->db->query($sql, $conf['server_id'], $domain_rec['domain_id'], $rec['mailuser_id'], $backup_mode, time(), $mail_backup_file, $filesize); - if($app->db->dbHost != $app->dbmaster->dbHost) $app->dbmaster->query($sql, $conf['server_id'], $domain_rec['domain_id'], $rec['mailuser_id'], $backup_mode, time(), $mail_backup_file, $filesize); + if($app->running_on_slaveserver()) $app->dbmaster->query($sql, $conf['server_id'], $domain_rec['domain_id'], $rec['mailuser_id'], $backup_mode, time(), $mail_backup_file, $filesize); unset($filesize); } else { /* Backup failed - remove archive */ @@ -213,7 +213,7 @@ public function onRunJob() { unlink($mail_backup_dir.'/'.$files[$n]); $sql = "DELETE FROM mail_backup WHERE server_id = ? AND parent_domain_id = ? AND filename = ?"; $app->db->query($sql, $conf['server_id'], $domain_rec['domain_id'], $files[$n]); - if($app->db->dbHost != $app->dbmaster->dbHost) $app->dbmaster->query($sql, $conf['server_id'], $domain_rec['domain_id'], $files[$n]); + if($app->running_on_slaveserver()) $app->dbmaster->query($sql, $conf['server_id'], $domain_rec['domain_id'], $files[$n]); } } unset($files); @@ -241,7 +241,7 @@ public function onRunJob() { /* remove backups from db */ $sql = "DELETE FROM mail_backup WHERE server_id = ? AND parent_domain_id = ? AND mailuser_id = ?"; $app->db->query($sql, $conf['server_id'], $domain_rec['domain_id'], $rec['mailuser_id']); - if($app->db->dbHost != $app->dbmaster->dbHost) $app->dbmaster->query($sql, $conf['server_id'], $domain_rec['domain_id'], $rec['mailuser_id']); + if($app->running_on_slaveserver()) $app->dbmaster->query($sql, $conf['server_id'], $domain_rec['domain_id'], $rec['mailuser_id']); } } @@ -254,7 +254,7 @@ public function onRunJob() { if(!is_file($mail_backup_dir.'/'.$backup['filename'])){ $sql = "DELETE FROM mail_backup WHERE server_id = ? AND parent_domain_id = ? AND filename = ?"; $app->db->query($sql, $conf['server_id'], $backup['parent_domain_id'], $backup['filename']); - if($app->db->dbHost != $app->dbmaster->dbHost) $app->dbmaster->query($sql, $conf['server_id'], $backup['parent_domain_id'], $backup['filename']); + if($app->running_on_slaveserver()) $app->dbmaster->query($sql, $conf['server_id'], $backup['parent_domain_id'], $backup['filename']); } } } diff --git a/server/lib/classes/cron.d/550-bind_dnssec.inc.php b/server/lib/classes/cron.d/550-bind_dnssec.inc.php index b066cb816e..6c85902bac 100644 --- a/server/lib/classes/cron.d/550-bind_dnssec.inc.php +++ b/server/lib/classes/cron.d/550-bind_dnssec.inc.php @@ -78,7 +78,7 @@ public function onRunJob() { global $app, $conf; //* job should only run on ispc master - if($app->db->dbHost != $app->dbmaster->dbHost) return; + if($app->running_on_slaveserver()) return; //* Load libraries $app->uses("getconf,tpl"); diff --git a/server/lib/classes/modules.inc.php b/server/lib/classes/modules.inc.php index 9b92199fd8..12277987ff 100644 --- a/server/lib/classes/modules.inc.php +++ b/server/lib/classes/modules.inc.php @@ -100,7 +100,7 @@ function processDatalog() { global $app, $conf; //* If its a multiserver setup - if($app->db->dbHost != $app->dbmaster->dbHost || ($app->db->dbHost == $app->dbmaster->dbHost && $app->db->dbName != $app->dbmaster->dbName)) { + if($app->running_on_slaveserver() || ($app->running_on_master() && $app->db->dbName != $app->dbmaster->dbName)) { if($conf['mirror_server_id'] > 0) { $sql = "SELECT * FROM sys_datalog WHERE datalog_id > ? AND (server_id = ? OR server_id = ? OR server_id = 0) ORDER BY datalog_id LIMIT 0,1000"; } else { diff --git a/server/plugins-available/apache2_plugin.inc.php b/server/plugins-available/apache2_plugin.inc.php index dc0df3005c..ed86d4ce7f 100644 --- a/server/plugins-available/apache2_plugin.inc.php +++ b/server/plugins-available/apache2_plugin.inc.php @@ -2411,7 +2411,7 @@ function delete($event_name, $data) { //* cleanup database $sql = "DELETE FROM web_backup WHERE server_id = ? AND parent_domain_id = ? AND filename LIKE ?"; $app->db->query($sql, $conf['server_id'], $data_old['domain_id'], "web".$data_old['domain_id']."_%"); - if($app->db->dbHost != $app->dbmaster->dbHost) $app->dbmaster->query($sql, $conf['server_id'], $data_old['domain_id'], "web".$data_old['domain_id']."_%"); + if($app->running_on_slaveserver()) $app->dbmaster->query($sql, $conf['server_id'], $data_old['domain_id'], "web".$data_old['domain_id']."_%"); $app->log('Deleted the web backup files', LOGLEVEL_DEBUG); } diff --git a/server/plugins-available/backup_plugin.inc.php b/server/plugins-available/backup_plugin.inc.php index 8ba345b4c4..0c407f0243 100644 --- a/server/plugins-available/backup_plugin.inc.php +++ b/server/plugins-available/backup_plugin.inc.php @@ -288,7 +288,7 @@ public function backup_action_mail($action_name, $data) { unlink($mail_backup_file); $sql = "DELETE FROM mail_backup WHERE server_id = ? AND parent_domain_id = ? AND filename = ?"; $app->db->query($sql, $conf['server_id'], $mail_backup['parent_domain_id'], $mail_backup['filename']); - if($app->db->dbHost != $app->dbmaster->dbHost) $app->dbmaster->query($sql, $conf['server_id'], $mail_backup['parent_domain_id'], $mail_backup['filename']); + if($app->running_on_slaveserver()) $app->dbmaster->query($sql, $conf['server_id'], $mail_backup['parent_domain_id'], $mail_backup['filename']); $app->log('unlink '.$backup_dir.'/'.$mail_backup['filename'], LOGLEVEL_DEBUG); } } diff --git a/server/plugins-available/mail_plugin.inc.php b/server/plugins-available/mail_plugin.inc.php index 08439fe798..b8ffd40fbf 100644 --- a/server/plugins-available/mail_plugin.inc.php +++ b/server/plugins-available/mail_plugin.inc.php @@ -466,7 +466,7 @@ function user_delete($event_name, $data) { //* cleanup database $sql = "DELETE FROM mail_backup WHERE server_id = ? AND parent_domain_id = ? AND mailuser_id = ?"; $app->db->query($sql, $conf['server_id'], $domain_rec['domain_id'], $data['old']['mailuser_id']); - if($app->db->dbHost != $app->dbmaster->dbHost) $app->dbmaster->query($sql, $conf['server_id'], $domain_rec['domain_id'], $data['old']['mailuser_id']); + if($app->running_on_slaveserver()) $app->dbmaster->query($sql, $conf['server_id'], $domain_rec['domain_id'], $data['old']['mailuser_id']); $app->log('Deleted the mail backups for: '.$data['old']['email'], LOGLEVEL_DEBUG); } @@ -524,7 +524,7 @@ function domain_delete($event_name, $data) { //* cleanup database $sql = "DELETE FROM mail_backup WHERE server_id = ? AND parent_domain_id = ?"; $app->db->query($sql, $conf['server_id'], $data['old']['domain_id']); - if($app->db->dbHost != $app->dbmaster->dbHost) $app->dbmaster->query($sql, $conf['server_id'], $domain_rec['domain_id']); + if($app->running_on_slaveserver()) $app->dbmaster->query($sql, $conf['server_id'], $domain_rec['domain_id']); $app->log('Deleted the mail backup directory: '.$mail_backup_dir, LOGLEVEL_DEBUG); } diff --git a/server/plugins-available/nginx_plugin.inc.php b/server/plugins-available/nginx_plugin.inc.php index 78144e7bfb..6bc5a5556c 100644 --- a/server/plugins-available/nginx_plugin.inc.php +++ b/server/plugins-available/nginx_plugin.inc.php @@ -2398,7 +2398,7 @@ function delete($event_name, $data) { //* cleanup database $sql = "DELETE FROM web_backup WHERE server_id = ? AND parent_domain_id = ? AND filename LIKE ?"; $app->db->query($sql, $conf['server_id'], $data_old['domain_id'], "web".$data_old['domain_id']."_%"); - if($app->db->dbHost != $app->dbmaster->dbHost) $app->dbmaster->query($sql, $conf['server_id'], $data_old['domain_id'], "web".$data_old['domain_id']."_%"); + if($app->running_on_slaveserver()) $app->dbmaster->query($sql, $conf['server_id'], $data_old['domain_id'], "web".$data_old['domain_id']."_%"); $app->log('Deleted the web backup files', LOGLEVEL_DEBUG); } From cf2911194d7478747ac135c6c742cbfbb4f7cf0f Mon Sep 17 00:00:00 2001 From: Herman van Rink Date: Sun, 7 May 2023 11:53:17 +0200 Subject: [PATCH 139/621] Rename running_on_master to running_on_masterserver --- server/lib/app.inc.php | 2 +- server/lib/classes/aps_installer.inc.php | 2 +- server/lib/classes/cron.d/200-logfiles.inc.php | 2 +- server/lib/classes/cron.d/300-quota_notify.inc.php | 8 ++++---- server/lib/classes/cron.d/400-openvz.inc.php | 2 +- server/lib/classes/modules.inc.php | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/server/lib/app.inc.php b/server/lib/app.inc.php index f5a036d789..940e0cae81 100644 --- a/server/lib/app.inc.php +++ b/server/lib/app.inc.php @@ -360,7 +360,7 @@ function error($msg) { * * @return boolean */ - function running_on_master() { + function running_on_masterserver() { return $this->dbmaster == $this->db; } diff --git a/server/lib/classes/aps_installer.inc.php b/server/lib/classes/aps_installer.inc.php index 7093b1657e..a9271dd175 100644 --- a/server/lib/classes/aps_installer.inc.php +++ b/server/lib/classes/aps_installer.inc.php @@ -693,7 +693,7 @@ public function installHandler($instanceid, $type) { $app->db->query('DELETE FROM aps_instances WHERE id = ?', $task['instance_id']); $app->db->query('DELETE FROM aps_instances_settings WHERE instance_id = ?', $task['instance_id']); - if (!$app->running_on_master()) { + if (!$app->running_on_masterserver()) { $app->dbmaster->query('DELETE FROM aps_instances WHERE id = ?', $task['instance_id']); $app->dbmaster->query('DELETE FROM aps_instances_settings WHERE instance_id = ?', $task['instance_id']); } diff --git a/server/lib/classes/cron.d/200-logfiles.inc.php b/server/lib/classes/cron.d/200-logfiles.inc.php index abc4af68bd..b87798c29e 100644 --- a/server/lib/classes/cron.d/200-logfiles.inc.php +++ b/server/lib/classes/cron.d/200-logfiles.inc.php @@ -226,7 +226,7 @@ public function onRunJob() { // Cleanup logs in master database (only the "master-server") //###################################################################################################### - if ($app->running_on_master()) { + if ($app->running_on_masterserver()) { /** 7 days */ diff --git a/server/lib/classes/cron.d/300-quota_notify.inc.php b/server/lib/classes/cron.d/300-quota_notify.inc.php index a616047b19..7f32192b3f 100644 --- a/server/lib/classes/cron.d/300-quota_notify.inc.php +++ b/server/lib/classes/cron.d/300-quota_notify.inc.php @@ -75,7 +75,7 @@ public function onRunJob() { // enforce traffic quota (run only on the "master-server") //###################################################################################################### - if ($app->running_on_master()) { + if ($app->running_on_masterserver()) { $global_config = $app->getconf->get_global_config('mail'); @@ -159,7 +159,7 @@ public function onRunJob() { // send website quota warnings by email //###################################################################################################### - if ($app->running_on_master()) { + if ($app->running_on_masterserver()) { $global_config = $app->getconf->get_global_config('mail'); @@ -315,7 +315,7 @@ public function onRunJob() { // send mail quota warnings by email //###################################################################################################### - if ($app->running_on_master()) { + if ($app->running_on_masterserver()) { $global_config = $app->getconf->get_global_config('mail'); $mail_config = $app->getconf->get_server_config($conf['server_id'], 'mail'); @@ -453,7 +453,7 @@ public function onRunJob() { // send database quota warnings by email //###################################################################################################### - if ($app->running_on_master()) { + if ($app->running_on_masterserver()) { $global_config = $app->getconf->get_global_config('mail'); diff --git a/server/lib/classes/cron.d/400-openvz.inc.php b/server/lib/classes/cron.d/400-openvz.inc.php index 75a1a333f9..cad8716605 100644 --- a/server/lib/classes/cron.d/400-openvz.inc.php +++ b/server/lib/classes/cron.d/400-openvz.inc.php @@ -54,7 +54,7 @@ public function onRunJob() { // deactivate virtual servers (run only on the "master-server") //###################################################################################################### - if ($app->running_on_master()) { + if ($app->running_on_masterserver()) { //* Check which virtual machines have to be deactivated $sql = "SELECT * FROM openvz_vm WHERE active = 'y' AND active_until_date IS NOT NULL AND active_until_date < CURDATE()"; $records = $app->db->queryAllRecords($sql); diff --git a/server/lib/classes/modules.inc.php b/server/lib/classes/modules.inc.php index 12277987ff..b3aae3acf9 100644 --- a/server/lib/classes/modules.inc.php +++ b/server/lib/classes/modules.inc.php @@ -100,7 +100,7 @@ function processDatalog() { global $app, $conf; //* If its a multiserver setup - if($app->running_on_slaveserver() || ($app->running_on_master() && $app->db->dbName != $app->dbmaster->dbName)) { + if($app->running_on_slaveserver() || ($app->running_on_masterserver() && $app->db->dbName != $app->dbmaster->dbName)) { if($conf['mirror_server_id'] > 0) { $sql = "SELECT * FROM sys_datalog WHERE datalog_id > ? AND (server_id = ? OR server_id = ? OR server_id = 0) ORDER BY datalog_id LIMIT 0,1000"; } else { From 9f769b470158789d001fd0f758ba4f2822eec4e1 Mon Sep 17 00:00:00 2001 From: Herman van Rink Date: Sun, 7 May 2023 11:53:34 +0200 Subject: [PATCH 140/621] make more uses of running_on_slaveserver --- server/plugins-available/bind_plugin.inc.php | 4 ++-- server/plugins-available/powerdns_plugin.inc.php | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/server/plugins-available/bind_plugin.inc.php b/server/plugins-available/bind_plugin.inc.php index 0952f40f2b..5beeed2c56 100644 --- a/server/plugins-available/bind_plugin.inc.php +++ b/server/plugins-available/bind_plugin.inc.php @@ -189,7 +189,7 @@ function soa_dnssec_sign(&$data) { } } - if (!$app->running_on_master()) $app->dbmaster->query('UPDATE dns_soa SET dnssec_info=?, dnssec_initialized=\'Y\', dnssec_last_signed=? WHERE id=?', $dnssecdata, intval(time()), intval($data['new']['id'])); + if ($app->running_on_slaveserver()) $app->dbmaster->query('UPDATE dns_soa SET dnssec_info=?, dnssec_initialized=\'Y\', dnssec_last_signed=? WHERE id=?', $dnssecdata, intval(time()), intval($data['new']['id'])); $app->db->query('UPDATE dns_soa SET dnssec_info=?, dnssec_initialized=\'Y\', dnssec_last_signed=? WHERE id=?', $dnssecdata, intval(time()), intval($data['new']['id'])); } @@ -244,7 +244,7 @@ function soa_dnssec_delete(&$data) { unlink($dns_config['bind_zonefiles_dir'].'/'.$dns_config['bind_zonefiles_masterprefix'].$domain.'.signed'); unlink($dns_config['bind_keyfiles_dir'].'/dsset-'.$domain.'.'); - if (!$app->running_on_master()) $app->dbmaster->query('UPDATE dns_soa SET dnssec_info=\'\', dnssec_initialized=\'N\' WHERE id=?', intval($data['new']['id'])); + if ($app->running_on_slaveserver()) $app->dbmaster->query('UPDATE dns_soa SET dnssec_info=\'\', dnssec_initialized=\'N\' WHERE id=?', intval($data['new']['id'])); $app->db->query('UPDATE dns_soa SET dnssec_info=\'\', dnssec_initialized=\'N\' WHERE id=?', intval($data['new']['id'])); } diff --git a/server/plugins-available/powerdns_plugin.inc.php b/server/plugins-available/powerdns_plugin.inc.php index 618e00c2da..456fd81162 100644 --- a/server/plugins-available/powerdns_plugin.inc.php +++ b/server/plugins-available/powerdns_plugin.inc.php @@ -546,7 +546,7 @@ function soa_dnssec_create($data) { $dnssec_info = array_merge($this->format_dnssec_pubkeys($pubkeys), array('', '== Raw log ============================'), $log); $dnssec_info = implode("\r\n", $dnssec_info); - if (!$app->running_on_master()) { + if ($app->running_on_slaveserver()) { $app->dbmaster->query('UPDATE dns_soa SET dnssec_info=?, dnssec_initialized=? WHERE id=?', $dnssec_info, 'Y', intval($data['new']['id'])); } $app->db->query('UPDATE dns_soa SET dnssec_info=?, dnssec_initialized=? WHERE id=?', $dnssec_info, 'Y', intval($data['new']['id'])); @@ -649,7 +649,7 @@ function soa_dnssec_disable($data) { $log[] = sprintf("\r\n%s %s", date('c'), 'Running disable-dnssec command...'); exec($cmd_disable_dnssec, $log); - if (!$app->running_on_master()) { + if ($app->running_on_slaveserver()) { $app->dbmaster->query('UPDATE dns_soa SET dnssec_initialized=? WHERE id=?', 'N', intval($data['new']['id'])); } $app->db->query('UPDATE dns_soa SET dnssec_initialized=? WHERE id=?', 'N', intval($data['new']['id'])); @@ -680,7 +680,7 @@ function soa_dnssec_delete($data) { $dnssec_info = array_merge(array('== Raw log ============================'), $log); $dnssec_info = implode("\r\n", $dnssec_info); - if (!$app->running_on_master()) { + if ($app->running_on_slaveserver()) { $app->dbmaster->query('UPDATE dns_soa SET dnssec_info=?, dnssec_initialized=? WHERE id=?', $dnssec_info, 'N', intval($data['new']['id'])); } $app->db->query('UPDATE dns_soa SET dnssec_info=?, dnssec_initialized=? WHERE id=?', $dnssec_info, 'N', intval($data['new']['id'])); From 8d8b2624d32a24031050c84e38bf49ae2d6f8313 Mon Sep 17 00:00:00 2001 From: Thom Date: Sun, 7 May 2023 10:20:43 +0000 Subject: [PATCH 141/621] Update suggested string changes --- interface/web/admin/form/server_config.tform.php | 2 +- interface/web/admin/lib/lang/en_server_config.lng | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/interface/web/admin/form/server_config.tform.php b/interface/web/admin/form/server_config.tform.php index 8ac6994e64..521e51ebc4 100644 --- a/interface/web/admin/form/server_config.tform.php +++ b/interface/web/admin/form/server_config.tform.php @@ -740,7 +740,7 @@ 'default' => 'n', 'value' => array( 0 => 'soft_delete_directly_txt', - -1 => 'soft_delete_keep_indefinately_txt', + -1 => 'soft_delete_keep_indefinitely_txt', 1 => 'soft_delete_keep_1_txt', 7 => 'soft_delete_keep_7_txt', 30 => 'soft_delete_keep_30_txt', diff --git a/interface/web/admin/lib/lang/en_server_config.lng b/interface/web/admin/lib/lang/en_server_config.lng index 40b82c7780..1d89dc5b7a 100644 --- a/interface/web/admin/lib/lang/en_server_config.lng +++ b/interface/web/admin/lib/lang/en_server_config.lng @@ -356,8 +356,8 @@ $wb['jailkit_hardlinks_allow_txt'] = 'Allow hardlinks within the jail'; $wb['jailkit_hardlinks_no_txt'] = 'No, remove hardlinked files'; $wb['jailkit_hardlinks_yes_txt'] = 'Yes, use hardlinks if possible'; $wb['mailbox_soft_delete_txt'] = 'Mailbox soft delete'; -$wb['soft_delete_directly_txt'] = 'Not enabled, delete directly'; -$wb['soft_delete_keep_indefinately_txt'] = 'Soft delete, leave cleanup for someone else'; +$wb['soft_delete_directly_txt'] = 'Delete instantly'; +$wb['soft_delete_keep_indefinitely_txt'] = 'Rename but don't delete (manual cleanup)'; $wb['soft_delete_keep_1_txt'] = 'Purge after 1 day'; $wb['soft_delete_keep_7_txt'] = 'Purge after 7 days'; $wb['soft_delete_keep_30_txt'] = 'Purge after 30 days'; From 18ae289267b057cd32d56cc338566b9b102c65a3 Mon Sep 17 00:00:00 2001 From: Herman van Rink Date: Sun, 7 May 2023 12:28:48 +0200 Subject: [PATCH 142/621] Replicate new strings to all language files --- interface/web/admin/lib/lang/ar_server_config.lng | 8 +++++++- interface/web/admin/lib/lang/bg_server_config.lng | 8 +++++++- interface/web/admin/lib/lang/br_server_config.lng | 8 +++++++- interface/web/admin/lib/lang/ca_server_config.lng | 8 +++++++- interface/web/admin/lib/lang/cn_server_config.lng | 8 +++++++- interface/web/admin/lib/lang/cz_server_config.lng | 8 +++++++- interface/web/admin/lib/lang/de_server_config.lng | 8 +++++++- interface/web/admin/lib/lang/dk_server_config.lng | 8 +++++++- interface/web/admin/lib/lang/el_server_config.lng | 8 +++++++- interface/web/admin/lib/lang/es_server_config.lng | 8 +++++++- interface/web/admin/lib/lang/fi_server_config.lng | 8 +++++++- interface/web/admin/lib/lang/fr_server_config.lng | 8 +++++++- interface/web/admin/lib/lang/hr_server_config.lng | 8 +++++++- interface/web/admin/lib/lang/hu_server_config.lng | 8 +++++++- interface/web/admin/lib/lang/id_server_config.lng | 8 +++++++- interface/web/admin/lib/lang/it_server_config.lng | 8 +++++++- interface/web/admin/lib/lang/ja_server_config.lng | 8 +++++++- interface/web/admin/lib/lang/nl_server_config.lng | 8 +++++++- interface/web/admin/lib/lang/pl_server_config.lng | 8 +++++++- interface/web/admin/lib/lang/pt_server_config.lng | 8 +++++++- interface/web/admin/lib/lang/ro_server_config.lng | 8 +++++++- interface/web/admin/lib/lang/ru_server_config.lng | 8 +++++++- interface/web/admin/lib/lang/se_server_config.lng | 8 +++++++- interface/web/admin/lib/lang/sk_server_config.lng | 8 +++++++- interface/web/admin/lib/lang/tr_server_config.lng | 8 +++++++- 25 files changed, 175 insertions(+), 25 deletions(-) diff --git a/interface/web/admin/lib/lang/ar_server_config.lng b/interface/web/admin/lib/lang/ar_server_config.lng index 7a275d98f1..8d680d5e4c 100644 --- a/interface/web/admin/lib/lang/ar_server_config.lng +++ b/interface/web/admin/lib/lang/ar_server_config.lng @@ -350,4 +350,10 @@ $wb['bind_zonefiles_masterprefix_error_regex'] = 'Invalid BIND zonefiles master $wb['bind_zonefiles_slaveprefix_error_regex'] = 'Invalid BIND zonefiles slave prefix.'; $wb['bind_keyfiles_dir_error_regex'] = 'Invalid BIND keyfiles directory.'; $wb['mailbox_soft_delete_txt'] = 'Mailbox soft delete'; -$wb['mailbox_soft_delete_info_txt'] = 'by default cleaned up after 7 days.'; +$wb['soft_delete_directly_txt'] = 'Delete instantly'; +$wb['soft_delete_keep_indefinitely_txt'] = 'Rename but don't delete (manual cleanup)'; +$wb['soft_delete_keep_1_txt'] = 'Purge after 1 day'; +$wb['soft_delete_keep_7_txt'] = 'Purge after 7 days'; +$wb['soft_delete_keep_30_txt'] = 'Purge after 30 days'; +$wb['soft_delete_keep_90_txt'] = 'Purge after 90 days'; +$wb['soft_delete_keep_365_txt'] = 'Purge after 365 days'; diff --git a/interface/web/admin/lib/lang/bg_server_config.lng b/interface/web/admin/lib/lang/bg_server_config.lng index 1fd8c9d3aa..ae2dd48193 100644 --- a/interface/web/admin/lib/lang/bg_server_config.lng +++ b/interface/web/admin/lib/lang/bg_server_config.lng @@ -350,4 +350,10 @@ $wb['bind_zonefiles_masterprefix_error_regex'] = 'Invalid BIND zonefiles master $wb['bind_zonefiles_slaveprefix_error_regex'] = 'Invalid BIND zonefiles slave prefix.'; $wb['bind_keyfiles_dir_error_regex'] = 'Invalid BIND keyfiles directory.'; $wb['mailbox_soft_delete_txt'] = 'Mailbox soft delete'; -$wb['mailbox_soft_delete_info_txt'] = 'by default cleaned up after 7 days.'; +$wb['soft_delete_directly_txt'] = 'Delete instantly'; +$wb['soft_delete_keep_indefinitely_txt'] = 'Rename but don't delete (manual cleanup)'; +$wb['soft_delete_keep_1_txt'] = 'Purge after 1 day'; +$wb['soft_delete_keep_7_txt'] = 'Purge after 7 days'; +$wb['soft_delete_keep_30_txt'] = 'Purge after 30 days'; +$wb['soft_delete_keep_90_txt'] = 'Purge after 90 days'; +$wb['soft_delete_keep_365_txt'] = 'Purge after 365 days'; diff --git a/interface/web/admin/lib/lang/br_server_config.lng b/interface/web/admin/lib/lang/br_server_config.lng index b86729d0b2..b34e898007 100644 --- a/interface/web/admin/lib/lang/br_server_config.lng +++ b/interface/web/admin/lib/lang/br_server_config.lng @@ -350,4 +350,10 @@ $wb['bind_zonefiles_masterprefix_error_regex'] = 'Invalid BIND zonefiles master $wb['bind_zonefiles_slaveprefix_error_regex'] = 'Invalid BIND zonefiles slave prefix.'; $wb['bind_keyfiles_dir_error_regex'] = 'Invalid BIND keyfiles directory.'; $wb['mailbox_soft_delete_txt'] = 'Mailbox soft delete'; -$wb['mailbox_soft_delete_info_txt'] = 'by default cleaned up after 7 days.'; +$wb['soft_delete_directly_txt'] = 'Delete instantly'; +$wb['soft_delete_keep_indefinitely_txt'] = 'Rename but don't delete (manual cleanup)'; +$wb['soft_delete_keep_1_txt'] = 'Purge after 1 day'; +$wb['soft_delete_keep_7_txt'] = 'Purge after 7 days'; +$wb['soft_delete_keep_30_txt'] = 'Purge after 30 days'; +$wb['soft_delete_keep_90_txt'] = 'Purge after 90 days'; +$wb['soft_delete_keep_365_txt'] = 'Purge after 365 days'; diff --git a/interface/web/admin/lib/lang/ca_server_config.lng b/interface/web/admin/lib/lang/ca_server_config.lng index d9e9877805..968daecea2 100644 --- a/interface/web/admin/lib/lang/ca_server_config.lng +++ b/interface/web/admin/lib/lang/ca_server_config.lng @@ -350,4 +350,10 @@ $wb['bind_zonefiles_masterprefix_error_regex'] = 'Invalid BIND zonefiles master $wb['bind_zonefiles_slaveprefix_error_regex'] = 'Invalid BIND zonefiles slave prefix.'; $wb['bind_keyfiles_dir_error_regex'] = 'Invalid BIND keyfiles directory.'; $wb['mailbox_soft_delete_txt'] = 'Mailbox soft delete'; -$wb['mailbox_soft_delete_info_txt'] = 'by default cleaned up after 7 days.'; +$wb['soft_delete_directly_txt'] = 'Delete instantly'; +$wb['soft_delete_keep_indefinitely_txt'] = 'Rename but don't delete (manual cleanup)'; +$wb['soft_delete_keep_1_txt'] = 'Purge after 1 day'; +$wb['soft_delete_keep_7_txt'] = 'Purge after 7 days'; +$wb['soft_delete_keep_30_txt'] = 'Purge after 30 days'; +$wb['soft_delete_keep_90_txt'] = 'Purge after 90 days'; +$wb['soft_delete_keep_365_txt'] = 'Purge after 365 days'; diff --git a/interface/web/admin/lib/lang/cn_server_config.lng b/interface/web/admin/lib/lang/cn_server_config.lng index 5d5d6eeb25..7daa337298 100644 --- a/interface/web/admin/lib/lang/cn_server_config.lng +++ b/interface/web/admin/lib/lang/cn_server_config.lng @@ -351,4 +351,10 @@ $wb['jailkit_hardlinks_allow_txt'] = '允许狱中硬链接'; $wb['jailkit_hardlinks_no_txt'] = '不,删除硬链接文件'; $wb['jailkit_hardlinks_yes_txt'] = '是的,如果可能,使用硬链接'; $wb['mailbox_soft_delete_txt'] = '邮箱软删除'; -$wb['mailbox_soft_delete_info_txt'] = '默认情况下,7天后清理。'; +$wb['soft_delete_directly_txt'] = 'Delete instantly'; +$wb['soft_delete_keep_indefinitely_txt'] = 'Rename but don't delete (manual cleanup)'; +$wb['soft_delete_keep_1_txt'] = 'Purge after 1 day'; +$wb['soft_delete_keep_7_txt'] = 'Purge after 7 days'; +$wb['soft_delete_keep_30_txt'] = 'Purge after 30 days'; +$wb['soft_delete_keep_90_txt'] = 'Purge after 90 days'; +$wb['soft_delete_keep_365_txt'] = 'Purge after 365 days'; diff --git a/interface/web/admin/lib/lang/cz_server_config.lng b/interface/web/admin/lib/lang/cz_server_config.lng index ec90cffe8b..cba840bf44 100644 --- a/interface/web/admin/lib/lang/cz_server_config.lng +++ b/interface/web/admin/lib/lang/cz_server_config.lng @@ -350,4 +350,10 @@ $wb['bind_zonefiles_masterprefix_error_regex'] = 'Invalid BIND zonefiles master $wb['bind_zonefiles_slaveprefix_error_regex'] = 'Invalid BIND zonefiles slave prefix.'; $wb['bind_keyfiles_dir_error_regex'] = 'Invalid BIND keyfiles directory.'; $wb['mailbox_soft_delete_txt'] = 'Mailbox soft delete'; -$wb['mailbox_soft_delete_info_txt'] = 'by default cleaned up after 7 days.'; +$wb['soft_delete_directly_txt'] = 'Delete instantly'; +$wb['soft_delete_keep_indefinitely_txt'] = 'Rename but don't delete (manual cleanup)'; +$wb['soft_delete_keep_1_txt'] = 'Purge after 1 day'; +$wb['soft_delete_keep_7_txt'] = 'Purge after 7 days'; +$wb['soft_delete_keep_30_txt'] = 'Purge after 30 days'; +$wb['soft_delete_keep_90_txt'] = 'Purge after 90 days'; +$wb['soft_delete_keep_365_txt'] = 'Purge after 365 days'; diff --git a/interface/web/admin/lib/lang/de_server_config.lng b/interface/web/admin/lib/lang/de_server_config.lng index f6a89c702b..b5b8731a24 100644 --- a/interface/web/admin/lib/lang/de_server_config.lng +++ b/interface/web/admin/lib/lang/de_server_config.lng @@ -343,7 +343,6 @@ $wb['jailkit_hardlinks_allow_txt'] = 'Erlaube hardlinks innerhalb des Jails'; $wb['jailkit_hardlinks_no_txt'] = 'Nein, entferne hardgelinkte Dateien'; $wb['jailkit_hardlinks_yes_txt'] = 'Ja, benutze hardlinks wenn möglich'; $wb['mailbox_soft_delete_txt'] = 'Postfach Soft-Löschung'; -$wb['mailbox_soft_delete_info_txt'] = 'wird standardmäßig nach 7 Tagen gelöscht.'; $wb['bind_zonefiles_masterprefix_txt'] = 'BIND master zonefiles prefix'; $wb['bind_zonefiles_slaveprefix_txt'] = 'BIND slave zonefiles prefix'; $wb['bind_keyfiles_dir_txt'] = 'BIND keyfiles directory'; @@ -351,3 +350,10 @@ $wb['bind_keyfiles_dir_error_empty'] = 'BIND keyfiles directory is empty.'; $wb['bind_zonefiles_masterprefix_error_regex'] = 'Invalid BIND zonefiles master prefix.'; $wb['bind_zonefiles_slaveprefix_error_regex'] = 'Invalid BIND zonefiles slave prefix.'; $wb['bind_keyfiles_dir_error_regex'] = 'Invalid BIND keyfiles directory.'; +$wb['soft_delete_directly_txt'] = 'Delete instantly'; +$wb['soft_delete_keep_indefinitely_txt'] = 'Rename but don't delete (manual cleanup)'; +$wb['soft_delete_keep_1_txt'] = 'Purge after 1 day'; +$wb['soft_delete_keep_7_txt'] = 'Purge after 7 days'; +$wb['soft_delete_keep_30_txt'] = 'Purge after 30 days'; +$wb['soft_delete_keep_90_txt'] = 'Purge after 90 days'; +$wb['soft_delete_keep_365_txt'] = 'Purge after 365 days'; diff --git a/interface/web/admin/lib/lang/dk_server_config.lng b/interface/web/admin/lib/lang/dk_server_config.lng index 7a26e89479..15e38decf6 100644 --- a/interface/web/admin/lib/lang/dk_server_config.lng +++ b/interface/web/admin/lib/lang/dk_server_config.lng @@ -350,4 +350,10 @@ $wb['bind_zonefiles_masterprefix_error_regex'] = 'Invalid BIND zonefiles master $wb['bind_zonefiles_slaveprefix_error_regex'] = 'Invalid BIND zonefiles slave prefix.'; $wb['bind_keyfiles_dir_error_regex'] = 'Invalid BIND keyfiles directory.'; $wb['mailbox_soft_delete_txt'] = 'Mailbox soft delete'; -$wb['mailbox_soft_delete_info_txt'] = 'by default cleaned up after 7 days.'; +$wb['soft_delete_directly_txt'] = 'Delete instantly'; +$wb['soft_delete_keep_indefinitely_txt'] = 'Rename but don't delete (manual cleanup)'; +$wb['soft_delete_keep_1_txt'] = 'Purge after 1 day'; +$wb['soft_delete_keep_7_txt'] = 'Purge after 7 days'; +$wb['soft_delete_keep_30_txt'] = 'Purge after 30 days'; +$wb['soft_delete_keep_90_txt'] = 'Purge after 90 days'; +$wb['soft_delete_keep_365_txt'] = 'Purge after 365 days'; diff --git a/interface/web/admin/lib/lang/el_server_config.lng b/interface/web/admin/lib/lang/el_server_config.lng index 1545cff229..bc29052801 100644 --- a/interface/web/admin/lib/lang/el_server_config.lng +++ b/interface/web/admin/lib/lang/el_server_config.lng @@ -350,4 +350,10 @@ $wb['bind_zonefiles_masterprefix_error_regex'] = 'Invalid BIND zonefiles master $wb['bind_zonefiles_slaveprefix_error_regex'] = 'Invalid BIND zonefiles slave prefix.'; $wb['bind_keyfiles_dir_error_regex'] = 'Invalid BIND keyfiles directory.'; $wb['mailbox_soft_delete_txt'] = 'Mailbox soft delete'; -$wb['mailbox_soft_delete_info_txt'] = 'by default cleaned up after 7 days.'; +$wb['soft_delete_directly_txt'] = 'Delete instantly'; +$wb['soft_delete_keep_indefinitely_txt'] = 'Rename but don't delete (manual cleanup)'; +$wb['soft_delete_keep_1_txt'] = 'Purge after 1 day'; +$wb['soft_delete_keep_7_txt'] = 'Purge after 7 days'; +$wb['soft_delete_keep_30_txt'] = 'Purge after 30 days'; +$wb['soft_delete_keep_90_txt'] = 'Purge after 90 days'; +$wb['soft_delete_keep_365_txt'] = 'Purge after 365 days'; diff --git a/interface/web/admin/lib/lang/es_server_config.lng b/interface/web/admin/lib/lang/es_server_config.lng index a4e61d142d..be8a52022e 100644 --- a/interface/web/admin/lib/lang/es_server_config.lng +++ b/interface/web/admin/lib/lang/es_server_config.lng @@ -350,4 +350,10 @@ $wb['bind_zonefiles_masterprefix_error_regex'] = 'Invalid BIND zonefiles master $wb['bind_zonefiles_slaveprefix_error_regex'] = 'Invalid BIND zonefiles slave prefix.'; $wb['bind_keyfiles_dir_error_regex'] = 'Invalid BIND keyfiles directory.'; $wb['mailbox_soft_delete_txt'] = 'Mailbox soft delete'; -$wb['mailbox_soft_delete_info_txt'] = 'by default cleaned up after 7 days.'; +$wb['soft_delete_directly_txt'] = 'Delete instantly'; +$wb['soft_delete_keep_indefinitely_txt'] = 'Rename but don't delete (manual cleanup)'; +$wb['soft_delete_keep_1_txt'] = 'Purge after 1 day'; +$wb['soft_delete_keep_7_txt'] = 'Purge after 7 days'; +$wb['soft_delete_keep_30_txt'] = 'Purge after 30 days'; +$wb['soft_delete_keep_90_txt'] = 'Purge after 90 days'; +$wb['soft_delete_keep_365_txt'] = 'Purge after 365 days'; diff --git a/interface/web/admin/lib/lang/fi_server_config.lng b/interface/web/admin/lib/lang/fi_server_config.lng index 8728d60382..c06c124962 100644 --- a/interface/web/admin/lib/lang/fi_server_config.lng +++ b/interface/web/admin/lib/lang/fi_server_config.lng @@ -350,4 +350,10 @@ $wb['bind_zonefiles_masterprefix_error_regex'] = 'Invalid BIND zonefiles master $wb['bind_zonefiles_slaveprefix_error_regex'] = 'Invalid BIND zonefiles slave prefix.'; $wb['bind_keyfiles_dir_error_regex'] = 'Invalid BIND keyfiles directory.'; $wb['mailbox_soft_delete_txt'] = 'Mailbox soft delete'; -$wb['mailbox_soft_delete_info_txt'] = 'by default cleaned up after 7 days.'; +$wb['soft_delete_directly_txt'] = 'Delete instantly'; +$wb['soft_delete_keep_indefinitely_txt'] = 'Rename but don't delete (manual cleanup)'; +$wb['soft_delete_keep_1_txt'] = 'Purge after 1 day'; +$wb['soft_delete_keep_7_txt'] = 'Purge after 7 days'; +$wb['soft_delete_keep_30_txt'] = 'Purge after 30 days'; +$wb['soft_delete_keep_90_txt'] = 'Purge after 90 days'; +$wb['soft_delete_keep_365_txt'] = 'Purge after 365 days'; diff --git a/interface/web/admin/lib/lang/fr_server_config.lng b/interface/web/admin/lib/lang/fr_server_config.lng index 73835ed929..32868b0b4b 100644 --- a/interface/web/admin/lib/lang/fr_server_config.lng +++ b/interface/web/admin/lib/lang/fr_server_config.lng @@ -350,4 +350,10 @@ $wb['bind_zonefiles_masterprefix_error_regex'] = 'Invalid BIND zonefiles master $wb['bind_zonefiles_slaveprefix_error_regex'] = 'Invalid BIND zonefiles slave prefix.'; $wb['bind_keyfiles_dir_error_regex'] = 'Invalid BIND keyfiles directory.'; $wb['mailbox_soft_delete_txt'] = 'Mailbox soft delete'; -$wb['mailbox_soft_delete_info_txt'] = 'by default cleaned up after 7 days.'; +$wb['soft_delete_directly_txt'] = 'Delete instantly'; +$wb['soft_delete_keep_indefinitely_txt'] = 'Rename but don't delete (manual cleanup)'; +$wb['soft_delete_keep_1_txt'] = 'Purge after 1 day'; +$wb['soft_delete_keep_7_txt'] = 'Purge after 7 days'; +$wb['soft_delete_keep_30_txt'] = 'Purge after 30 days'; +$wb['soft_delete_keep_90_txt'] = 'Purge after 90 days'; +$wb['soft_delete_keep_365_txt'] = 'Purge after 365 days'; diff --git a/interface/web/admin/lib/lang/hr_server_config.lng b/interface/web/admin/lib/lang/hr_server_config.lng index a41ec6f6fb..429aab4c0d 100644 --- a/interface/web/admin/lib/lang/hr_server_config.lng +++ b/interface/web/admin/lib/lang/hr_server_config.lng @@ -350,4 +350,10 @@ $wb['bind_zonefiles_masterprefix_error_regex'] = 'Invalid BIND zonefiles master $wb['bind_zonefiles_slaveprefix_error_regex'] = 'Invalid BIND zonefiles slave prefix.'; $wb['bind_keyfiles_dir_error_regex'] = 'Invalid BIND keyfiles directory.'; $wb['mailbox_soft_delete_txt'] = 'Mailbox soft delete'; -$wb['mailbox_soft_delete_info_txt'] = 'by default cleaned up after 7 days.'; +$wb['soft_delete_directly_txt'] = 'Delete instantly'; +$wb['soft_delete_keep_indefinitely_txt'] = 'Rename but don't delete (manual cleanup)'; +$wb['soft_delete_keep_1_txt'] = 'Purge after 1 day'; +$wb['soft_delete_keep_7_txt'] = 'Purge after 7 days'; +$wb['soft_delete_keep_30_txt'] = 'Purge after 30 days'; +$wb['soft_delete_keep_90_txt'] = 'Purge after 90 days'; +$wb['soft_delete_keep_365_txt'] = 'Purge after 365 days'; diff --git a/interface/web/admin/lib/lang/hu_server_config.lng b/interface/web/admin/lib/lang/hu_server_config.lng index a065e10c9f..a13ccbf769 100644 --- a/interface/web/admin/lib/lang/hu_server_config.lng +++ b/interface/web/admin/lib/lang/hu_server_config.lng @@ -350,4 +350,10 @@ $wb['bind_zonefiles_masterprefix_error_regex'] = 'Invalid BIND zonefiles master $wb['bind_zonefiles_slaveprefix_error_regex'] = 'Invalid BIND zonefiles slave prefix.'; $wb['bind_keyfiles_dir_error_regex'] = 'Invalid BIND keyfiles directory.'; $wb['mailbox_soft_delete_txt'] = 'Mailbox soft delete'; -$wb['mailbox_soft_delete_info_txt'] = 'by default cleaned up after 7 days.'; +$wb['soft_delete_directly_txt'] = 'Delete instantly'; +$wb['soft_delete_keep_indefinitely_txt'] = 'Rename but don't delete (manual cleanup)'; +$wb['soft_delete_keep_1_txt'] = 'Purge after 1 day'; +$wb['soft_delete_keep_7_txt'] = 'Purge after 7 days'; +$wb['soft_delete_keep_30_txt'] = 'Purge after 30 days'; +$wb['soft_delete_keep_90_txt'] = 'Purge after 90 days'; +$wb['soft_delete_keep_365_txt'] = 'Purge after 365 days'; diff --git a/interface/web/admin/lib/lang/id_server_config.lng b/interface/web/admin/lib/lang/id_server_config.lng index b25092619c..6c1e026206 100644 --- a/interface/web/admin/lib/lang/id_server_config.lng +++ b/interface/web/admin/lib/lang/id_server_config.lng @@ -350,4 +350,10 @@ $wb['bind_zonefiles_masterprefix_error_regex'] = 'Invalid BIND zonefiles master $wb['bind_zonefiles_slaveprefix_error_regex'] = 'Invalid BIND zonefiles slave prefix.'; $wb['bind_keyfiles_dir_error_regex'] = 'Invalid BIND keyfiles directory.'; $wb['mailbox_soft_delete_txt'] = 'Mailbox soft delete'; -$wb['mailbox_soft_delete_info_txt'] = 'by default cleaned up after 7 days.'; +$wb['soft_delete_directly_txt'] = 'Delete instantly'; +$wb['soft_delete_keep_indefinitely_txt'] = 'Rename but don't delete (manual cleanup)'; +$wb['soft_delete_keep_1_txt'] = 'Purge after 1 day'; +$wb['soft_delete_keep_7_txt'] = 'Purge after 7 days'; +$wb['soft_delete_keep_30_txt'] = 'Purge after 30 days'; +$wb['soft_delete_keep_90_txt'] = 'Purge after 90 days'; +$wb['soft_delete_keep_365_txt'] = 'Purge after 365 days'; diff --git a/interface/web/admin/lib/lang/it_server_config.lng b/interface/web/admin/lib/lang/it_server_config.lng index 3d8df831e8..1cf6d64925 100644 --- a/interface/web/admin/lib/lang/it_server_config.lng +++ b/interface/web/admin/lib/lang/it_server_config.lng @@ -349,4 +349,10 @@ $wb['bind_zonefiles_masterprefix_error_regex'] = 'Invalid BIND zonefiles master $wb['bind_zonefiles_slaveprefix_error_regex'] = 'Invalid BIND zonefiles slave prefix.'; $wb['bind_keyfiles_dir_error_regex'] = 'Invalid BIND keyfiles directory.'; $wb['mailbox_soft_delete_txt'] = 'Mailbox soft delete'; -$wb['mailbox_soft_delete_info_txt'] = 'by default cleaned up after 7 days.'; +$wb['soft_delete_directly_txt'] = 'Delete instantly'; +$wb['soft_delete_keep_indefinitely_txt'] = 'Rename but don't delete (manual cleanup)'; +$wb['soft_delete_keep_1_txt'] = 'Purge after 1 day'; +$wb['soft_delete_keep_7_txt'] = 'Purge after 7 days'; +$wb['soft_delete_keep_30_txt'] = 'Purge after 30 days'; +$wb['soft_delete_keep_90_txt'] = 'Purge after 90 days'; +$wb['soft_delete_keep_365_txt'] = 'Purge after 365 days'; diff --git a/interface/web/admin/lib/lang/ja_server_config.lng b/interface/web/admin/lib/lang/ja_server_config.lng index befd2b5911..4e05a32c84 100644 --- a/interface/web/admin/lib/lang/ja_server_config.lng +++ b/interface/web/admin/lib/lang/ja_server_config.lng @@ -350,4 +350,10 @@ $wb['bind_zonefiles_masterprefix_error_regex'] = 'Invalid BIND zonefiles master $wb['bind_zonefiles_slaveprefix_error_regex'] = 'Invalid BIND zonefiles slave prefix.'; $wb['bind_keyfiles_dir_error_regex'] = 'Invalid BIND keyfiles directory.'; $wb['mailbox_soft_delete_txt'] = 'Mailbox soft delete'; -$wb['mailbox_soft_delete_info_txt'] = 'by default cleaned up after 7 days.'; +$wb['soft_delete_directly_txt'] = 'Delete instantly'; +$wb['soft_delete_keep_indefinitely_txt'] = 'Rename but don't delete (manual cleanup)'; +$wb['soft_delete_keep_1_txt'] = 'Purge after 1 day'; +$wb['soft_delete_keep_7_txt'] = 'Purge after 7 days'; +$wb['soft_delete_keep_30_txt'] = 'Purge after 30 days'; +$wb['soft_delete_keep_90_txt'] = 'Purge after 90 days'; +$wb['soft_delete_keep_365_txt'] = 'Purge after 365 days'; diff --git a/interface/web/admin/lib/lang/nl_server_config.lng b/interface/web/admin/lib/lang/nl_server_config.lng index 2af5d6a9ea..e77c6e46a3 100644 --- a/interface/web/admin/lib/lang/nl_server_config.lng +++ b/interface/web/admin/lib/lang/nl_server_config.lng @@ -350,4 +350,10 @@ $wb['bind_zonefiles_masterprefix_error_regex'] = 'Invalid BIND zonefiles master $wb['bind_zonefiles_slaveprefix_error_regex'] = 'Invalid BIND zonefiles slave prefix.'; $wb['bind_keyfiles_dir_error_regex'] = 'Invalid BIND keyfiles directory.'; $wb['mailbox_soft_delete_txt'] = 'Mailbox soft delete'; -$wb['mailbox_soft_delete_info_txt'] = 'by default cleaned up after 7 days.'; +$wb['soft_delete_directly_txt'] = 'Delete instantly'; +$wb['soft_delete_keep_indefinitely_txt'] = 'Rename but don't delete (manual cleanup)'; +$wb['soft_delete_keep_1_txt'] = 'Purge after 1 day'; +$wb['soft_delete_keep_7_txt'] = 'Purge after 7 days'; +$wb['soft_delete_keep_30_txt'] = 'Purge after 30 days'; +$wb['soft_delete_keep_90_txt'] = 'Purge after 90 days'; +$wb['soft_delete_keep_365_txt'] = 'Purge after 365 days'; diff --git a/interface/web/admin/lib/lang/pl_server_config.lng b/interface/web/admin/lib/lang/pl_server_config.lng index 1f2ed1b6ea..1d277a2757 100644 --- a/interface/web/admin/lib/lang/pl_server_config.lng +++ b/interface/web/admin/lib/lang/pl_server_config.lng @@ -350,4 +350,10 @@ $wb['bind_zonefiles_masterprefix_error_regex'] = 'Invalid BIND zonefiles master $wb['bind_zonefiles_slaveprefix_error_regex'] = 'Invalid BIND zonefiles slave prefix.'; $wb['bind_keyfiles_dir_error_regex'] = 'Invalid BIND keyfiles directory.'; $wb['mailbox_soft_delete_txt'] = 'Mailbox soft delete'; -$wb['mailbox_soft_delete_info_txt'] = 'by default cleaned up after 7 days.'; +$wb['soft_delete_directly_txt'] = 'Delete instantly'; +$wb['soft_delete_keep_indefinitely_txt'] = 'Rename but don't delete (manual cleanup)'; +$wb['soft_delete_keep_1_txt'] = 'Purge after 1 day'; +$wb['soft_delete_keep_7_txt'] = 'Purge after 7 days'; +$wb['soft_delete_keep_30_txt'] = 'Purge after 30 days'; +$wb['soft_delete_keep_90_txt'] = 'Purge after 90 days'; +$wb['soft_delete_keep_365_txt'] = 'Purge after 365 days'; diff --git a/interface/web/admin/lib/lang/pt_server_config.lng b/interface/web/admin/lib/lang/pt_server_config.lng index 96a6046dba..6d338ee50c 100644 --- a/interface/web/admin/lib/lang/pt_server_config.lng +++ b/interface/web/admin/lib/lang/pt_server_config.lng @@ -350,4 +350,10 @@ $wb['bind_zonefiles_masterprefix_error_regex'] = 'Invalid BIND zonefiles master $wb['bind_zonefiles_slaveprefix_error_regex'] = 'Invalid BIND zonefiles slave prefix.'; $wb['bind_keyfiles_dir_error_regex'] = 'Invalid BIND keyfiles directory.'; $wb['mailbox_soft_delete_txt'] = 'Mailbox soft delete'; -$wb['mailbox_soft_delete_info_txt'] = 'by default cleaned up after 7 days.'; +$wb['soft_delete_directly_txt'] = 'Delete instantly'; +$wb['soft_delete_keep_indefinitely_txt'] = 'Rename but don't delete (manual cleanup)'; +$wb['soft_delete_keep_1_txt'] = 'Purge after 1 day'; +$wb['soft_delete_keep_7_txt'] = 'Purge after 7 days'; +$wb['soft_delete_keep_30_txt'] = 'Purge after 30 days'; +$wb['soft_delete_keep_90_txt'] = 'Purge after 90 days'; +$wb['soft_delete_keep_365_txt'] = 'Purge after 365 days'; diff --git a/interface/web/admin/lib/lang/ro_server_config.lng b/interface/web/admin/lib/lang/ro_server_config.lng index 05dfa0216a..d713897179 100644 --- a/interface/web/admin/lib/lang/ro_server_config.lng +++ b/interface/web/admin/lib/lang/ro_server_config.lng @@ -350,4 +350,10 @@ $wb['bind_zonefiles_masterprefix_error_regex'] = 'Invalid BIND zonefiles master $wb['bind_zonefiles_slaveprefix_error_regex'] = 'Invalid BIND zonefiles slave prefix.'; $wb['bind_keyfiles_dir_error_regex'] = 'Invalid BIND keyfiles directory.'; $wb['mailbox_soft_delete_txt'] = 'Mailbox soft delete'; -$wb['mailbox_soft_delete_info_txt'] = 'by default cleaned up after 7 days.'; +$wb['soft_delete_directly_txt'] = 'Delete instantly'; +$wb['soft_delete_keep_indefinitely_txt'] = 'Rename but don't delete (manual cleanup)'; +$wb['soft_delete_keep_1_txt'] = 'Purge after 1 day'; +$wb['soft_delete_keep_7_txt'] = 'Purge after 7 days'; +$wb['soft_delete_keep_30_txt'] = 'Purge after 30 days'; +$wb['soft_delete_keep_90_txt'] = 'Purge after 90 days'; +$wb['soft_delete_keep_365_txt'] = 'Purge after 365 days'; diff --git a/interface/web/admin/lib/lang/ru_server_config.lng b/interface/web/admin/lib/lang/ru_server_config.lng index 5463f4497b..cdf8a5935e 100644 --- a/interface/web/admin/lib/lang/ru_server_config.lng +++ b/interface/web/admin/lib/lang/ru_server_config.lng @@ -350,4 +350,10 @@ $wb['bind_zonefiles_masterprefix_error_regex'] = 'Invalid BIND zonefiles master $wb['bind_zonefiles_slaveprefix_error_regex'] = 'Invalid BIND zonefiles slave prefix.'; $wb['bind_keyfiles_dir_error_regex'] = 'Invalid BIND keyfiles directory.'; $wb['mailbox_soft_delete_txt'] = 'Mailbox soft delete'; -$wb['mailbox_soft_delete_info_txt'] = 'by default cleaned up after 7 days.'; +$wb['soft_delete_directly_txt'] = 'Delete instantly'; +$wb['soft_delete_keep_indefinitely_txt'] = 'Rename but don't delete (manual cleanup)'; +$wb['soft_delete_keep_1_txt'] = 'Purge after 1 day'; +$wb['soft_delete_keep_7_txt'] = 'Purge after 7 days'; +$wb['soft_delete_keep_30_txt'] = 'Purge after 30 days'; +$wb['soft_delete_keep_90_txt'] = 'Purge after 90 days'; +$wb['soft_delete_keep_365_txt'] = 'Purge after 365 days'; diff --git a/interface/web/admin/lib/lang/se_server_config.lng b/interface/web/admin/lib/lang/se_server_config.lng index 58d3cbce26..145592c874 100644 --- a/interface/web/admin/lib/lang/se_server_config.lng +++ b/interface/web/admin/lib/lang/se_server_config.lng @@ -350,4 +350,10 @@ $wb['bind_zonefiles_masterprefix_error_regex'] = 'Invalid BIND zonefiles master $wb['bind_zonefiles_slaveprefix_error_regex'] = 'Invalid BIND zonefiles slave prefix.'; $wb['bind_keyfiles_dir_error_regex'] = 'Invalid BIND keyfiles directory.'; $wb['mailbox_soft_delete_txt'] = 'Mailbox soft delete'; -$wb['mailbox_soft_delete_info_txt'] = 'by default cleaned up after 7 days.'; +$wb['soft_delete_directly_txt'] = 'Delete instantly'; +$wb['soft_delete_keep_indefinitely_txt'] = 'Rename but don't delete (manual cleanup)'; +$wb['soft_delete_keep_1_txt'] = 'Purge after 1 day'; +$wb['soft_delete_keep_7_txt'] = 'Purge after 7 days'; +$wb['soft_delete_keep_30_txt'] = 'Purge after 30 days'; +$wb['soft_delete_keep_90_txt'] = 'Purge after 90 days'; +$wb['soft_delete_keep_365_txt'] = 'Purge after 365 days'; diff --git a/interface/web/admin/lib/lang/sk_server_config.lng b/interface/web/admin/lib/lang/sk_server_config.lng index b6236c2f1c..8278310478 100644 --- a/interface/web/admin/lib/lang/sk_server_config.lng +++ b/interface/web/admin/lib/lang/sk_server_config.lng @@ -350,4 +350,10 @@ $wb['bind_zonefiles_masterprefix_error_regex'] = 'Invalid BIND zonefiles master $wb['bind_zonefiles_slaveprefix_error_regex'] = 'Invalid BIND zonefiles slave prefix.'; $wb['bind_keyfiles_dir_error_regex'] = 'Invalid BIND keyfiles directory.'; $wb['mailbox_soft_delete_txt'] = 'Mailbox soft delete'; -$wb['mailbox_soft_delete_info_txt'] = 'by default cleaned up after 7 days.'; +$wb['soft_delete_directly_txt'] = 'Delete instantly'; +$wb['soft_delete_keep_indefinitely_txt'] = 'Rename but don't delete (manual cleanup)'; +$wb['soft_delete_keep_1_txt'] = 'Purge after 1 day'; +$wb['soft_delete_keep_7_txt'] = 'Purge after 7 days'; +$wb['soft_delete_keep_30_txt'] = 'Purge after 30 days'; +$wb['soft_delete_keep_90_txt'] = 'Purge after 90 days'; +$wb['soft_delete_keep_365_txt'] = 'Purge after 365 days'; diff --git a/interface/web/admin/lib/lang/tr_server_config.lng b/interface/web/admin/lib/lang/tr_server_config.lng index d75cceedcf..22b3be4e20 100644 --- a/interface/web/admin/lib/lang/tr_server_config.lng +++ b/interface/web/admin/lib/lang/tr_server_config.lng @@ -347,4 +347,10 @@ $wb['bind_zonefiles_masterprefix_error_regex'] = 'Invalid BIND zonefiles master $wb['bind_zonefiles_slaveprefix_error_regex'] = 'Invalid BIND zonefiles slave prefix.'; $wb['bind_keyfiles_dir_error_regex'] = 'Invalid BIND keyfiles directory.'; $wb['mailbox_soft_delete_txt'] = 'Mailbox soft delete'; -$wb['mailbox_soft_delete_info_txt'] = 'by default cleaned up after 7 days.'; +$wb['soft_delete_directly_txt'] = 'Delete instantly'; +$wb['soft_delete_keep_indefinitely_txt'] = 'Rename but don't delete (manual cleanup)'; +$wb['soft_delete_keep_1_txt'] = 'Purge after 1 day'; +$wb['soft_delete_keep_7_txt'] = 'Purge after 7 days'; +$wb['soft_delete_keep_30_txt'] = 'Purge after 30 days'; +$wb['soft_delete_keep_90_txt'] = 'Purge after 90 days'; +$wb['soft_delete_keep_365_txt'] = 'Purge after 365 days'; From ff3b2c13ae0cdc3737ed7d5706138813224eba45 Mon Sep 17 00:00:00 2001 From: Herman van Rink Date: Sun, 7 May 2023 12:30:14 +0200 Subject: [PATCH 143/621] escape --- interface/web/admin/lib/lang/ar_server_config.lng | 2 +- interface/web/admin/lib/lang/bg_server_config.lng | 2 +- interface/web/admin/lib/lang/br_server_config.lng | 2 +- interface/web/admin/lib/lang/ca_server_config.lng | 2 +- interface/web/admin/lib/lang/cn_server_config.lng | 2 +- interface/web/admin/lib/lang/cz_server_config.lng | 2 +- interface/web/admin/lib/lang/de_server_config.lng | 2 +- interface/web/admin/lib/lang/dk_server_config.lng | 2 +- interface/web/admin/lib/lang/el_server_config.lng | 2 +- interface/web/admin/lib/lang/en_server_config.lng | 2 +- interface/web/admin/lib/lang/es_server_config.lng | 2 +- interface/web/admin/lib/lang/fi_server_config.lng | 2 +- interface/web/admin/lib/lang/fr_server_config.lng | 2 +- interface/web/admin/lib/lang/hr_server_config.lng | 2 +- interface/web/admin/lib/lang/hu_server_config.lng | 2 +- interface/web/admin/lib/lang/id_server_config.lng | 2 +- interface/web/admin/lib/lang/it_server_config.lng | 2 +- interface/web/admin/lib/lang/ja_server_config.lng | 2 +- interface/web/admin/lib/lang/nl_server_config.lng | 2 +- interface/web/admin/lib/lang/pl_server_config.lng | 2 +- interface/web/admin/lib/lang/pt_server_config.lng | 2 +- interface/web/admin/lib/lang/ro_server_config.lng | 2 +- interface/web/admin/lib/lang/ru_server_config.lng | 2 +- interface/web/admin/lib/lang/se_server_config.lng | 2 +- interface/web/admin/lib/lang/sk_server_config.lng | 2 +- interface/web/admin/lib/lang/tr_server_config.lng | 2 +- 26 files changed, 26 insertions(+), 26 deletions(-) diff --git a/interface/web/admin/lib/lang/ar_server_config.lng b/interface/web/admin/lib/lang/ar_server_config.lng index 8d680d5e4c..18d7baba88 100644 --- a/interface/web/admin/lib/lang/ar_server_config.lng +++ b/interface/web/admin/lib/lang/ar_server_config.lng @@ -351,7 +351,7 @@ $wb['bind_zonefiles_slaveprefix_error_regex'] = 'Invalid BIND zonefiles slave pr $wb['bind_keyfiles_dir_error_regex'] = 'Invalid BIND keyfiles directory.'; $wb['mailbox_soft_delete_txt'] = 'Mailbox soft delete'; $wb['soft_delete_directly_txt'] = 'Delete instantly'; -$wb['soft_delete_keep_indefinitely_txt'] = 'Rename but don't delete (manual cleanup)'; +$wb['soft_delete_keep_indefinitely_txt'] = 'Rename but don\'t delete (manual cleanup)'; $wb['soft_delete_keep_1_txt'] = 'Purge after 1 day'; $wb['soft_delete_keep_7_txt'] = 'Purge after 7 days'; $wb['soft_delete_keep_30_txt'] = 'Purge after 30 days'; diff --git a/interface/web/admin/lib/lang/bg_server_config.lng b/interface/web/admin/lib/lang/bg_server_config.lng index ae2dd48193..50c5f2854f 100644 --- a/interface/web/admin/lib/lang/bg_server_config.lng +++ b/interface/web/admin/lib/lang/bg_server_config.lng @@ -351,7 +351,7 @@ $wb['bind_zonefiles_slaveprefix_error_regex'] = 'Invalid BIND zonefiles slave pr $wb['bind_keyfiles_dir_error_regex'] = 'Invalid BIND keyfiles directory.'; $wb['mailbox_soft_delete_txt'] = 'Mailbox soft delete'; $wb['soft_delete_directly_txt'] = 'Delete instantly'; -$wb['soft_delete_keep_indefinitely_txt'] = 'Rename but don't delete (manual cleanup)'; +$wb['soft_delete_keep_indefinitely_txt'] = 'Rename but don\'t delete (manual cleanup)'; $wb['soft_delete_keep_1_txt'] = 'Purge after 1 day'; $wb['soft_delete_keep_7_txt'] = 'Purge after 7 days'; $wb['soft_delete_keep_30_txt'] = 'Purge after 30 days'; diff --git a/interface/web/admin/lib/lang/br_server_config.lng b/interface/web/admin/lib/lang/br_server_config.lng index b34e898007..cd007ed66f 100644 --- a/interface/web/admin/lib/lang/br_server_config.lng +++ b/interface/web/admin/lib/lang/br_server_config.lng @@ -351,7 +351,7 @@ $wb['bind_zonefiles_slaveprefix_error_regex'] = 'Invalid BIND zonefiles slave pr $wb['bind_keyfiles_dir_error_regex'] = 'Invalid BIND keyfiles directory.'; $wb['mailbox_soft_delete_txt'] = 'Mailbox soft delete'; $wb['soft_delete_directly_txt'] = 'Delete instantly'; -$wb['soft_delete_keep_indefinitely_txt'] = 'Rename but don't delete (manual cleanup)'; +$wb['soft_delete_keep_indefinitely_txt'] = 'Rename but don\'t delete (manual cleanup)'; $wb['soft_delete_keep_1_txt'] = 'Purge after 1 day'; $wb['soft_delete_keep_7_txt'] = 'Purge after 7 days'; $wb['soft_delete_keep_30_txt'] = 'Purge after 30 days'; diff --git a/interface/web/admin/lib/lang/ca_server_config.lng b/interface/web/admin/lib/lang/ca_server_config.lng index 968daecea2..6201a01fed 100644 --- a/interface/web/admin/lib/lang/ca_server_config.lng +++ b/interface/web/admin/lib/lang/ca_server_config.lng @@ -351,7 +351,7 @@ $wb['bind_zonefiles_slaveprefix_error_regex'] = 'Invalid BIND zonefiles slave pr $wb['bind_keyfiles_dir_error_regex'] = 'Invalid BIND keyfiles directory.'; $wb['mailbox_soft_delete_txt'] = 'Mailbox soft delete'; $wb['soft_delete_directly_txt'] = 'Delete instantly'; -$wb['soft_delete_keep_indefinitely_txt'] = 'Rename but don't delete (manual cleanup)'; +$wb['soft_delete_keep_indefinitely_txt'] = 'Rename but don\'t delete (manual cleanup)'; $wb['soft_delete_keep_1_txt'] = 'Purge after 1 day'; $wb['soft_delete_keep_7_txt'] = 'Purge after 7 days'; $wb['soft_delete_keep_30_txt'] = 'Purge after 30 days'; diff --git a/interface/web/admin/lib/lang/cn_server_config.lng b/interface/web/admin/lib/lang/cn_server_config.lng index 7daa337298..bc728bb632 100644 --- a/interface/web/admin/lib/lang/cn_server_config.lng +++ b/interface/web/admin/lib/lang/cn_server_config.lng @@ -352,7 +352,7 @@ $wb['jailkit_hardlinks_no_txt'] = '不,删除硬链接文件'; $wb['jailkit_hardlinks_yes_txt'] = '是的,如果可能,使用硬链接'; $wb['mailbox_soft_delete_txt'] = '邮箱软删除'; $wb['soft_delete_directly_txt'] = 'Delete instantly'; -$wb['soft_delete_keep_indefinitely_txt'] = 'Rename but don't delete (manual cleanup)'; +$wb['soft_delete_keep_indefinitely_txt'] = 'Rename but don\'t delete (manual cleanup)'; $wb['soft_delete_keep_1_txt'] = 'Purge after 1 day'; $wb['soft_delete_keep_7_txt'] = 'Purge after 7 days'; $wb['soft_delete_keep_30_txt'] = 'Purge after 30 days'; diff --git a/interface/web/admin/lib/lang/cz_server_config.lng b/interface/web/admin/lib/lang/cz_server_config.lng index cba840bf44..11f9ae7a5a 100644 --- a/interface/web/admin/lib/lang/cz_server_config.lng +++ b/interface/web/admin/lib/lang/cz_server_config.lng @@ -351,7 +351,7 @@ $wb['bind_zonefiles_slaveprefix_error_regex'] = 'Invalid BIND zonefiles slave pr $wb['bind_keyfiles_dir_error_regex'] = 'Invalid BIND keyfiles directory.'; $wb['mailbox_soft_delete_txt'] = 'Mailbox soft delete'; $wb['soft_delete_directly_txt'] = 'Delete instantly'; -$wb['soft_delete_keep_indefinitely_txt'] = 'Rename but don't delete (manual cleanup)'; +$wb['soft_delete_keep_indefinitely_txt'] = 'Rename but don\'t delete (manual cleanup)'; $wb['soft_delete_keep_1_txt'] = 'Purge after 1 day'; $wb['soft_delete_keep_7_txt'] = 'Purge after 7 days'; $wb['soft_delete_keep_30_txt'] = 'Purge after 30 days'; diff --git a/interface/web/admin/lib/lang/de_server_config.lng b/interface/web/admin/lib/lang/de_server_config.lng index b5b8731a24..c1f3546838 100644 --- a/interface/web/admin/lib/lang/de_server_config.lng +++ b/interface/web/admin/lib/lang/de_server_config.lng @@ -351,7 +351,7 @@ $wb['bind_zonefiles_masterprefix_error_regex'] = 'Invalid BIND zonefiles master $wb['bind_zonefiles_slaveprefix_error_regex'] = 'Invalid BIND zonefiles slave prefix.'; $wb['bind_keyfiles_dir_error_regex'] = 'Invalid BIND keyfiles directory.'; $wb['soft_delete_directly_txt'] = 'Delete instantly'; -$wb['soft_delete_keep_indefinitely_txt'] = 'Rename but don't delete (manual cleanup)'; +$wb['soft_delete_keep_indefinitely_txt'] = 'Rename but don\'t delete (manual cleanup)'; $wb['soft_delete_keep_1_txt'] = 'Purge after 1 day'; $wb['soft_delete_keep_7_txt'] = 'Purge after 7 days'; $wb['soft_delete_keep_30_txt'] = 'Purge after 30 days'; diff --git a/interface/web/admin/lib/lang/dk_server_config.lng b/interface/web/admin/lib/lang/dk_server_config.lng index 15e38decf6..a693e9fa59 100644 --- a/interface/web/admin/lib/lang/dk_server_config.lng +++ b/interface/web/admin/lib/lang/dk_server_config.lng @@ -351,7 +351,7 @@ $wb['bind_zonefiles_slaveprefix_error_regex'] = 'Invalid BIND zonefiles slave pr $wb['bind_keyfiles_dir_error_regex'] = 'Invalid BIND keyfiles directory.'; $wb['mailbox_soft_delete_txt'] = 'Mailbox soft delete'; $wb['soft_delete_directly_txt'] = 'Delete instantly'; -$wb['soft_delete_keep_indefinitely_txt'] = 'Rename but don't delete (manual cleanup)'; +$wb['soft_delete_keep_indefinitely_txt'] = 'Rename but don\'t delete (manual cleanup)'; $wb['soft_delete_keep_1_txt'] = 'Purge after 1 day'; $wb['soft_delete_keep_7_txt'] = 'Purge after 7 days'; $wb['soft_delete_keep_30_txt'] = 'Purge after 30 days'; diff --git a/interface/web/admin/lib/lang/el_server_config.lng b/interface/web/admin/lib/lang/el_server_config.lng index bc29052801..ff50546229 100644 --- a/interface/web/admin/lib/lang/el_server_config.lng +++ b/interface/web/admin/lib/lang/el_server_config.lng @@ -351,7 +351,7 @@ $wb['bind_zonefiles_slaveprefix_error_regex'] = 'Invalid BIND zonefiles slave pr $wb['bind_keyfiles_dir_error_regex'] = 'Invalid BIND keyfiles directory.'; $wb['mailbox_soft_delete_txt'] = 'Mailbox soft delete'; $wb['soft_delete_directly_txt'] = 'Delete instantly'; -$wb['soft_delete_keep_indefinitely_txt'] = 'Rename but don't delete (manual cleanup)'; +$wb['soft_delete_keep_indefinitely_txt'] = 'Rename but don\'t delete (manual cleanup)'; $wb['soft_delete_keep_1_txt'] = 'Purge after 1 day'; $wb['soft_delete_keep_7_txt'] = 'Purge after 7 days'; $wb['soft_delete_keep_30_txt'] = 'Purge after 30 days'; diff --git a/interface/web/admin/lib/lang/en_server_config.lng b/interface/web/admin/lib/lang/en_server_config.lng index 1d89dc5b7a..b88f6c48f2 100644 --- a/interface/web/admin/lib/lang/en_server_config.lng +++ b/interface/web/admin/lib/lang/en_server_config.lng @@ -357,7 +357,7 @@ $wb['jailkit_hardlinks_no_txt'] = 'No, remove hardlinked files'; $wb['jailkit_hardlinks_yes_txt'] = 'Yes, use hardlinks if possible'; $wb['mailbox_soft_delete_txt'] = 'Mailbox soft delete'; $wb['soft_delete_directly_txt'] = 'Delete instantly'; -$wb['soft_delete_keep_indefinitely_txt'] = 'Rename but don't delete (manual cleanup)'; +$wb['soft_delete_keep_indefinitely_txt'] = 'Rename but don\'t delete (manual cleanup)'; $wb['soft_delete_keep_1_txt'] = 'Purge after 1 day'; $wb['soft_delete_keep_7_txt'] = 'Purge after 7 days'; $wb['soft_delete_keep_30_txt'] = 'Purge after 30 days'; diff --git a/interface/web/admin/lib/lang/es_server_config.lng b/interface/web/admin/lib/lang/es_server_config.lng index be8a52022e..24a39813cb 100644 --- a/interface/web/admin/lib/lang/es_server_config.lng +++ b/interface/web/admin/lib/lang/es_server_config.lng @@ -351,7 +351,7 @@ $wb['bind_zonefiles_slaveprefix_error_regex'] = 'Invalid BIND zonefiles slave pr $wb['bind_keyfiles_dir_error_regex'] = 'Invalid BIND keyfiles directory.'; $wb['mailbox_soft_delete_txt'] = 'Mailbox soft delete'; $wb['soft_delete_directly_txt'] = 'Delete instantly'; -$wb['soft_delete_keep_indefinitely_txt'] = 'Rename but don't delete (manual cleanup)'; +$wb['soft_delete_keep_indefinitely_txt'] = 'Rename but don\'t delete (manual cleanup)'; $wb['soft_delete_keep_1_txt'] = 'Purge after 1 day'; $wb['soft_delete_keep_7_txt'] = 'Purge after 7 days'; $wb['soft_delete_keep_30_txt'] = 'Purge after 30 days'; diff --git a/interface/web/admin/lib/lang/fi_server_config.lng b/interface/web/admin/lib/lang/fi_server_config.lng index c06c124962..72661ad302 100644 --- a/interface/web/admin/lib/lang/fi_server_config.lng +++ b/interface/web/admin/lib/lang/fi_server_config.lng @@ -351,7 +351,7 @@ $wb['bind_zonefiles_slaveprefix_error_regex'] = 'Invalid BIND zonefiles slave pr $wb['bind_keyfiles_dir_error_regex'] = 'Invalid BIND keyfiles directory.'; $wb['mailbox_soft_delete_txt'] = 'Mailbox soft delete'; $wb['soft_delete_directly_txt'] = 'Delete instantly'; -$wb['soft_delete_keep_indefinitely_txt'] = 'Rename but don't delete (manual cleanup)'; +$wb['soft_delete_keep_indefinitely_txt'] = 'Rename but don\'t delete (manual cleanup)'; $wb['soft_delete_keep_1_txt'] = 'Purge after 1 day'; $wb['soft_delete_keep_7_txt'] = 'Purge after 7 days'; $wb['soft_delete_keep_30_txt'] = 'Purge after 30 days'; diff --git a/interface/web/admin/lib/lang/fr_server_config.lng b/interface/web/admin/lib/lang/fr_server_config.lng index 32868b0b4b..3cbe20b3fc 100644 --- a/interface/web/admin/lib/lang/fr_server_config.lng +++ b/interface/web/admin/lib/lang/fr_server_config.lng @@ -351,7 +351,7 @@ $wb['bind_zonefiles_slaveprefix_error_regex'] = 'Invalid BIND zonefiles slave pr $wb['bind_keyfiles_dir_error_regex'] = 'Invalid BIND keyfiles directory.'; $wb['mailbox_soft_delete_txt'] = 'Mailbox soft delete'; $wb['soft_delete_directly_txt'] = 'Delete instantly'; -$wb['soft_delete_keep_indefinitely_txt'] = 'Rename but don't delete (manual cleanup)'; +$wb['soft_delete_keep_indefinitely_txt'] = 'Rename but don\'t delete (manual cleanup)'; $wb['soft_delete_keep_1_txt'] = 'Purge after 1 day'; $wb['soft_delete_keep_7_txt'] = 'Purge after 7 days'; $wb['soft_delete_keep_30_txt'] = 'Purge after 30 days'; diff --git a/interface/web/admin/lib/lang/hr_server_config.lng b/interface/web/admin/lib/lang/hr_server_config.lng index 429aab4c0d..cb0f82f052 100644 --- a/interface/web/admin/lib/lang/hr_server_config.lng +++ b/interface/web/admin/lib/lang/hr_server_config.lng @@ -351,7 +351,7 @@ $wb['bind_zonefiles_slaveprefix_error_regex'] = 'Invalid BIND zonefiles slave pr $wb['bind_keyfiles_dir_error_regex'] = 'Invalid BIND keyfiles directory.'; $wb['mailbox_soft_delete_txt'] = 'Mailbox soft delete'; $wb['soft_delete_directly_txt'] = 'Delete instantly'; -$wb['soft_delete_keep_indefinitely_txt'] = 'Rename but don't delete (manual cleanup)'; +$wb['soft_delete_keep_indefinitely_txt'] = 'Rename but don\'t delete (manual cleanup)'; $wb['soft_delete_keep_1_txt'] = 'Purge after 1 day'; $wb['soft_delete_keep_7_txt'] = 'Purge after 7 days'; $wb['soft_delete_keep_30_txt'] = 'Purge after 30 days'; diff --git a/interface/web/admin/lib/lang/hu_server_config.lng b/interface/web/admin/lib/lang/hu_server_config.lng index a13ccbf769..548ce7708f 100644 --- a/interface/web/admin/lib/lang/hu_server_config.lng +++ b/interface/web/admin/lib/lang/hu_server_config.lng @@ -351,7 +351,7 @@ $wb['bind_zonefiles_slaveprefix_error_regex'] = 'Invalid BIND zonefiles slave pr $wb['bind_keyfiles_dir_error_regex'] = 'Invalid BIND keyfiles directory.'; $wb['mailbox_soft_delete_txt'] = 'Mailbox soft delete'; $wb['soft_delete_directly_txt'] = 'Delete instantly'; -$wb['soft_delete_keep_indefinitely_txt'] = 'Rename but don't delete (manual cleanup)'; +$wb['soft_delete_keep_indefinitely_txt'] = 'Rename but don\'t delete (manual cleanup)'; $wb['soft_delete_keep_1_txt'] = 'Purge after 1 day'; $wb['soft_delete_keep_7_txt'] = 'Purge after 7 days'; $wb['soft_delete_keep_30_txt'] = 'Purge after 30 days'; diff --git a/interface/web/admin/lib/lang/id_server_config.lng b/interface/web/admin/lib/lang/id_server_config.lng index 6c1e026206..ddc1656986 100644 --- a/interface/web/admin/lib/lang/id_server_config.lng +++ b/interface/web/admin/lib/lang/id_server_config.lng @@ -351,7 +351,7 @@ $wb['bind_zonefiles_slaveprefix_error_regex'] = 'Invalid BIND zonefiles slave pr $wb['bind_keyfiles_dir_error_regex'] = 'Invalid BIND keyfiles directory.'; $wb['mailbox_soft_delete_txt'] = 'Mailbox soft delete'; $wb['soft_delete_directly_txt'] = 'Delete instantly'; -$wb['soft_delete_keep_indefinitely_txt'] = 'Rename but don't delete (manual cleanup)'; +$wb['soft_delete_keep_indefinitely_txt'] = 'Rename but don\'t delete (manual cleanup)'; $wb['soft_delete_keep_1_txt'] = 'Purge after 1 day'; $wb['soft_delete_keep_7_txt'] = 'Purge after 7 days'; $wb['soft_delete_keep_30_txt'] = 'Purge after 30 days'; diff --git a/interface/web/admin/lib/lang/it_server_config.lng b/interface/web/admin/lib/lang/it_server_config.lng index 1cf6d64925..38c95df3e0 100644 --- a/interface/web/admin/lib/lang/it_server_config.lng +++ b/interface/web/admin/lib/lang/it_server_config.lng @@ -350,7 +350,7 @@ $wb['bind_zonefiles_slaveprefix_error_regex'] = 'Invalid BIND zonefiles slave pr $wb['bind_keyfiles_dir_error_regex'] = 'Invalid BIND keyfiles directory.'; $wb['mailbox_soft_delete_txt'] = 'Mailbox soft delete'; $wb['soft_delete_directly_txt'] = 'Delete instantly'; -$wb['soft_delete_keep_indefinitely_txt'] = 'Rename but don't delete (manual cleanup)'; +$wb['soft_delete_keep_indefinitely_txt'] = 'Rename but don\'t delete (manual cleanup)'; $wb['soft_delete_keep_1_txt'] = 'Purge after 1 day'; $wb['soft_delete_keep_7_txt'] = 'Purge after 7 days'; $wb['soft_delete_keep_30_txt'] = 'Purge after 30 days'; diff --git a/interface/web/admin/lib/lang/ja_server_config.lng b/interface/web/admin/lib/lang/ja_server_config.lng index 4e05a32c84..4bfef54c7c 100644 --- a/interface/web/admin/lib/lang/ja_server_config.lng +++ b/interface/web/admin/lib/lang/ja_server_config.lng @@ -351,7 +351,7 @@ $wb['bind_zonefiles_slaveprefix_error_regex'] = 'Invalid BIND zonefiles slave pr $wb['bind_keyfiles_dir_error_regex'] = 'Invalid BIND keyfiles directory.'; $wb['mailbox_soft_delete_txt'] = 'Mailbox soft delete'; $wb['soft_delete_directly_txt'] = 'Delete instantly'; -$wb['soft_delete_keep_indefinitely_txt'] = 'Rename but don't delete (manual cleanup)'; +$wb['soft_delete_keep_indefinitely_txt'] = 'Rename but don\'t delete (manual cleanup)'; $wb['soft_delete_keep_1_txt'] = 'Purge after 1 day'; $wb['soft_delete_keep_7_txt'] = 'Purge after 7 days'; $wb['soft_delete_keep_30_txt'] = 'Purge after 30 days'; diff --git a/interface/web/admin/lib/lang/nl_server_config.lng b/interface/web/admin/lib/lang/nl_server_config.lng index e77c6e46a3..2a233c81d1 100644 --- a/interface/web/admin/lib/lang/nl_server_config.lng +++ b/interface/web/admin/lib/lang/nl_server_config.lng @@ -351,7 +351,7 @@ $wb['bind_zonefiles_slaveprefix_error_regex'] = 'Invalid BIND zonefiles slave pr $wb['bind_keyfiles_dir_error_regex'] = 'Invalid BIND keyfiles directory.'; $wb['mailbox_soft_delete_txt'] = 'Mailbox soft delete'; $wb['soft_delete_directly_txt'] = 'Delete instantly'; -$wb['soft_delete_keep_indefinitely_txt'] = 'Rename but don't delete (manual cleanup)'; +$wb['soft_delete_keep_indefinitely_txt'] = 'Rename but don\'t delete (manual cleanup)'; $wb['soft_delete_keep_1_txt'] = 'Purge after 1 day'; $wb['soft_delete_keep_7_txt'] = 'Purge after 7 days'; $wb['soft_delete_keep_30_txt'] = 'Purge after 30 days'; diff --git a/interface/web/admin/lib/lang/pl_server_config.lng b/interface/web/admin/lib/lang/pl_server_config.lng index 1d277a2757..9eda8df634 100644 --- a/interface/web/admin/lib/lang/pl_server_config.lng +++ b/interface/web/admin/lib/lang/pl_server_config.lng @@ -351,7 +351,7 @@ $wb['bind_zonefiles_slaveprefix_error_regex'] = 'Invalid BIND zonefiles slave pr $wb['bind_keyfiles_dir_error_regex'] = 'Invalid BIND keyfiles directory.'; $wb['mailbox_soft_delete_txt'] = 'Mailbox soft delete'; $wb['soft_delete_directly_txt'] = 'Delete instantly'; -$wb['soft_delete_keep_indefinitely_txt'] = 'Rename but don't delete (manual cleanup)'; +$wb['soft_delete_keep_indefinitely_txt'] = 'Rename but don\'t delete (manual cleanup)'; $wb['soft_delete_keep_1_txt'] = 'Purge after 1 day'; $wb['soft_delete_keep_7_txt'] = 'Purge after 7 days'; $wb['soft_delete_keep_30_txt'] = 'Purge after 30 days'; diff --git a/interface/web/admin/lib/lang/pt_server_config.lng b/interface/web/admin/lib/lang/pt_server_config.lng index 6d338ee50c..091fcbb208 100644 --- a/interface/web/admin/lib/lang/pt_server_config.lng +++ b/interface/web/admin/lib/lang/pt_server_config.lng @@ -351,7 +351,7 @@ $wb['bind_zonefiles_slaveprefix_error_regex'] = 'Invalid BIND zonefiles slave pr $wb['bind_keyfiles_dir_error_regex'] = 'Invalid BIND keyfiles directory.'; $wb['mailbox_soft_delete_txt'] = 'Mailbox soft delete'; $wb['soft_delete_directly_txt'] = 'Delete instantly'; -$wb['soft_delete_keep_indefinitely_txt'] = 'Rename but don't delete (manual cleanup)'; +$wb['soft_delete_keep_indefinitely_txt'] = 'Rename but don\'t delete (manual cleanup)'; $wb['soft_delete_keep_1_txt'] = 'Purge after 1 day'; $wb['soft_delete_keep_7_txt'] = 'Purge after 7 days'; $wb['soft_delete_keep_30_txt'] = 'Purge after 30 days'; diff --git a/interface/web/admin/lib/lang/ro_server_config.lng b/interface/web/admin/lib/lang/ro_server_config.lng index d713897179..f56ba7011e 100644 --- a/interface/web/admin/lib/lang/ro_server_config.lng +++ b/interface/web/admin/lib/lang/ro_server_config.lng @@ -351,7 +351,7 @@ $wb['bind_zonefiles_slaveprefix_error_regex'] = 'Invalid BIND zonefiles slave pr $wb['bind_keyfiles_dir_error_regex'] = 'Invalid BIND keyfiles directory.'; $wb['mailbox_soft_delete_txt'] = 'Mailbox soft delete'; $wb['soft_delete_directly_txt'] = 'Delete instantly'; -$wb['soft_delete_keep_indefinitely_txt'] = 'Rename but don't delete (manual cleanup)'; +$wb['soft_delete_keep_indefinitely_txt'] = 'Rename but don\'t delete (manual cleanup)'; $wb['soft_delete_keep_1_txt'] = 'Purge after 1 day'; $wb['soft_delete_keep_7_txt'] = 'Purge after 7 days'; $wb['soft_delete_keep_30_txt'] = 'Purge after 30 days'; diff --git a/interface/web/admin/lib/lang/ru_server_config.lng b/interface/web/admin/lib/lang/ru_server_config.lng index cdf8a5935e..8b72f3ad98 100644 --- a/interface/web/admin/lib/lang/ru_server_config.lng +++ b/interface/web/admin/lib/lang/ru_server_config.lng @@ -351,7 +351,7 @@ $wb['bind_zonefiles_slaveprefix_error_regex'] = 'Invalid BIND zonefiles slave pr $wb['bind_keyfiles_dir_error_regex'] = 'Invalid BIND keyfiles directory.'; $wb['mailbox_soft_delete_txt'] = 'Mailbox soft delete'; $wb['soft_delete_directly_txt'] = 'Delete instantly'; -$wb['soft_delete_keep_indefinitely_txt'] = 'Rename but don't delete (manual cleanup)'; +$wb['soft_delete_keep_indefinitely_txt'] = 'Rename but don\'t delete (manual cleanup)'; $wb['soft_delete_keep_1_txt'] = 'Purge after 1 day'; $wb['soft_delete_keep_7_txt'] = 'Purge after 7 days'; $wb['soft_delete_keep_30_txt'] = 'Purge after 30 days'; diff --git a/interface/web/admin/lib/lang/se_server_config.lng b/interface/web/admin/lib/lang/se_server_config.lng index 145592c874..cf47494a57 100644 --- a/interface/web/admin/lib/lang/se_server_config.lng +++ b/interface/web/admin/lib/lang/se_server_config.lng @@ -351,7 +351,7 @@ $wb['bind_zonefiles_slaveprefix_error_regex'] = 'Invalid BIND zonefiles slave pr $wb['bind_keyfiles_dir_error_regex'] = 'Invalid BIND keyfiles directory.'; $wb['mailbox_soft_delete_txt'] = 'Mailbox soft delete'; $wb['soft_delete_directly_txt'] = 'Delete instantly'; -$wb['soft_delete_keep_indefinitely_txt'] = 'Rename but don't delete (manual cleanup)'; +$wb['soft_delete_keep_indefinitely_txt'] = 'Rename but don\'t delete (manual cleanup)'; $wb['soft_delete_keep_1_txt'] = 'Purge after 1 day'; $wb['soft_delete_keep_7_txt'] = 'Purge after 7 days'; $wb['soft_delete_keep_30_txt'] = 'Purge after 30 days'; diff --git a/interface/web/admin/lib/lang/sk_server_config.lng b/interface/web/admin/lib/lang/sk_server_config.lng index 8278310478..10203054e6 100644 --- a/interface/web/admin/lib/lang/sk_server_config.lng +++ b/interface/web/admin/lib/lang/sk_server_config.lng @@ -351,7 +351,7 @@ $wb['bind_zonefiles_slaveprefix_error_regex'] = 'Invalid BIND zonefiles slave pr $wb['bind_keyfiles_dir_error_regex'] = 'Invalid BIND keyfiles directory.'; $wb['mailbox_soft_delete_txt'] = 'Mailbox soft delete'; $wb['soft_delete_directly_txt'] = 'Delete instantly'; -$wb['soft_delete_keep_indefinitely_txt'] = 'Rename but don't delete (manual cleanup)'; +$wb['soft_delete_keep_indefinitely_txt'] = 'Rename but don\'t delete (manual cleanup)'; $wb['soft_delete_keep_1_txt'] = 'Purge after 1 day'; $wb['soft_delete_keep_7_txt'] = 'Purge after 7 days'; $wb['soft_delete_keep_30_txt'] = 'Purge after 30 days'; diff --git a/interface/web/admin/lib/lang/tr_server_config.lng b/interface/web/admin/lib/lang/tr_server_config.lng index 22b3be4e20..626371d033 100644 --- a/interface/web/admin/lib/lang/tr_server_config.lng +++ b/interface/web/admin/lib/lang/tr_server_config.lng @@ -348,7 +348,7 @@ $wb['bind_zonefiles_slaveprefix_error_regex'] = 'Invalid BIND zonefiles slave pr $wb['bind_keyfiles_dir_error_regex'] = 'Invalid BIND keyfiles directory.'; $wb['mailbox_soft_delete_txt'] = 'Mailbox soft delete'; $wb['soft_delete_directly_txt'] = 'Delete instantly'; -$wb['soft_delete_keep_indefinitely_txt'] = 'Rename but don't delete (manual cleanup)'; +$wb['soft_delete_keep_indefinitely_txt'] = 'Rename but don\'t delete (manual cleanup)'; $wb['soft_delete_keep_1_txt'] = 'Purge after 1 day'; $wb['soft_delete_keep_7_txt'] = 'Purge after 7 days'; $wb['soft_delete_keep_30_txt'] = 'Purge after 30 days'; From a91ae2fe2f1e1ab535ccbcf6a1974fb257a1faf0 Mon Sep 17 00:00:00 2001 From: Johannes Koschier Date: Mon, 8 May 2023 07:46:22 +0000 Subject: [PATCH 144/621] 6467_clear_backup_fix --- server/lib/classes/backup.inc.php | 31 +++++++++++++++++++++++-------- 1 file changed, 23 insertions(+), 8 deletions(-) diff --git a/server/lib/classes/backup.inc.php b/server/lib/classes/backup.inc.php index 57f264ec44..6f58283acc 100644 --- a/server/lib/classes/backup.inc.php +++ b/server/lib/classes/backup.inc.php @@ -1149,7 +1149,7 @@ protected static function clearBackups($server_id, $web_id, $max_backup_copies, @unlink($full_filename); } } elseif (self::backupModeIsRepos($backup_mode)) { - $repos_archives = self::getAllArchives($backup_dir, $backup_mode, $password); + $repos_archives = self::getAllArchives($backup_dir, $backup_mode, $password, $prefix_list); usort($repos_archives, function ($a, $b) { return ($a['created_at'] > $b['created_at']) ? -1 : 1; }); @@ -1168,8 +1168,11 @@ protected static function clearBackups($server_id, $web_id, $max_backup_copies, return true; } - protected static function getAllArchives($backup_dir, $backup_mode, $password) - { + protected static function getAllArchives($backup_dir, $backup_mode, $password, $prefix_list = null) { + if (is_null($prefix_list)) { + global $app; + $app->log("prefix_list is null - [backupdir = $backup_dir, backupmode = $backup_mode ]", LOGLEVEL_WARN); + } $d = dir($backup_dir); $archives = []; /** @@ -1189,11 +1192,23 @@ protected static function getAllArchives($backup_dir, $backup_mode, $password) if (is_dir($repos_path) && strncmp('borg_', $entry, 5) === 0) { $archivesJson = json_decode(implode("", self::getReposArchives($backup_mode, $repos_path, $password, 'json')), TRUE); foreach ($archivesJson['archives'] as $archive) { - $archives[] = [ - 'repos' => $entry, - 'archive' => $archive['name'], - 'created_at' => strtotime($archive['time']), - ]; + if (is_null($prefix_list)) { //fallback if no prefix_list + $archives[] = [ + 'repos' => $entry, + 'archive' => $archive['name'], + 'created_at' => strtotime($archive['time']), + ]; + } else { + foreach ($prefix_list as $prefix) { + if (substr($archive['name'], 0, strlen($prefix)) == $prefix) { //filter backup list of all if no prefix_list + $archives[] = [ + 'repos' => $entry, + 'archive' => $archive['name'], + 'created_at' => strtotime($archive['time']), + ]; + } + } + } } } break; From 9bcc8e8333fd53aff37bf7a416fc7244b72c4873 Mon Sep 17 00:00:00 2001 From: Herman van Rink Date: Sun, 14 May 2023 14:50:00 +0200 Subject: [PATCH 145/621] Propose a basic editorconfig, #5522 --- .editorconfig | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 .editorconfig diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000000..89254ef91f --- /dev/null +++ b/.editorconfig @@ -0,0 +1,16 @@ +; top-most EditorConfig file +root = true + +; Unix-style newlines +[*] +charset = utf-8 +end_of_line = LF +insert_final_newline = true +trim_trailing_whitespace = true + +[*.{php}] +indent_style = tab + +[*.{htm,html}] +indent_style = space +indent_size = 4 From bba793847fc7beb3a0c022c4d03867150ff59762 Mon Sep 17 00:00:00 2001 From: Herman van Rink Date: Tue, 9 May 2023 15:01:37 +0200 Subject: [PATCH 146/621] Sum for quota usage --- interface/web/dashboard/dashlets/databasequota.php | 5 +++++ interface/web/dashboard/dashlets/mailquota.php | 3 +++ interface/web/dashboard/dashlets/quota.php | 2 ++ .../dashboard/dashlets/templates/databasequota.htm | 11 +++++++++-- .../web/dashboard/dashlets/templates/mailquota.htm | 10 +++++++++- interface/web/dashboard/dashlets/templates/quota.htm | 11 +++++++++-- 6 files changed, 37 insertions(+), 5 deletions(-) diff --git a/interface/web/dashboard/dashlets/databasequota.php b/interface/web/dashboard/dashlets/databasequota.php index 641dfd7784..077a7ddbcb 100644 --- a/interface/web/dashboard/dashlets/databasequota.php +++ b/interface/web/dashboard/dashlets/databasequota.php @@ -33,12 +33,17 @@ function show($limit_to_client_id = null) { //print_r($databases); $has_databasequota = false; + $total_used = 0; if(is_array($databases) && !empty($databases)){ + foreach ($databases as &$db) { + $total_used += $db['used_raw'] * 1000 * 1000; + } $databases = $app->functions->htmlentities($databases); $tpl->setloop('databasequota', $databases); $has_databasequota = isset($databases[0]['used']); } $tpl->setVar('has_databasequota', $has_databasequota); + $tpl->setVar('total_used', $app->functions->formatBytes($total_used, 0)); return $tpl->grab(); } diff --git a/interface/web/dashboard/dashlets/mailquota.php b/interface/web/dashboard/dashlets/mailquota.php index b310cc1dcb..8b328ab6f9 100644 --- a/interface/web/dashboard/dashlets/mailquota.php +++ b/interface/web/dashboard/dashlets/mailquota.php @@ -26,9 +26,11 @@ function show($limit_to_client_id = null) { //print_r($emails); $has_mailquota = false; + $total_used = 0; if(is_array($emails) && !empty($emails)){ foreach($emails as &$email) { $email['email'] = $app->functions->idn_decode($email['email']); + $total_used += $email['used_raw']; } unset($email); // email username is quoted in quota.lib already, so no htmlentities here to prevent double encoding @@ -37,6 +39,7 @@ function show($limit_to_client_id = null) { $has_mailquota = isset($emails[0]['used']); } $tpl->setVar('has_mailquota', $has_mailquota); + $tpl->setVar('total_used', $app->functions->formatBytes($total_used, 0)); return $tpl->grab(); } diff --git a/interface/web/dashboard/dashlets/quota.php b/interface/web/dashboard/dashlets/quota.php index 3225bd304f..adedbcf5c9 100644 --- a/interface/web/dashboard/dashlets/quota.php +++ b/interface/web/dashboard/dashlets/quota.php @@ -38,6 +38,7 @@ function show($limit_to_client_id = null) { foreach($sites as &$site) { $site['domain'] = $app->functions->idn_decode($site['domain']); $site['progressbar'] = $site['hd_quota']; + $total_used += $site['used_raw'] * 1000; } unset($site); @@ -46,6 +47,7 @@ function show($limit_to_client_id = null) { $has_quota = isset($sites[0]['used']); } $tpl->setVar('has_quota', $has_quota); + $tpl->setVar('total_used', $app->functions->formatBytes($total_used, 0)); return $tpl->grab(); diff --git a/interface/web/dashboard/dashlets/templates/databasequota.htm b/interface/web/dashboard/dashlets/templates/databasequota.htm index a2ecc2e47d..2676b65b35 100644 --- a/interface/web/dashboard/dashlets/templates/databasequota.htm +++ b/interface/web/dashboard/dashlets/templates/databasequota.htm @@ -24,5 +24,12 @@ - -
+ + + {tmpl_var name='total_txt'} + {tmpl_var name='total_used'} + + + + +
diff --git a/interface/web/dashboard/dashlets/templates/mailquota.htm b/interface/web/dashboard/dashlets/templates/mailquota.htm index 08834fa5ab..b30815456d 100644 --- a/interface/web/dashboard/dashlets/templates/mailquota.htm +++ b/interface/web/dashboard/dashlets/templates/mailquota.htm @@ -26,5 +26,13 @@ + + + + {tmpl_var name='total_txt'} + {tmpl_var name='total_used'} + + + -
+
diff --git a/interface/web/dashboard/dashlets/templates/quota.htm b/interface/web/dashboard/dashlets/templates/quota.htm index 6014467e80..7fab69413b 100644 --- a/interface/web/dashboard/dashlets/templates/quota.htm +++ b/interface/web/dashboard/dashlets/templates/quota.htm @@ -29,6 +29,13 @@ {tmpl_else}{/tmpl_if} - + + + + {tmpl_var name='total_txt'} + {tmpl_var name='total_used'} + + + -
\ No newline at end of file +
From 3b918323053335ba69dd223856a5a40adf34f332 Mon Sep 17 00:00:00 2001 From: Herman van Rink Date: Tue, 16 May 2023 21:42:13 +0200 Subject: [PATCH 147/621] Tabs are preferred by Till, so lets make that the default --- .editorconfig | 2 -- 1 file changed, 2 deletions(-) diff --git a/.editorconfig b/.editorconfig index 89254ef91f..7150a72ebc 100644 --- a/.editorconfig +++ b/.editorconfig @@ -7,8 +7,6 @@ charset = utf-8 end_of_line = LF insert_final_newline = true trim_trailing_whitespace = true - -[*.{php}] indent_style = tab [*.{htm,html}] From 190d49550ee2d20731b31412a36340924f2a6373 Mon Sep 17 00:00:00 2001 From: Herman van Rink Date: Tue, 16 May 2023 21:48:18 +0200 Subject: [PATCH 148/621] Bulk spaces to tabs in all CSS, #5522 --- interface/web/js/chosen/chosen.css | 548 +++--- .../default/assets/stylesheets/fonts.css | 2 +- .../default/assets/stylesheets/ispconfig.css | 1546 ++++++++--------- .../default/assets/stylesheets/pushy.css | 116 +- .../default/assets/stylesheets/responsive.css | 148 +- .../assets/stylesheets/select2-bootstrap.css | 44 +- .../default/assets/stylesheets/select2.css | 782 ++++----- .../assets/stylesheets/themes/dark/theme.css | 236 +-- .../stylesheets/themes/default/theme.css | 240 +-- remoting_client/API-docs/definitionen.css | 42 +- 10 files changed, 1852 insertions(+), 1852 deletions(-) diff --git a/interface/web/js/chosen/chosen.css b/interface/web/js/chosen/chosen.css index d203a07198..f4231fa343 100644 --- a/interface/web/js/chosen/chosen.css +++ b/interface/web/js/chosen/chosen.css @@ -1,430 +1,430 @@ /* @group Base */ .chosen-container { - position: relative; - display: inline-block; - vertical-align: middle; - font-size: 13px; - zoom: 1; - *display: inline; - -webkit-user-select: none; - -moz-user-select: none; - user-select: none; + position: relative; + display: inline-block; + vertical-align: middle; + font-size: 13px; + zoom: 1; + *display: inline; + -webkit-user-select: none; + -moz-user-select: none; + user-select: none; } .chosen-container .chosen-drop { - position: absolute; - top: 100%; - left: -9999px; - z-index: 1010; - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; - width: 100%; - border: 1px solid #aaa; - border-top: 0; - background: #fff; - box-shadow: 0 4px 5px rgba(0, 0, 0, 0.15); + position: absolute; + top: 100%; + left: -9999px; + z-index: 1010; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + width: 100%; + border: 1px solid #aaa; + border-top: 0; + background: #fff; + box-shadow: 0 4px 5px rgba(0, 0, 0, 0.15); } .chosen-container.chosen-with-drop .chosen-drop { - left: 0; + left: 0; } .chosen-container a { - cursor: pointer; + cursor: pointer; } /* @end */ /* @group Single Chosen */ .chosen-container-single .chosen-single { - position: relative; - display: block; - overflow: hidden; - padding: 0 0 0 8px; - height: 23px; - border: 1px solid #aaa; - border-radius: 5px; - background-color: #fff; - background: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(20%, #ffffff), color-stop(50%, #f6f6f6), color-stop(52%, #eeeeee), color-stop(100%, #f4f4f4)); - background: -webkit-linear-gradient(top, #ffffff 20%, #f6f6f6 50%, #eeeeee 52%, #f4f4f4 100%); - background: -moz-linear-gradient(top, #ffffff 20%, #f6f6f6 50%, #eeeeee 52%, #f4f4f4 100%); - background: -o-linear-gradient(top, #ffffff 20%, #f6f6f6 50%, #eeeeee 52%, #f4f4f4 100%); - background: linear-gradient(top, #ffffff 20%, #f6f6f6 50%, #eeeeee 52%, #f4f4f4 100%); - background-clip: padding-box; - box-shadow: 0 0 3px white inset, 0 1px 1px rgba(0, 0, 0, 0.1); - color: #444; - text-decoration: none; - white-space: nowrap; - line-height: 24px; + position: relative; + display: block; + overflow: hidden; + padding: 0 0 0 8px; + height: 23px; + border: 1px solid #aaa; + border-radius: 5px; + background-color: #fff; + background: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(20%, #ffffff), color-stop(50%, #f6f6f6), color-stop(52%, #eeeeee), color-stop(100%, #f4f4f4)); + background: -webkit-linear-gradient(top, #ffffff 20%, #f6f6f6 50%, #eeeeee 52%, #f4f4f4 100%); + background: -moz-linear-gradient(top, #ffffff 20%, #f6f6f6 50%, #eeeeee 52%, #f4f4f4 100%); + background: -o-linear-gradient(top, #ffffff 20%, #f6f6f6 50%, #eeeeee 52%, #f4f4f4 100%); + background: linear-gradient(top, #ffffff 20%, #f6f6f6 50%, #eeeeee 52%, #f4f4f4 100%); + background-clip: padding-box; + box-shadow: 0 0 3px white inset, 0 1px 1px rgba(0, 0, 0, 0.1); + color: #444; + text-decoration: none; + white-space: nowrap; + line-height: 24px; } .chosen-container-single .chosen-default { - color: #999; + color: #999; } .chosen-container-single .chosen-single span { - display: block; - overflow: hidden; - margin-right: 26px; - text-overflow: ellipsis; - white-space: nowrap; + display: block; + overflow: hidden; + margin-right: 26px; + text-overflow: ellipsis; + white-space: nowrap; } .chosen-container-single .chosen-single-with-deselect span { - margin-right: 38px; + margin-right: 38px; } .chosen-container-single .chosen-single abbr { - position: absolute; - top: 6px; - right: 26px; - display: block; - width: 12px; - height: 12px; - background: url('chosen-sprite.png') -42px 1px no-repeat; - font-size: 1px; + position: absolute; + top: 6px; + right: 26px; + display: block; + width: 12px; + height: 12px; + background: url('chosen-sprite.png') -42px 1px no-repeat; + font-size: 1px; } .chosen-container-single .chosen-single abbr:hover { - background-position: -42px -10px; + background-position: -42px -10px; } .chosen-container-single.chosen-disabled .chosen-single abbr:hover { - background-position: -42px -10px; + background-position: -42px -10px; } .chosen-container-single .chosen-single div { - position: absolute; - top: 0; - right: 0; - display: block; - width: 18px; - height: 100%; + position: absolute; + top: 0; + right: 0; + display: block; + width: 18px; + height: 100%; } .chosen-container-single .chosen-single div b { - display: block; - width: 100%; - height: 100%; - background: url('chosen-sprite.png') no-repeat 0px 2px; + display: block; + width: 100%; + height: 100%; + background: url('chosen-sprite.png') no-repeat 0px 2px; } .chosen-container-single .chosen-search { - position: relative; - z-index: 1010; - margin: 0; - padding: 3px 4px; - white-space: nowrap; + position: relative; + z-index: 1010; + margin: 0; + padding: 3px 4px; + white-space: nowrap; } .chosen-container-single .chosen-search input[type="text"] { - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; - margin: 1px 0; - padding: 4px 20px 4px 5px; - width: 100%; - height: auto; - outline: 0; - border: 1px solid #aaa; - background: white url('chosen-sprite.png') no-repeat 100% -20px; - background: url('chosen-sprite.png') no-repeat 100% -20px, -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(1%, #eeeeee), color-stop(15%, #ffffff)); - background: url('chosen-sprite.png') no-repeat 100% -20px, -webkit-linear-gradient(#eeeeee 1%, #ffffff 15%); - background: url('chosen-sprite.png') no-repeat 100% -20px, -moz-linear-gradient(#eeeeee 1%, #ffffff 15%); - background: url('chosen-sprite.png') no-repeat 100% -20px, -o-linear-gradient(#eeeeee 1%, #ffffff 15%); - background: url('chosen-sprite.png') no-repeat 100% -20px, linear-gradient(#eeeeee 1%, #ffffff 15%); - font-size: 1em; - font-family: sans-serif; - line-height: normal; - border-radius: 0; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + margin: 1px 0; + padding: 4px 20px 4px 5px; + width: 100%; + height: auto; + outline: 0; + border: 1px solid #aaa; + background: white url('chosen-sprite.png') no-repeat 100% -20px; + background: url('chosen-sprite.png') no-repeat 100% -20px, -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(1%, #eeeeee), color-stop(15%, #ffffff)); + background: url('chosen-sprite.png') no-repeat 100% -20px, -webkit-linear-gradient(#eeeeee 1%, #ffffff 15%); + background: url('chosen-sprite.png') no-repeat 100% -20px, -moz-linear-gradient(#eeeeee 1%, #ffffff 15%); + background: url('chosen-sprite.png') no-repeat 100% -20px, -o-linear-gradient(#eeeeee 1%, #ffffff 15%); + background: url('chosen-sprite.png') no-repeat 100% -20px, linear-gradient(#eeeeee 1%, #ffffff 15%); + font-size: 1em; + font-family: sans-serif; + line-height: normal; + border-radius: 0; } .chosen-container-single .chosen-drop { - margin-top: -1px; - border-radius: 0 0 4px 4px; - background-clip: padding-box; + margin-top: -1px; + border-radius: 0 0 4px 4px; + background-clip: padding-box; } .chosen-container-single.chosen-container-single-nosearch .chosen-search { - position: absolute; - left: -9999px; + position: absolute; + left: -9999px; } /* @end */ /* @group Results */ .chosen-container .chosen-results { - position: relative; - overflow-x: hidden; - overflow-y: auto; - margin: 0 4px 4px 0; - padding: 0 0 0 4px; - max-height: 240px; - -webkit-overflow-scrolling: touch; + position: relative; + overflow-x: hidden; + overflow-y: auto; + margin: 0 4px 4px 0; + padding: 0 0 0 4px; + max-height: 240px; + -webkit-overflow-scrolling: touch; } .chosen-container .chosen-results li { - display: none; - margin: 0; - padding: 5px 6px; - list-style: none; - line-height: 15px; + display: none; + margin: 0; + padding: 5px 6px; + list-style: none; + line-height: 15px; } .chosen-container .chosen-results li.active-result { - display: list-item; - cursor: pointer; + display: list-item; + cursor: pointer; } .chosen-container .chosen-results li.disabled-result { - display: list-item; - color: #ccc; - cursor: default; + display: list-item; + color: #ccc; + cursor: default; } .chosen-container .chosen-results li.highlighted { - background-color: #3875d7; - background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(20%, #3875d7), color-stop(90%, #2a62bc)); - background-image: -webkit-linear-gradient(#3875d7 20%, #2a62bc 90%); - background-image: -moz-linear-gradient(#3875d7 20%, #2a62bc 90%); - background-image: -o-linear-gradient(#3875d7 20%, #2a62bc 90%); - background-image: linear-gradient(#3875d7 20%, #2a62bc 90%); - color: #fff; + background-color: #3875d7; + background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(20%, #3875d7), color-stop(90%, #2a62bc)); + background-image: -webkit-linear-gradient(#3875d7 20%, #2a62bc 90%); + background-image: -moz-linear-gradient(#3875d7 20%, #2a62bc 90%); + background-image: -o-linear-gradient(#3875d7 20%, #2a62bc 90%); + background-image: linear-gradient(#3875d7 20%, #2a62bc 90%); + color: #fff; } .chosen-container .chosen-results li.no-results { - display: list-item; - background: #f4f4f4; + display: list-item; + background: #f4f4f4; } .chosen-container .chosen-results li.group-result { - display: list-item; - font-weight: bold; - cursor: default; + display: list-item; + font-weight: bold; + cursor: default; } .chosen-container .chosen-results li.group-option { - padding-left: 15px; + padding-left: 15px; } .chosen-container .chosen-results li em { - font-style: normal; - text-decoration: underline; + font-style: normal; + text-decoration: underline; } /* @end */ /* @group Multi Chosen */ .chosen-container-multi .chosen-choices { - position: relative; - overflow: hidden; - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; - margin: 0; - padding: 0; - width: 100%; - height: auto !important; - height: 1%; - border: 1px solid #aaa; - background-color: #fff; - background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(1%, #eeeeee), color-stop(15%, #ffffff)); - background-image: -webkit-linear-gradient(#eeeeee 1%, #ffffff 15%); - background-image: -moz-linear-gradient(#eeeeee 1%, #ffffff 15%); - background-image: -o-linear-gradient(#eeeeee 1%, #ffffff 15%); - background-image: linear-gradient(#eeeeee 1%, #ffffff 15%); - cursor: text; + position: relative; + overflow: hidden; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + margin: 0; + padding: 0; + width: 100%; + height: auto !important; + height: 1%; + border: 1px solid #aaa; + background-color: #fff; + background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(1%, #eeeeee), color-stop(15%, #ffffff)); + background-image: -webkit-linear-gradient(#eeeeee 1%, #ffffff 15%); + background-image: -moz-linear-gradient(#eeeeee 1%, #ffffff 15%); + background-image: -o-linear-gradient(#eeeeee 1%, #ffffff 15%); + background-image: linear-gradient(#eeeeee 1%, #ffffff 15%); + cursor: text; } .chosen-container-multi .chosen-choices li { - float: left; - list-style: none; + float: left; + list-style: none; } .chosen-container-multi .chosen-choices li.search-field { - margin: 0; - padding: 0; - white-space: nowrap; + margin: 0; + padding: 0; + white-space: nowrap; } .chosen-container-multi .chosen-choices li.search-field input[type="text"] { - margin: 1px 0; - padding: 5px; - height: 15px; - outline: 0; - border: 0 !important; - background: transparent !important; - box-shadow: none; - color: #666; - font-size: 100%; - font-family: sans-serif; - line-height: normal; - border-radius: 0; + margin: 1px 0; + padding: 5px; + height: 15px; + outline: 0; + border: 0 !important; + background: transparent !important; + box-shadow: none; + color: #666; + font-size: 100%; + font-family: sans-serif; + line-height: normal; + border-radius: 0; } .chosen-container-multi .chosen-choices li.search-field .default { - color: #999; + color: #999; } .chosen-container-multi .chosen-choices li.search-choice { - position: relative; - margin: 3px 0 3px 5px; - padding: 3px 20px 3px 5px; - border: 1px solid #aaa; - border-radius: 3px; - background-color: #e4e4e4; - background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(20%, #f4f4f4), color-stop(50%, #f0f0f0), color-stop(52%, #e8e8e8), color-stop(100%, #eeeeee)); - background-image: -webkit-linear-gradient(#f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%); - background-image: -moz-linear-gradient(#f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%); - background-image: -o-linear-gradient(#f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%); - background-image: linear-gradient(#f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%); - background-clip: padding-box; - box-shadow: 0 0 2px white inset, 0 1px 0 rgba(0, 0, 0, 0.05); - color: #333; - line-height: 13px; - cursor: default; + position: relative; + margin: 3px 0 3px 5px; + padding: 3px 20px 3px 5px; + border: 1px solid #aaa; + border-radius: 3px; + background-color: #e4e4e4; + background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(20%, #f4f4f4), color-stop(50%, #f0f0f0), color-stop(52%, #e8e8e8), color-stop(100%, #eeeeee)); + background-image: -webkit-linear-gradient(#f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%); + background-image: -moz-linear-gradient(#f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%); + background-image: -o-linear-gradient(#f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%); + background-image: linear-gradient(#f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%); + background-clip: padding-box; + box-shadow: 0 0 2px white inset, 0 1px 0 rgba(0, 0, 0, 0.05); + color: #333; + line-height: 13px; + cursor: default; } .chosen-container-multi .chosen-choices li.search-choice .search-choice-close { - position: absolute; - top: 4px; - right: 3px; - display: block; - width: 12px; - height: 12px; - background: url('chosen-sprite.png') -42px 1px no-repeat; - font-size: 1px; + position: absolute; + top: 4px; + right: 3px; + display: block; + width: 12px; + height: 12px; + background: url('chosen-sprite.png') -42px 1px no-repeat; + font-size: 1px; } .chosen-container-multi .chosen-choices li.search-choice .search-choice-close:hover { - background-position: -42px -10px; + background-position: -42px -10px; } .chosen-container-multi .chosen-choices li.search-choice-disabled { - padding-right: 5px; - border: 1px solid #ccc; - background-color: #e4e4e4; - background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(20%, #f4f4f4), color-stop(50%, #f0f0f0), color-stop(52%, #e8e8e8), color-stop(100%, #eeeeee)); - background-image: -webkit-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%); - background-image: -moz-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%); - background-image: -o-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%); - background-image: linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%); - color: #666; + padding-right: 5px; + border: 1px solid #ccc; + background-color: #e4e4e4; + background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(20%, #f4f4f4), color-stop(50%, #f0f0f0), color-stop(52%, #e8e8e8), color-stop(100%, #eeeeee)); + background-image: -webkit-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%); + background-image: -moz-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%); + background-image: -o-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%); + background-image: linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%); + color: #666; } .chosen-container-multi .chosen-choices li.search-choice-focus { - background: #d4d4d4; + background: #d4d4d4; } .chosen-container-multi .chosen-choices li.search-choice-focus .search-choice-close { - background-position: -42px -10px; + background-position: -42px -10px; } .chosen-container-multi .chosen-results { - margin: 0; - padding: 0; + margin: 0; + padding: 0; } .chosen-container-multi .chosen-drop .result-selected { - display: list-item; - color: #ccc; - cursor: default; + display: list-item; + color: #ccc; + cursor: default; } /* @end */ /* @group Active */ .chosen-container-active .chosen-single { - border: 1px solid #5897fb; - box-shadow: 0 0 5px rgba(0, 0, 0, 0.3); + border: 1px solid #5897fb; + box-shadow: 0 0 5px rgba(0, 0, 0, 0.3); } .chosen-container-active.chosen-with-drop .chosen-single { - border: 1px solid #aaa; - -moz-border-radius-bottomright: 0; - border-bottom-right-radius: 0; - -moz-border-radius-bottomleft: 0; - border-bottom-left-radius: 0; - background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(20%, #eeeeee), color-stop(80%, #ffffff)); - background-image: -webkit-linear-gradient(#eeeeee 20%, #ffffff 80%); - background-image: -moz-linear-gradient(#eeeeee 20%, #ffffff 80%); - background-image: -o-linear-gradient(#eeeeee 20%, #ffffff 80%); - background-image: linear-gradient(#eeeeee 20%, #ffffff 80%); - box-shadow: 0 1px 0 #fff inset; + border: 1px solid #aaa; + -moz-border-radius-bottomright: 0; + border-bottom-right-radius: 0; + -moz-border-radius-bottomleft: 0; + border-bottom-left-radius: 0; + background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(20%, #eeeeee), color-stop(80%, #ffffff)); + background-image: -webkit-linear-gradient(#eeeeee 20%, #ffffff 80%); + background-image: -moz-linear-gradient(#eeeeee 20%, #ffffff 80%); + background-image: -o-linear-gradient(#eeeeee 20%, #ffffff 80%); + background-image: linear-gradient(#eeeeee 20%, #ffffff 80%); + box-shadow: 0 1px 0 #fff inset; } .chosen-container-active.chosen-with-drop .chosen-single div { - border-left: none; - background: transparent; + border-left: none; + background: transparent; } .chosen-container-active.chosen-with-drop .chosen-single div b { - background-position: -18px 2px; + background-position: -18px 2px; } .chosen-container-active .chosen-choices { - border: 1px solid #5897fb; - box-shadow: 0 0 5px rgba(0, 0, 0, 0.3); + border: 1px solid #5897fb; + box-shadow: 0 0 5px rgba(0, 0, 0, 0.3); } .chosen-container-active .chosen-choices li.search-field input[type="text"] { - color: #111 !important; + color: #111 !important; } /* @end */ /* @group Disabled Support */ .chosen-disabled { - opacity: 0.5 !important; - cursor: default; + opacity: 0.5 !important; + cursor: default; } .chosen-disabled .chosen-single { - cursor: default; + cursor: default; } .chosen-disabled .chosen-choices .search-choice .search-choice-close { - cursor: default; + cursor: default; } /* @end */ /* @group Right to Left */ .chosen-rtl { - text-align: right; + text-align: right; } .chosen-rtl .chosen-single { - overflow: visible; - padding: 0 8px 0 0; + overflow: visible; + padding: 0 8px 0 0; } .chosen-rtl .chosen-single span { - margin-right: 0; - margin-left: 26px; - direction: rtl; + margin-right: 0; + margin-left: 26px; + direction: rtl; } .chosen-rtl .chosen-single-with-deselect span { - margin-left: 38px; + margin-left: 38px; } .chosen-rtl .chosen-single div { - right: auto; - left: 3px; + right: auto; + left: 3px; } .chosen-rtl .chosen-single abbr { - right: auto; - left: 26px; + right: auto; + left: 26px; } .chosen-rtl .chosen-choices li { - float: right; + float: right; } .chosen-rtl .chosen-choices li.search-field input[type="text"] { - direction: rtl; + direction: rtl; } .chosen-rtl .chosen-choices li.search-choice { - margin: 3px 5px 3px 0; - padding: 3px 5px 3px 19px; + margin: 3px 5px 3px 0; + padding: 3px 5px 3px 19px; } .chosen-rtl .chosen-choices li.search-choice .search-choice-close { - right: auto; - left: 4px; + right: auto; + left: 4px; } .chosen-rtl.chosen-container-single-nosearch .chosen-search, .chosen-rtl .chosen-drop { - left: 9999px; + left: 9999px; } .chosen-rtl.chosen-container-single .chosen-results { - margin: 0 0 4px 4px; - padding: 0 4px 0 0; + margin: 0 0 4px 4px; + padding: 0 4px 0 0; } .chosen-rtl .chosen-results li.group-option { - padding-right: 15px; - padding-left: 0; + padding-right: 15px; + padding-left: 0; } .chosen-rtl.chosen-container-active.chosen-with-drop .chosen-single div { - border-right: none; + border-right: none; } .chosen-rtl .chosen-search input[type="text"] { - padding: 4px 5px 4px 20px; - background: white url('chosen-sprite.png') no-repeat -30px -20px; - background: url('chosen-sprite.png') no-repeat -30px -20px, -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(1%, #eeeeee), color-stop(15%, #ffffff)); - background: url('chosen-sprite.png') no-repeat -30px -20px, -webkit-linear-gradient(#eeeeee 1%, #ffffff 15%); - background: url('chosen-sprite.png') no-repeat -30px -20px, -moz-linear-gradient(#eeeeee 1%, #ffffff 15%); - background: url('chosen-sprite.png') no-repeat -30px -20px, -o-linear-gradient(#eeeeee 1%, #ffffff 15%); - background: url('chosen-sprite.png') no-repeat -30px -20px, linear-gradient(#eeeeee 1%, #ffffff 15%); - direction: rtl; + padding: 4px 5px 4px 20px; + background: white url('chosen-sprite.png') no-repeat -30px -20px; + background: url('chosen-sprite.png') no-repeat -30px -20px, -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(1%, #eeeeee), color-stop(15%, #ffffff)); + background: url('chosen-sprite.png') no-repeat -30px -20px, -webkit-linear-gradient(#eeeeee 1%, #ffffff 15%); + background: url('chosen-sprite.png') no-repeat -30px -20px, -moz-linear-gradient(#eeeeee 1%, #ffffff 15%); + background: url('chosen-sprite.png') no-repeat -30px -20px, -o-linear-gradient(#eeeeee 1%, #ffffff 15%); + background: url('chosen-sprite.png') no-repeat -30px -20px, linear-gradient(#eeeeee 1%, #ffffff 15%); + direction: rtl; } .chosen-rtl.chosen-container-single .chosen-single div b { - background-position: 6px 2px; + background-position: 6px 2px; } .chosen-rtl.chosen-container-single.chosen-with-drop .chosen-single div b { - background-position: -12px 2px; + background-position: -12px 2px; } /* @end */ /* @group Retina compatibility */ @media only screen and (-webkit-min-device-pixel-ratio: 2), only screen and (min-resolution: 144dpi) { - .chosen-rtl .chosen-search input[type="text"], - .chosen-container-single .chosen-single abbr, - .chosen-container-single .chosen-single div b, - .chosen-container-single .chosen-search input[type="text"], - .chosen-container-multi .chosen-choices .search-choice .search-choice-close, - .chosen-container .chosen-results-scroll-down span, - .chosen-container .chosen-results-scroll-up span { - background-image: url('chosen-sprite@2x.png') !important; - background-size: 52px 37px !important; - background-repeat: no-repeat !important; - } + .chosen-rtl .chosen-search input[type="text"], + .chosen-container-single .chosen-single abbr, + .chosen-container-single .chosen-single div b, + .chosen-container-single .chosen-search input[type="text"], + .chosen-container-multi .chosen-choices .search-choice .search-choice-close, + .chosen-container .chosen-results-scroll-down span, + .chosen-container .chosen-results-scroll-up span { + background-image: url('chosen-sprite@2x.png') !important; + background-size: 52px 37px !important; + background-repeat: no-repeat !important; + } } /* @end */ diff --git a/interface/web/themes/default/assets/stylesheets/fonts.css b/interface/web/themes/default/assets/stylesheets/fonts.css index 4218564963..35c817da33 100644 --- a/interface/web/themes/default/assets/stylesheets/fonts.css +++ b/interface/web/themes/default/assets/stylesheets/fonts.css @@ -91,4 +91,4 @@ } .icon-delete:before { content: "\e613"; -} \ No newline at end of file +} diff --git a/interface/web/themes/default/assets/stylesheets/ispconfig.css b/interface/web/themes/default/assets/stylesheets/ispconfig.css index 03beca1836..32d063936c 100644 --- a/interface/web/themes/default/assets/stylesheets/ispconfig.css +++ b/interface/web/themes/default/assets/stylesheets/ispconfig.css @@ -1,840 +1,840 @@ body { - overflow-y: scroll; - overflow-x: hidden; } + overflow-y: scroll; +overflow-x: hidden; } .left { - float: left; } +float: left; } .right { - float: right; } +float: right; } .clear:after { - content: ""; - display: table; - clear: both; } + content: ""; + display: table; +clear: both; } .marginTop15 { - margin-top: 15px; } +margin-top: 15px; } .paddingX5 { - padding-left: 5px !important; - padding-right: 5px !important; } + padding-left: 5px !important; +padding-right: 5px !important; } .width65 { - width: 65px; } +width: 65px; } .form-group input[type='checkbox'] { - margin-top: 10px; } +margin-top: 10px; } .form-group .checkbox-inline input[type='checkbox'] { - margin-top: 4px; } +margin-top: 4px; } .control-label { - font-weight: normal; } - .control-label:after { - content: ":"; } +font-weight: normal; } +.control-label:after { +content: ":"; } .control-label-plain:after { - content: ""; } +content: ""; } .inlineLabel { - font-weight: 400; + font-weight: 400; } .formbutton-default { - padding: 6px 10px; - border-bottom-style: solid; - border-bottom-width: 2px; - font-size: 12px; - font-weight: bold; - transition: all ease 500ms; } + padding: 6px 10px; + border-bottom-style: solid; + border-bottom-width: 2px; + font-size: 12px; + font-weight: bold; +transition: all ease 500ms; } .formbutton-success, .formbutton-danger { - padding: 6px 30px; - border-style: solid; - border-width: 1px; - border-bottom-width: solid; - font-size: 12px; - font-weight: bold; - transition: all ease 500ms; } + padding: 6px 30px; + border-style: solid; + border-width: 1px; + border-bottom-width: solid; + font-size: 12px; + font-weight: bold; +transition: all ease 500ms; } .formbutton-narrow { - padding: 6px 8px; - margin-left: 2px; - margin-right: 2px; } + padding: 6px 8px; + margin-left: 2px; +margin-right: 2px; } .formbutton-narrower { - padding: 4px 6px; } +padding: 4px 6px; } #main-wrapper { - margin: 0 auto; - width: 95%; - max-width: 1260px; } + margin: 0 auto; + width: 95%; +max-width: 1260px; } #logo { - float: left; - width: 200px; - height: 65px; - margin-top:10px; - /*background: url("../images/logo.png") no-repeat;*/ } - #logo a { - display: block; - width: 100%; - height: 100%; } - -#headerbar { - float: right; - } - -#searchform { - float: right; - margin-top: 16px; } - #searchform > div { - position: relative; - display: table; } - #searchform > div > div { - display: table-cell; - padding-right: 8px; - vertical-align: top; } - #searchform .icon { - padding: 0 2px; - font-size: 16px; } - -#logout-button { - float: right; - margin-top: 16px; - margin-left: 25px; - border-bottom-style: solid; - border-bottom-width: 2px; - transition: all ease 500ms; } - -#main-navigation { - margin-top: 24px; } - #main-navigation a { - padding: 0 12px; - height: 70px; - border-bottom-style: solid; - border-bottom-width: 1px; - transition: all ease 500ms; } - #main-navigation .icon { - font-size: 32px; } - #main-navigation .title { - margin-top: 2px; - font-weight: bold; } - -.btn-group-justified .btn { - border-right-width: 0; } - .btn-group-justified .btn:last-of-type { - border-right-width: 1px; } - -.dns-record-btn { - margin-top: 3px; -} + float: left; + width: 200px; + height: 65px; + margin-top:10px; +/*background: url("../images/logo.png") no-repeat;*/ } + #logo a { + display: block; + width: 100%; + height: 100%; } + + #headerbar { + float: right; + } -#content { - width: 78%; } - -#passBar, #passText { - display: inline-block; - vertical-align: middle; } - -#passBar { - height: 11px; - padding: 0; } - -#passBar > div { - height: 100%; - padding: 0; } - -#sidebar { - margin-top: 27px; - min-width: 18%; - max-width: 21%; - width: auto; - border-style: solid; - border-width: 1px; - border-radius: 4px; } - #sidebar header { - margin: 1px; - padding: 0 10px; - min-height: 40px; - line-height: 40px; - font-weight: bold; - border-top-left-radius: 2px; - border-top-right-radius: 2px; } - #sidebar ul { - margin: 0; - padding: 0; - list-style: none; } - #sidebar li { - border-top-style: solid; - border-top-width: 1px; - font-size: 12px; } - #sidebar a { - display: block; - padding: 10px; - text-decoration: none; - transition: color ease 500ms; } - #sidebar header a { - padding: 0; } - -#select_server a { - padding:0 10px; } - -.page-header { - margin: 20px 0; - padding: 0; } - -.alert-notification a { - font-weight: bold; - text-decoration: none; - transition: color ease 500ms; } - -.alert-label, .alert-content { - display: inline-block; - vertical-align: top; } - -.alert-label { - width: 60px; } - -.modules { - margin: 0; - padding: 0; - list-style: none; } - .modules li { - float: left; - margin-right: 15px; - margin-bottom: 15px; - padding: 8px; - width: 200px; - border-radius: 4px; - border-style: solid; - border-width: 1px; } - .modules .icon { - float: left; - margin-right: 15px; - font-size: 50px; } - .modules .left { - margin-top: 5px; } - .modules .title { - margin-top: 6px; - margin-left: 20px; - font-size: 16px; - font-weight: bold; } - .modules .button { - margin-top: 10px; - width: 100%; - border-bottom-style: solid; - border-bottom-width: 2px; - font-size: 12px; - font-weight: bold; - transition: all ease 500ms; } - .modules a { - text-decoration: none; } - -.table-wrapper { - margin-bottom: 20px; - border-radius: 4px; - border-style: solid; - border-width: 1px; } - -.table { - table-layout: fixed; - margin-bottom: 1px; - } -.table caption { - padding: 5px 10px; - text-align: left; - font-weight: bold; - font-size: 18px; - border-bottom-style: solid; - border-bottom-width: 1px; + #searchform { + float: right; + margin-top: 16px; } + #searchform > div { + position: relative; + display: table; } + #searchform > div > div { + display: table-cell; + padding-right: 8px; + vertical-align: top; } + #searchform .icon { + padding: 0 2px; + font-size: 16px; } + + #logout-button { + float: right; + margin-top: 16px; + margin-left: 25px; + border-bottom-style: solid; + border-bottom-width: 2px; + transition: all ease 500ms; } + + #main-navigation { + margin-top: 24px; } + #main-navigation a { + padding: 0 12px; + height: 70px; + border-bottom-style: solid; + border-bottom-width: 1px; + transition: all ease 500ms; } + #main-navigation .icon { + font-size: 32px; } + #main-navigation .title { + margin-top: 2px; + font-weight: bold; } + + .btn-group-justified .btn { + border-right-width: 0; } + .btn-group-justified .btn:last-of-type { + border-right-width: 1px; } + + .dns-record-btn { + margin-top: 3px; + } + + #content { + width: 78%; } + + #passBar, #passText { + display: inline-block; + vertical-align: middle; } + + #passBar { + height: 11px; + padding: 0; } + + #passBar > div { + height: 100%; + padding: 0; } + + #sidebar { + margin-top: 27px; + min-width: 18%; + max-width: 21%; + width: auto; + border-style: solid; + border-width: 1px; + border-radius: 4px; } + #sidebar header { + margin: 1px; + padding: 0 10px; + min-height: 40px; + line-height: 40px; + font-weight: bold; + border-top-left-radius: 2px; + border-top-right-radius: 2px; } + #sidebar ul { + margin: 0; + padding: 0; + list-style: none; } + #sidebar li { + border-top-style: solid; + border-top-width: 1px; + font-size: 12px; } + #sidebar a { + display: block; + padding: 10px; + text-decoration: none; + transition: color ease 500ms; } + #sidebar header a { + padding: 0; } + + #select_server a { + padding:0 10px; } + + .page-header { + margin: 20px 0; + padding: 0; } + + .alert-notification a { + font-weight: bold; + text-decoration: none; + transition: color ease 500ms; } + + .alert-label, .alert-content { + display: inline-block; + vertical-align: top; } + + .alert-label { + width: 60px; } + + .modules { + margin: 0; + padding: 0; + list-style: none; } + .modules li { + float: left; + margin-right: 15px; + margin-bottom: 15px; + padding: 8px; + width: 200px; + border-radius: 4px; + border-style: solid; + border-width: 1px; } + .modules .icon { + float: left; + margin-right: 15px; + font-size: 50px; } + .modules .left { + margin-top: 5px; } + .modules .title { + margin-top: 6px; + margin-left: 20px; + font-size: 16px; + font-weight: bold; } + .modules .button { + margin-top: 10px; + width: 100%; + border-bottom-style: solid; + border-bottom-width: 2px; + font-size: 12px; + font-weight: bold; + transition: all ease 500ms; } + .modules a { + text-decoration: none; } + + .table-wrapper { + margin-bottom: 20px; + border-radius: 4px; + border-style: solid; + border-width: 1px; } + + .table { + table-layout: fixed; + margin-bottom: 1px; } -.table tbody tr { - border-top-style: solid; - border-top-width: 1px; - transition: background ease 500ms; + .table caption { + padding: 5px 10px; + text-align: left; + font-weight: bold; + font-size: 18px; + border-bottom-style: solid; + border-bottom-width: 1px; } -.table tbody tr:last-child { - border-radius: 4px; + .table tbody tr { + border-top-style: solid; + border-top-width: 1px; + transition: background ease 500ms; } -.table tbody tr td { - text-overflow: ellipsis; - overflow-x: hidden; + .table tbody tr:last-child { + border-radius: 4px; + } + .table tbody tr td { + text-overflow: ellipsis; + overflow-x: hidden; } -.table-auto { - table-layout: auto; -} + .table-auto { + table-layout: auto; + } -.tfooter { - margin-top: -1px; - height: 40px; - border-top-style: solid; - border-top-width: 1px; } - -.pagination { - margin: 10px 0; } - -.progress { - display: inline-block; - margin-bottom: 0; - width: 100%; - height: 20px; - background-color: #ababab; - font-weight: bold; - position: relative; -} + .tfooter { + margin-top: -1px; + height: 40px; + border-top-style: solid; + border-top-width: 1px; } + + .pagination { + margin: 10px 0; } + + .progress { + display: inline-block; + margin-bottom: 0; + width: 100%; + height: 20px; + background-color: #ababab; + font-weight: bold; + position: relative; + } -.progress-bar-danger, .progress-bar-warning, .progress-bar-success { - text-align: center; - color: white; - height: 100%; -} + .progress-bar-danger, .progress-bar-warning, .progress-bar-success { + text-align: center; + color: white; + height: 100%; + } -.progress span { - position: absolute; - left: 0; - width: 100%; - text-align: center; - z-index: 2; - color: white; -} + .progress span { + position: absolute; + left: 0; + width: 100%; + text-align: center; + z-index: 2; + color: white; + } -p.fieldset-legend { - display: none; } - -.content-tab-wrapper { - border-style: solid; - border-width: 1px; - border-radius: 4px; } - .content-tab-wrapper .nav-tabs > li > a { - border-radius: 0; - border: none !important; - border-right-style: solid !important; - border-right-width: 1px !important; - outline: none; - font-weight: bold; - transition: background ease 500ms; } - .content-tab-wrapper .nav-tabs li:not(:first-child) a { - margin-left: -2px; } - -.tab-content { - padding: 25px 10px; } - -.input-group-btn .icon-calendar { - font-size: 18px; } - -thead.dark th { - height: 40px; - line-height: 40px; - font-weight: normal; } - -thead.dark th.small-col { - width: 14%; } - -thead.dark th.tiny-col { - width: 8%; - overflow: hidden; - text-overflow: ellipsis; } - -thead.dark th[data-column] { - cursor: pointer; - position: relative; -} + p.fieldset-legend { + display: none; } + + .content-tab-wrapper { + border-style: solid; + border-width: 1px; + border-radius: 4px; } + .content-tab-wrapper .nav-tabs > li > a { + border-radius: 0; + border: none !important; + border-right-style: solid !important; + border-right-width: 1px !important; + outline: none; + font-weight: bold; + transition: background ease 500ms; } + .content-tab-wrapper .nav-tabs li:not(:first-child) a { + margin-left: -2px; } + + .tab-content { + padding: 25px 10px; } + + .input-group-btn .icon-calendar { + font-size: 18px; } + + thead.dark th { + height: 40px; + line-height: 40px; + font-weight: normal; } + + thead.dark th.small-col { + width: 14%; } + + thead.dark th.tiny-col { + width: 8%; + overflow: hidden; + text-overflow: ellipsis; } + + thead.dark th[data-column] { + cursor: pointer; + position: relative; + } -thead.dark th[data-column]:before { - content: "⇅"; - position: absolute; - right: 15px; - vertical-align: middle; - line-height: inherit; - color: #aaa; -} + thead.dark th[data-column]:before { + content: "⇅"; + position: absolute; + right: 15px; + vertical-align: middle; + line-height: inherit; + color: #aaa; + } -thead.dark th[data-column][data-ordered] { - background: linear-gradient(to top, #57646d, #3e474e); -} + thead.dark th[data-column][data-ordered] { + background: linear-gradient(to top, #57646d, #3e474e); + } -thead.dark th[data-column][data-ordered]:before { - color: #fff; - content: "🡫"; -} + thead.dark th[data-column][data-ordered]:before { + color: #fff; + content: "🡫"; + } -thead.dark th[data-column][data-ordered="desc"]:before { - content: "🡩"; -} + thead.dark th[data-column][data-ordered="desc"]:before { + content: "🡩"; + } -thead.dark td input, -thead.dark td select { - width: 100%; } - -#footer { - margin: 20px 0; - padding-top: 20px; - border-top-style: solid; - border-top-width: 1px; - text-align: center; - font-size: 10px; } - -.menu-btn { - display: none; - cursor: pointer; } - -.df-container, -.gs-container { - position: relative; } - -.gs-container:after { - content: ""; - display: table; - clear: both; } - -ul.df-resultbox, -ul.gs-resultbox { - display: block; - position: absolute; - left: 0; - top: 100%; - margin: 0; - padding: 0 0 10px; - min-width: 250px; - max-width: 500px; - z-index: 999999; - background: #fff; - list-style: none; - box-shadow: 2px 2px 5px #c5c5c5; + thead.dark td input, + thead.dark td select { + width: 100%; } + + #footer { + margin: 20px 0; + padding-top: 20px; + border-top-style: solid; + border-top-width: 1px; + text-align: center; + font-size: 10px; } + + .menu-btn { + display: none; + cursor: pointer; } + + .df-container, + .gs-container { + position: relative; } + + .gs-container:after { + content: ""; + display: table; + clear: both; } + + ul.df-resultbox, + ul.gs-resultbox { + display: block; + position: absolute; + left: 0; + top: 100%; + margin: 0; + padding: 0 0 10px; + min-width: 250px; + max-width: 500px; + z-index: 999999; + background: #fff; + list-style: none; + box-shadow: 2px 2px 5px #c5c5c5; border-radius: 5px; } -ul.df-resultbox li, -ul.gs-resultbox li { - float: none; - display: block; - cursor: pointer; - padding: 0 10px; } + ul.df-resultbox li, + ul.gs-resultbox li { + float: none; + display: block; + cursor: pointer; + padding: 0 10px; } -ul.gs-resultbox li { - padding: 3px 10px; - line-height: 1.1; - font-size: 0.9em; } + ul.gs-resultbox li { + padding: 3px 10px; + line-height: 1.1; + font-size: 0.9em; } -ul.df-resultbox li:nth-child(even), -ul.gs-resultbox li:nth-child(even) { + ul.df-resultbox li:nth-child(even), + ul.gs-resultbox li:nth-child(even) { background: #f2f5f7; } -ul.df-resultbox li.df-cheader, -ul.gs-resultbox li.gs-cheader { - background: #fff; - padding-top: 10px; - margin-bottom: 10px; - } - -ul.df-resultbox li p, -ul.gs-resultbox li p { - margin-bottom: 0; - color: inherit; } - -ul.df-resultbox li.df-cheader p.df-cheader-title, -ul.gs-resultbox li.gs-cheader p.gs-cheader-title { - font-weight: bold; - margin-bottom: 0; } - -ul.df-resultbox li.df-cheader p.df-cheader-limit, -ul.gs-resultbox li.gs-cheader p.gs-cheader-limit { - font-weight: normal; } - -ul.df-resultbox li.df-cdata img, -ul.gs-resultbox li.gs-cdata img { - margin-right: 12px; } - -ul.df-resultbox li.df-cdata p span.df-cdata-title, -ul.gs-resultbox li.gs-cdata p span.gs-cdata-title { - font-weight: bold; } - -ul.gs-resultbox li.gs-cdata p span.gs-cdata-title { - display: block; } - -ul.df-resultbox li:first-child, -ul.gs-resultbox li:first-child { - border-top-left-radius: 5px; - border-top-right-radius: 5px; } - -ul.df-resultbox li:last-child, -ul.gs-resultbox li:last-child { - border-bottom-left-radius: 5px; - border-bottom-right-radius: 5px; } - -span.flags { - background-image: url("../images/flags_sprite.png"); - background-repeat: no-repeat; - min-height: 20px; - padding-left: 27px; - vertical-align: middle; -} -span.flag-el {background-position:0 -1475px} -span.flag-ad {background-position:0 -1px} -span.flag-ae {background-position:0 -23px} -span.flag-af {background-position:0 -45px} -span.flag-ag {background-position:0 -67px} -span.flag-ai {background-position:0 -89px} -span.flag-al {background-position:0 -111px} -span.flag-am {background-position:0 -133px} -span.flag-an {background-position:0 -155px} -span.flag-ao {background-position:0 -177px} -span.flag-aq {background-position:0 -199px} -span.flag-ar {background-position:0 -221px} -span.flag-as {background-position:0 -243px} -span.flag-at {background-position:0 -265px} -span.flag-au {background-position:0 -287px} -span.flag-aw {background-position:0 -309px} -span.flag-ax {background-position:0 -331px} -span.flag-az {background-position:0 -353px} -span.flag-ba {background-position:0 -375px} -span.flag-bb {background-position:0 -397px} -span.flag-bd {background-position:0 -419px} -span.flag-be {background-position:0 -441px} -span.flag-bf {background-position:0 -463px} -span.flag-bg {background-position:0 -485px} -span.flag-bh {background-position:0 -507px} -span.flag-bi {background-position:0 -529px} -span.flag-bj {background-position:0 -551px} -span.flag-bm {background-position:0 -573px} -span.flag-bn {background-position:0 -595px} -span.flag-bo {background-position:0 -617px} -span.flag-br {background-position:0 -639px} -span.flag-bs {background-position:0 -661px} -span.flag-bt {background-position:0 -683px} -span.flag-bv {background-position:0 -705px} -span.flag-bw {background-position:0 -727px} -span.flag-by {background-position:0 -749px} -span.flag-bz {background-position:0 -771px} -span.flag-ca {background-position:0 -793px} -span.flag-cc {background-position:0 -837px} -span.flag-cd {background-position:0 -859px} -span.flag-cf {background-position:0 -881px} -span.flag-cg {background-position:0 -903px} -span.flag-ch {background-position:0 -925px} -span.flag-ci {background-position:0 -947px} -span.flag-ck {background-position:0 -969px} -span.flag-cl {background-position:0 -991px} -span.flag-cm {background-position:0 -1013px} -span.flag-cn {background-position:0 -1035px} -span.flag-co {background-position:0 -1057px} -span.flag-cr {background-position:0 -1079px} -span.flag-cs {background-position:0 -1101px} -span.flag-cu {background-position:0 -1123px} -span.flag-cv {background-position:0 -1145px} -span.flag-cx {background-position:0 -1167px} -span.flag-cy {background-position:0 -1189px} -span.flag-cz {background-position:0 -1211px} -span.flag-de {background-position:0 -1233px} -span.flag-dj {background-position:0 -1255px} -span.flag-dk {background-position:0 -1277px} -span.flag-dm {background-position:0 -1299px} -span.flag-do {background-position:0 -1321px} -span.flag-dz {background-position:0 -1343px} -span.flag-ec {background-position:0 -1365px} -span.flag-ee {background-position:0 -1387px} -span.flag-eg {background-position:0 -1409px} -span.flag-eh {background-position:0 -1431px} -/*span.flag-en {background-position:0 -1453px}*/ -span.flag-er {background-position:0 -1475px} -span.flag-es {background-position:0 -1497px} -span.flag-et {background-position:0 -1519px} -span.flag-fi {background-position:0 -1585px} -span.flag-fj {background-position:0 -1607px} -span.flag-fk {background-position:0 -1629px} -span.flag-fm {background-position:0 -1651px} -span.flag-fo {background-position:0 -1673px} -span.flag-fr {background-position:0 -1695px} -span.flag-ga {background-position:0 -1717px} -span.flag-gb, span.flag-en {background-position:0 -1739px} -span.flag-gd {background-position:0 -1761px} -span.flag-ge {background-position:0 -1783px} -span.flag-gf {background-position:0 -1805px} -span.flag-gh {background-position:0 -1827px} -span.flag-gi {background-position:0 -1849px} -span.flag-gl {background-position:0 -1871px} -span.flag-gm {background-position:0 -1893px} -span.flag-gn {background-position:0 -1915px} -span.flag-gp {background-position:0 -1937px} -span.flag-gq {background-position:0 -1959px} -span.flag-gr {background-position:0 -1981px} -span.flag-gs {background-position:0 -2003px} -span.flag-gt {background-position:0 -2025px} -span.flag-gu {background-position:0 -2047px} -span.flag-gw {background-position:0 -2069px} -span.flag-gy {background-position:0 -2091px} -span.flag-hk {background-position:0 -2113px} -span.flag-hm {background-position:0 -2135px} -span.flag-hn {background-position:0 -2157px} -span.flag-hr {background-position:0 -2179px} -span.flag-ht {background-position:0 -2201px} -span.flag-hu {background-position:0 -2223px} -span.flag-id {background-position:0 -2245px} -span.flag-ie {background-position:0 -2267px} -span.flag-il {background-position:0 -2289px} -span.flag-in {background-position:0 -2311px} -span.flag-io {background-position:0 -2333px} -span.flag-iq {background-position:0 -2355px} -span.flag-ir {background-position:0 -2377px} -span.flag-is {background-position:0 -2399px} -span.flag-it {background-position:0 -2421px} -span.flag-jm {background-position:0 -2443px} -span.flag-jo {background-position:0 -2465px} -span.flag-jp {background-position:0 -2487px} -span.flag-ke {background-position:0 -2509px} -span.flag-kg {background-position:0 -2531px} -span.flag-kh {background-position:0 -2553px} -span.flag-ki {background-position:0 -2575px} -span.flag-km {background-position:0 -2597px} -span.flag-kn {background-position:0 -2619px} -span.flag-kp {background-position:0 -2641px} -span.flag-kr {background-position:0 -2663px} -span.flag-kw {background-position:0 -2685px} -span.flag-ky {background-position:0 -2707px} -span.flag-kz {background-position:0 -2729px} -span.flag-la {background-position:0 -2751px} -span.flag-lb {background-position:0 -2773px} -span.flag-lc {background-position:0 -2795px} -span.flag-li {background-position:0 -2817px} -span.flag-lk {background-position:0 -2839px} -span.flag-lr {background-position:0 -2861px} -span.flag-ls {background-position:0 -2883px} -span.flag-lt {background-position:0 -2905px} -span.flag-lu {background-position:0 -2927px} -span.flag-lv {background-position:0 -2949px} -span.flag-ly {background-position:0 -2971px} -span.flag-ma {background-position:0 -2993px} -span.flag-mc {background-position:0 -3015px} -span.flag-md {background-position:0 -3037px} -span.flag-me {background-position:0 -3059px} -span.flag-mg {background-position:0 -3081px} -span.flag-mh {background-position:0 -3103px} -span.flag-mk {background-position:0 -3125px} -span.flag-ml {background-position:0 -3147px} -span.flag-mm {background-position:0 -3169px} -span.flag-mn {background-position:0 -3191px} -span.flag-mo {background-position:0 -3213px} -span.flag-mp {background-position:0 -3235px} -span.flag-mq {background-position:0 -3257px} -span.flag-mr {background-position:0 -3279px} -span.flag-ms {background-position:0 -3301px} -span.flag-mt {background-position:0 -3323px} -span.flag-mu {background-position:0 -3345px} -span.flag-mv {background-position:0 -3367px} -span.flag-mw {background-position:0 -3389px} -span.flag-mx {background-position:0 -3411px} -span.flag-my {background-position:0 -3433px} -span.flag-mz {background-position:0 -3455px} -span.flag-na {background-position:0 -3477px} -span.flag-nc {background-position:0 -3499px} -span.flag-ne {background-position:0 -3521px} -span.flag-nf {background-position:0 -3543px} -span.flag-ng {background-position:0 -3565px} -span.flag-ni {background-position:0 -3587px} -span.flag-nl {background-position:0 -3609px} -span.flag-no {background-position:0 -3631px} -span.flag-np {background-position:0 -3653px} -span.flag-nr {background-position:0 -3675px} -span.flag-nu {background-position:0 -3697px} -span.flag-nz {background-position:0 -3719px} -span.flag-om {background-position:0 -3741px} -span.flag-pa {background-position:0 -3763px} -span.flag-pe {background-position:0 -3785px} -span.flag-pf {background-position:0 -3807px} -span.flag-pg {background-position:0 -3829px} -span.flag-ph {background-position:0 -3851px} -span.flag-pk {background-position:0 -3873px} -span.flag-pl {background-position:0 -3895px} -span.flag-pm {background-position:0 -3917px} -span.flag-pn {background-position:0 -3939px} -span.flag-pr {background-position:0 -3961px} -span.flag-ps {background-position:0 -3983px} -span.flag-pt {background-position:0 -4005px} -span.flag-pw {background-position:0 -4027px} -span.flag-py {background-position:0 -4049px} -span.flag-qa {background-position:0 -4071px} -span.flag-re {background-position:0 -4093px} -span.flag-ro {background-position:0 -4115px} -span.flag-rs {background-position:0 -4137px} -span.flag-ru {background-position:0 -4159px} -span.flag-rw {background-position:0 -4181px} -span.flag-sa {background-position:0 -4203px} -span.flag-sb {background-position:0 -4225px} -span.flag-sc {background-position:0 -4247px} -span.flag-sd {background-position:0 -4291px} -span.flag-se {background-position:0 -4313px} -span.flag-sg {background-position:0 -4335px} -span.flag-sh {background-position:0 -4357px} -span.flag-si {background-position:0 -4379px} -span.flag-sj {background-position:0 -4401px} -span.flag-sk {background-position:0 -4423px} -span.flag-sl {background-position:0 -4445px} -span.flag-sm {background-position:0 -4467px} -span.flag-sn {background-position:0 -4489px} -span.flag-so {background-position:0 -4511px} -span.flag-sr {background-position:0 -4533px} -span.flag-st {background-position:0 -4555px} -span.flag-sv {background-position:0 -4577px} -span.flag-sy {background-position:0 -4599px} -span.flag-sz {background-position:0 -4621px} -span.flag-tc {background-position:0 -4643px} -span.flag-td {background-position:0 -4665px} -span.flag-tf {background-position:0 -4687px} -span.flag-tg {background-position:0 -4709px} -span.flag-th {background-position:0 -4731px} -span.flag-tj {background-position:0 -4753px} -span.flag-tk {background-position:0 -4775px} -span.flag-tl {background-position:0 -4797px} -span.flag-tm {background-position:0 -4819px} -span.flag-tn {background-position:0 -4841px} -span.flag-to {background-position:0 -4863px} -span.flag-tr {background-position:0 -4885px} -span.flag-tt {background-position:0 -4907px} -span.flag-tv {background-position:0 -4929px} -span.flag-tw {background-position:0 -4951px} -span.flag-tz {background-position:0 -4973px} -span.flag-ua {background-position:0 -4995px} -span.flag-ug {background-position:0 -5017px} -span.flag-um {background-position:0 -5039px} -span.flag-us {background-position:0 -5061px} -span.flag-uy {background-position:0 -5083px} -span.flag-uz {background-position:0 -5105px} -span.flag-va {background-position:0 -5127px} -span.flag-vc {background-position:0 -5149px} -span.flag-ve {background-position:0 -5171px} -span.flag-vg {background-position:0 -5193px} -span.flag-vi {background-position:0 -5215px} -span.flag-vn {background-position:0 -5237px} -span.flag-vu {background-position:0 -5259px} -span.flag-wf {background-position:0 -5303px} -span.flag-ws {background-position:0 -5325px} -span.flag-ye {background-position:0 -5347px} -span.flag-yt {background-position:0 -5369px} -span.flag-za {background-position:0 -5391px} -span.flag-zm {background-position:0 -5413px} -span.flag-zw {background-position:0 -5435px} - -@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) { - #logo { - background-image: url("../images/logo@2x.png"); - background-size: 200px 65px; } } - -.input-group-field { - display: table-cell; - vertical-align: middle; - border-radius:4px; - min-width:1%; - white-space: nowrap; -} -.input-group-field .form-control { - border-radius: inherit !important; -} -.input-group-field:not(:first-child):not(:last-child) { - border-radius:0; -} -.input-group-field:not(:first-child):not(:last-child) .form-control { - border-left-width: 0; - border-right-width: 0; -} -.input-group-field:last-child { - border-top-left-radius:0; - border-bottom-left-radius:0; -} + ul.df-resultbox li.df-cheader, + ul.gs-resultbox li.gs-cheader { + background: #fff; + padding-top: 10px; + margin-bottom: 10px; + } -#ajaxloader { - position: absolute; - width: 325px; - height: 150px; - background: #ffffff url('../images/ajax-loader.gif') no-repeat center center; - border: solid 2px #e1e1e1; - border-radius: 10px; - /*background: rgba(255, 255, 255, 0.85);*/ - padding: 20px; - text-align:center; - z-index: 100; -} -input[type="password"].form-control[readonly] { - cursor: text; -} -.tooltip-inner { - max-width: 100%; -} -.notification { - width: 35px; - height: 35px; - background: #c70f19; - border-radius: 50%; - display: flex; - margin-top: 15px; - cursor: pointer; - margin-right: 15px; - float: right; -} -.notification { - animation: pulse 2s infinite; -} -@media (max-width: 600px) { - .notification { - margin-top: 0px; - margin-right: 0px; - margin-left: 230px; - position: relative; + ul.df-resultbox li p, + ul.gs-resultbox li p { + margin-bottom: 0; + color: inherit; } + + ul.df-resultbox li.df-cheader p.df-cheader-title, + ul.gs-resultbox li.gs-cheader p.gs-cheader-title { + font-weight: bold; + margin-bottom: 0; } + + ul.df-resultbox li.df-cheader p.df-cheader-limit, + ul.gs-resultbox li.gs-cheader p.gs-cheader-limit { + font-weight: normal; } + + ul.df-resultbox li.df-cdata img, + ul.gs-resultbox li.gs-cdata img { + margin-right: 12px; } + + ul.df-resultbox li.df-cdata p span.df-cdata-title, + ul.gs-resultbox li.gs-cdata p span.gs-cdata-title { + font-weight: bold; } + + ul.gs-resultbox li.gs-cdata p span.gs-cdata-title { + display: block; } + + ul.df-resultbox li:first-child, + ul.gs-resultbox li:first-child { + border-top-left-radius: 5px; + border-top-right-radius: 5px; } + + ul.df-resultbox li:last-child, + ul.gs-resultbox li:last-child { + border-bottom-left-radius: 5px; + border-bottom-right-radius: 5px; } + + span.flags { + background-image: url("../images/flags_sprite.png"); + background-repeat: no-repeat; + min-height: 20px; + padding-left: 27px; + vertical-align: middle; } -} -@keyframes pulse { - 0% { - background: #ff000e; + span.flag-el {background-position:0 -1475px} + span.flag-ad {background-position:0 -1px} + span.flag-ae {background-position:0 -23px} + span.flag-af {background-position:0 -45px} + span.flag-ag {background-position:0 -67px} + span.flag-ai {background-position:0 -89px} + span.flag-al {background-position:0 -111px} + span.flag-am {background-position:0 -133px} + span.flag-an {background-position:0 -155px} + span.flag-ao {background-position:0 -177px} + span.flag-aq {background-position:0 -199px} + span.flag-ar {background-position:0 -221px} + span.flag-as {background-position:0 -243px} + span.flag-at {background-position:0 -265px} + span.flag-au {background-position:0 -287px} + span.flag-aw {background-position:0 -309px} + span.flag-ax {background-position:0 -331px} + span.flag-az {background-position:0 -353px} + span.flag-ba {background-position:0 -375px} + span.flag-bb {background-position:0 -397px} + span.flag-bd {background-position:0 -419px} + span.flag-be {background-position:0 -441px} + span.flag-bf {background-position:0 -463px} + span.flag-bg {background-position:0 -485px} + span.flag-bh {background-position:0 -507px} + span.flag-bi {background-position:0 -529px} + span.flag-bj {background-position:0 -551px} + span.flag-bm {background-position:0 -573px} + span.flag-bn {background-position:0 -595px} + span.flag-bo {background-position:0 -617px} + span.flag-br {background-position:0 -639px} + span.flag-bs {background-position:0 -661px} + span.flag-bt {background-position:0 -683px} + span.flag-bv {background-position:0 -705px} + span.flag-bw {background-position:0 -727px} + span.flag-by {background-position:0 -749px} + span.flag-bz {background-position:0 -771px} + span.flag-ca {background-position:0 -793px} + span.flag-cc {background-position:0 -837px} + span.flag-cd {background-position:0 -859px} + span.flag-cf {background-position:0 -881px} + span.flag-cg {background-position:0 -903px} + span.flag-ch {background-position:0 -925px} + span.flag-ci {background-position:0 -947px} + span.flag-ck {background-position:0 -969px} + span.flag-cl {background-position:0 -991px} + span.flag-cm {background-position:0 -1013px} + span.flag-cn {background-position:0 -1035px} + span.flag-co {background-position:0 -1057px} + span.flag-cr {background-position:0 -1079px} + span.flag-cs {background-position:0 -1101px} + span.flag-cu {background-position:0 -1123px} + span.flag-cv {background-position:0 -1145px} + span.flag-cx {background-position:0 -1167px} + span.flag-cy {background-position:0 -1189px} + span.flag-cz {background-position:0 -1211px} + span.flag-de {background-position:0 -1233px} + span.flag-dj {background-position:0 -1255px} + span.flag-dk {background-position:0 -1277px} + span.flag-dm {background-position:0 -1299px} + span.flag-do {background-position:0 -1321px} + span.flag-dz {background-position:0 -1343px} + span.flag-ec {background-position:0 -1365px} + span.flag-ee {background-position:0 -1387px} + span.flag-eg {background-position:0 -1409px} + span.flag-eh {background-position:0 -1431px} + /*span.flag-en {background-position:0 -1453px}*/ + span.flag-er {background-position:0 -1475px} + span.flag-es {background-position:0 -1497px} + span.flag-et {background-position:0 -1519px} + span.flag-fi {background-position:0 -1585px} + span.flag-fj {background-position:0 -1607px} + span.flag-fk {background-position:0 -1629px} + span.flag-fm {background-position:0 -1651px} + span.flag-fo {background-position:0 -1673px} + span.flag-fr {background-position:0 -1695px} + span.flag-ga {background-position:0 -1717px} + span.flag-gb, span.flag-en {background-position:0 -1739px} + span.flag-gd {background-position:0 -1761px} + span.flag-ge {background-position:0 -1783px} + span.flag-gf {background-position:0 -1805px} + span.flag-gh {background-position:0 -1827px} + span.flag-gi {background-position:0 -1849px} + span.flag-gl {background-position:0 -1871px} + span.flag-gm {background-position:0 -1893px} + span.flag-gn {background-position:0 -1915px} + span.flag-gp {background-position:0 -1937px} + span.flag-gq {background-position:0 -1959px} + span.flag-gr {background-position:0 -1981px} + span.flag-gs {background-position:0 -2003px} + span.flag-gt {background-position:0 -2025px} + span.flag-gu {background-position:0 -2047px} + span.flag-gw {background-position:0 -2069px} + span.flag-gy {background-position:0 -2091px} + span.flag-hk {background-position:0 -2113px} + span.flag-hm {background-position:0 -2135px} + span.flag-hn {background-position:0 -2157px} + span.flag-hr {background-position:0 -2179px} + span.flag-ht {background-position:0 -2201px} + span.flag-hu {background-position:0 -2223px} + span.flag-id {background-position:0 -2245px} + span.flag-ie {background-position:0 -2267px} + span.flag-il {background-position:0 -2289px} + span.flag-in {background-position:0 -2311px} + span.flag-io {background-position:0 -2333px} + span.flag-iq {background-position:0 -2355px} + span.flag-ir {background-position:0 -2377px} + span.flag-is {background-position:0 -2399px} + span.flag-it {background-position:0 -2421px} + span.flag-jm {background-position:0 -2443px} + span.flag-jo {background-position:0 -2465px} + span.flag-jp {background-position:0 -2487px} + span.flag-ke {background-position:0 -2509px} + span.flag-kg {background-position:0 -2531px} + span.flag-kh {background-position:0 -2553px} + span.flag-ki {background-position:0 -2575px} + span.flag-km {background-position:0 -2597px} + span.flag-kn {background-position:0 -2619px} + span.flag-kp {background-position:0 -2641px} + span.flag-kr {background-position:0 -2663px} + span.flag-kw {background-position:0 -2685px} + span.flag-ky {background-position:0 -2707px} + span.flag-kz {background-position:0 -2729px} + span.flag-la {background-position:0 -2751px} + span.flag-lb {background-position:0 -2773px} + span.flag-lc {background-position:0 -2795px} + span.flag-li {background-position:0 -2817px} + span.flag-lk {background-position:0 -2839px} + span.flag-lr {background-position:0 -2861px} + span.flag-ls {background-position:0 -2883px} + span.flag-lt {background-position:0 -2905px} + span.flag-lu {background-position:0 -2927px} + span.flag-lv {background-position:0 -2949px} + span.flag-ly {background-position:0 -2971px} + span.flag-ma {background-position:0 -2993px} + span.flag-mc {background-position:0 -3015px} + span.flag-md {background-position:0 -3037px} + span.flag-me {background-position:0 -3059px} + span.flag-mg {background-position:0 -3081px} + span.flag-mh {background-position:0 -3103px} + span.flag-mk {background-position:0 -3125px} + span.flag-ml {background-position:0 -3147px} + span.flag-mm {background-position:0 -3169px} + span.flag-mn {background-position:0 -3191px} + span.flag-mo {background-position:0 -3213px} + span.flag-mp {background-position:0 -3235px} + span.flag-mq {background-position:0 -3257px} + span.flag-mr {background-position:0 -3279px} + span.flag-ms {background-position:0 -3301px} + span.flag-mt {background-position:0 -3323px} + span.flag-mu {background-position:0 -3345px} + span.flag-mv {background-position:0 -3367px} + span.flag-mw {background-position:0 -3389px} + span.flag-mx {background-position:0 -3411px} + span.flag-my {background-position:0 -3433px} + span.flag-mz {background-position:0 -3455px} + span.flag-na {background-position:0 -3477px} + span.flag-nc {background-position:0 -3499px} + span.flag-ne {background-position:0 -3521px} + span.flag-nf {background-position:0 -3543px} + span.flag-ng {background-position:0 -3565px} + span.flag-ni {background-position:0 -3587px} + span.flag-nl {background-position:0 -3609px} + span.flag-no {background-position:0 -3631px} + span.flag-np {background-position:0 -3653px} + span.flag-nr {background-position:0 -3675px} + span.flag-nu {background-position:0 -3697px} + span.flag-nz {background-position:0 -3719px} + span.flag-om {background-position:0 -3741px} + span.flag-pa {background-position:0 -3763px} + span.flag-pe {background-position:0 -3785px} + span.flag-pf {background-position:0 -3807px} + span.flag-pg {background-position:0 -3829px} + span.flag-ph {background-position:0 -3851px} + span.flag-pk {background-position:0 -3873px} + span.flag-pl {background-position:0 -3895px} + span.flag-pm {background-position:0 -3917px} + span.flag-pn {background-position:0 -3939px} + span.flag-pr {background-position:0 -3961px} + span.flag-ps {background-position:0 -3983px} + span.flag-pt {background-position:0 -4005px} + span.flag-pw {background-position:0 -4027px} + span.flag-py {background-position:0 -4049px} + span.flag-qa {background-position:0 -4071px} + span.flag-re {background-position:0 -4093px} + span.flag-ro {background-position:0 -4115px} + span.flag-rs {background-position:0 -4137px} + span.flag-ru {background-position:0 -4159px} + span.flag-rw {background-position:0 -4181px} + span.flag-sa {background-position:0 -4203px} + span.flag-sb {background-position:0 -4225px} + span.flag-sc {background-position:0 -4247px} + span.flag-sd {background-position:0 -4291px} + span.flag-se {background-position:0 -4313px} + span.flag-sg {background-position:0 -4335px} + span.flag-sh {background-position:0 -4357px} + span.flag-si {background-position:0 -4379px} + span.flag-sj {background-position:0 -4401px} + span.flag-sk {background-position:0 -4423px} + span.flag-sl {background-position:0 -4445px} + span.flag-sm {background-position:0 -4467px} + span.flag-sn {background-position:0 -4489px} + span.flag-so {background-position:0 -4511px} + span.flag-sr {background-position:0 -4533px} + span.flag-st {background-position:0 -4555px} + span.flag-sv {background-position:0 -4577px} + span.flag-sy {background-position:0 -4599px} + span.flag-sz {background-position:0 -4621px} + span.flag-tc {background-position:0 -4643px} + span.flag-td {background-position:0 -4665px} + span.flag-tf {background-position:0 -4687px} + span.flag-tg {background-position:0 -4709px} + span.flag-th {background-position:0 -4731px} + span.flag-tj {background-position:0 -4753px} + span.flag-tk {background-position:0 -4775px} + span.flag-tl {background-position:0 -4797px} + span.flag-tm {background-position:0 -4819px} + span.flag-tn {background-position:0 -4841px} + span.flag-to {background-position:0 -4863px} + span.flag-tr {background-position:0 -4885px} + span.flag-tt {background-position:0 -4907px} + span.flag-tv {background-position:0 -4929px} + span.flag-tw {background-position:0 -4951px} + span.flag-tz {background-position:0 -4973px} + span.flag-ua {background-position:0 -4995px} + span.flag-ug {background-position:0 -5017px} + span.flag-um {background-position:0 -5039px} + span.flag-us {background-position:0 -5061px} + span.flag-uy {background-position:0 -5083px} + span.flag-uz {background-position:0 -5105px} + span.flag-va {background-position:0 -5127px} + span.flag-vc {background-position:0 -5149px} + span.flag-ve {background-position:0 -5171px} + span.flag-vg {background-position:0 -5193px} + span.flag-vi {background-position:0 -5215px} + span.flag-vn {background-position:0 -5237px} + span.flag-vu {background-position:0 -5259px} + span.flag-wf {background-position:0 -5303px} + span.flag-ws {background-position:0 -5325px} + span.flag-ye {background-position:0 -5347px} + span.flag-yt {background-position:0 -5369px} + span.flag-za {background-position:0 -5391px} + span.flag-zm {background-position:0 -5413px} + span.flag-zw {background-position:0 -5435px} + + @media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) { + #logo { + background-image: url("../images/logo@2x.png"); + background-size: 200px 65px; } } + + .input-group-field { + display: table-cell; + vertical-align: middle; + border-radius:4px; + min-width:1%; + white-space: nowrap; + } + .input-group-field .form-control { + border-radius: inherit !important; + } + .input-group-field:not(:first-child):not(:last-child) { + border-radius:0; + } + .input-group-field:not(:first-child):not(:last-child) .form-control { + border-left-width: 0; + border-right-width: 0; + } + .input-group-field:last-child { + border-top-left-radius:0; + border-bottom-left-radius:0; } - 50% { + + #ajaxloader { + position: absolute; + width: 325px; + height: 150px; + background: #ffffff url('../images/ajax-loader.gif') no-repeat center center; + border: solid 2px #e1e1e1; + border-radius: 10px; + /*background: rgba(255, 255, 255, 0.85);*/ + padding: 20px; + text-align:center; + z-index: 100; + } + input[type="password"].form-control[readonly] { + cursor: text; + } + .tooltip-inner { + max-width: 100%; + } + .notification { + width: 35px; + height: 35px; background: #c70f19; + border-radius: 50%; + display: flex; + margin-top: 15px; + cursor: pointer; + margin-right: 15px; + float: right; } - 100% { - background: #ff000e; + .notification { + animation: pulse 2s infinite; + } + @media (max-width: 600px) { + .notification { + margin-top: 0px; + margin-right: 0px; + margin-left: 230px; + position: relative; + } + } + @keyframes pulse { + 0% { + background: #ff000e; + } + 50% { + background: #c70f19; + } + 100% { + background: #ff000e; + } + } + .systemmonitor-state.state-info .statusMsg { + display: none; + } + .systemmonitor-state .online { + color: green; + } + .systemmonitor-state .offline { + color: red; } -} -.systemmonitor-state.state-info .statusMsg { - display: none; -} -.systemmonitor-state .online { - color: green; -} -.systemmonitor-state .offline { - color: red; -} -span.notification_text { - display: block; - margin-left: auto; - margin-right: auto; - margin-top: auto; - margin-bottom: auto; - font-family: inherit; - color: white; -} -span.company_name { - font-weight: bold; -} + span.notification_text { + display: block; + margin-left: auto; + margin-right: auto; + margin-top: auto; + margin-bottom: auto; + font-family: inherit; + color: white; + } + span.company_name { + font-weight: bold; + } -span.tmp_account_name { - font-size: 0.9em; -} + span.tmp_account_name { + font-size: 0.9em; + } -.finediff { - font-family: monospace; -} -.finediff ins { - color: green; - background: #dfd; - text-decoration: none; -} -.finediff del { - color: red; - background: #fdd; - text-decoration: none; -} -#apache_directives, #nginx_directives, #proxy_directives { - font-family: Consolas, "Courier New", Courier, monospace; -} + .finediff { + font-family: monospace; + } + .finediff ins { + color: green; + background: #dfd; + text-decoration: none; + } + .finediff del { + color: red; + background: #fdd; + text-decoration: none; + } + #apache_directives, #nginx_directives, #proxy_directives { + font-family: Consolas, "Courier New", Courier, monospace; + } diff --git a/interface/web/themes/default/assets/stylesheets/pushy.css b/interface/web/themes/default/assets/stylesheets/pushy.css index 6d55022203..e06c2390d4 100644 --- a/interface/web/themes/default/assets/stylesheets/pushy.css +++ b/interface/web/themes/default/assets/stylesheets/pushy.css @@ -1,98 +1,98 @@ /*! Pushy - v0.9.1 - 2013-9-16 -* Pushy is a responsive off-canvas navigation menu using CSS transforms & transitions. -* https://github.com/christophery/pushy/ -* by Christopher Yee */ + * Pushy is a responsive off-canvas navigation menu using CSS transforms & transitions. + * https://github.com/christophery/pushy/ + * by Christopher Yee */ /* Menu Appearance */ .pushy{ - position: fixed; - width: 200px; - height: 100%; - top: 0; - z-index: 9999; - background: #333332; - font-size: 0.9em; - font-weight: bold; - -webkit-box-shadow: inset -10px 0 6px -9px rgba(0, 0, 0, .7); - -moz-box-shadow: inset -10px 0 6px -9px rgba(0, 0, 0, .7); - box-shadow: inset -10px 0 6px -9px rgba(0, 0, 0, .7); - overflow: auto; - -webkit-overflow-scrolling: touch; /* enables momentum scrolling in iOS overflow elements */ + position: fixed; + width: 200px; + height: 100%; + top: 0; + z-index: 9999; + background: #333332; + font-size: 0.9em; + font-weight: bold; + -webkit-box-shadow: inset -10px 0 6px -9px rgba(0, 0, 0, .7); + -moz-box-shadow: inset -10px 0 6px -9px rgba(0, 0, 0, .7); + box-shadow: inset -10px 0 6px -9px rgba(0, 0, 0, .7); + overflow: auto; + -webkit-overflow-scrolling: touch; /* enables momentum scrolling in iOS overflow elements */ } .pushy a{ - display: block; - color: #b3b3b1; - padding: 15px 30px; - border-bottom: 1px solid rgba(0, 0, 0, .1); - border-top: 1px solid rgba(255, 255, 255, .1); - text-decoration: none; + display: block; + color: #b3b3b1; + padding: 15px 30px; + border-bottom: 1px solid rgba(0, 0, 0, .1); + border-top: 1px solid rgba(255, 255, 255, .1); + text-decoration: none; } .pushy a:hover{ - background: #00b4ff; - color: #FFF; + background: #00b4ff; + color: #FFF; } /* Menu Movement */ .pushy-left{ - -webkit-transform: translate3d(-200px,0,0); - -moz-transform: translate3d(-200px,0,0); - -ms-transform: translate3d(-200px,0,0); - -o-transform: translate3d(-200px,0,0); - transform: translate3d(-200px,0,0); + -webkit-transform: translate3d(-200px,0,0); + -moz-transform: translate3d(-200px,0,0); + -ms-transform: translate3d(-200px,0,0); + -o-transform: translate3d(-200px,0,0); + transform: translate3d(-200px,0,0); } .pushy-open{ - -webkit-transform: translate3d(0,0,0); - -moz-transform: translate3d(0,0,0); - -ms-transform: translate3d(0,0,0); - -o-transform: translate3d(0,0,0); - transform: translate3d(0,0,0); + -webkit-transform: translate3d(0,0,0); + -moz-transform: translate3d(0,0,0); + -ms-transform: translate3d(0,0,0); + -o-transform: translate3d(0,0,0); + transform: translate3d(0,0,0); } .container-push, .push-push{ - -webkit-transform: translate3d(200px,0,0); - -moz-transform: translate3d(200px,0,0); - -ms-transform: translate3d(200px,0,0); - -o-transform: translate3d(200px,0,0); - transform: translate3d(200px,0,0); + -webkit-transform: translate3d(200px,0,0); + -moz-transform: translate3d(200px,0,0); + -ms-transform: translate3d(200px,0,0); + -o-transform: translate3d(200px,0,0); + transform: translate3d(200px,0,0); } /* Menu Transitions */ .pushy, #container, .push{ - -webkit-transition: -webkit-transform .2s cubic-bezier(.16, .68, .43, .99); - -moz-transition: -moz-transform .2s cubic-bezier(.16, .68, .43, .99); - -o-transition: -o-transform .2s cubic-bezier(.16, .68, .43, .99); - transition: transform .2s cubic-bezier(.16, .68, .43, .99); - /* improves performance issues on mobile*/ - -webkit-backface-visibility: hidden; - -webkit-perspective: 1000; + -webkit-transition: -webkit-transform .2s cubic-bezier(.16, .68, .43, .99); + -moz-transition: -moz-transform .2s cubic-bezier(.16, .68, .43, .99); + -o-transition: -o-transform .2s cubic-bezier(.16, .68, .43, .99); + transition: transform .2s cubic-bezier(.16, .68, .43, .99); + /* improves performance issues on mobile*/ + -webkit-backface-visibility: hidden; + -webkit-perspective: 1000; } /* Site Overlay */ .site-overlay{ - display: none; + display: none; } .pushy-active .site-overlay{ - display: block; - position: fixed; - top: 0; - right: 0; - bottom: 0; - left: 200px; - z-index: 9999; + display: block; + position: fixed; + top: 0; + right: 0; + bottom: 0; + left: 200px; + z-index: 9999; } /* Example Media Query */ @media screen and (max-width: 768px){ - .pushy{ - font-size: 1.0em; - } -} \ No newline at end of file + .pushy{ + font-size: 1.0em; + } +} diff --git a/interface/web/themes/default/assets/stylesheets/responsive.css b/interface/web/themes/default/assets/stylesheets/responsive.css index dd91918a32..422fc9f97a 100644 --- a/interface/web/themes/default/assets/stylesheets/responsive.css +++ b/interface/web/themes/default/assets/stylesheets/responsive.css @@ -1,96 +1,96 @@ html, body { - height: 100%; } +height: 100%; } .pushy ul { - padding-left: 0; - list-style: none; } - .pushy ul.subnavi li { - font-size: 12px; } - .pushy ul.subnavi li a { - padding: 2px 10px; - font-weight: normal; } - .pushy ul.subnavi li a.subnav-header { - font-weight: bold; } + padding-left: 0; +list-style: none; } +.pushy ul.subnavi li { +font-size: 12px; } +.pushy ul.subnavi li a { + padding: 2px 10px; +font-weight: normal; } +.pushy ul.subnavi li a.subnav-header { +font-weight: bold; } .pushy a { - padding: 10px; - transition: color ease 500ms; } + padding: 10px; +transition: color ease 500ms; } .pushy i { - font-size: 22px; - vertical-align: sub; } + font-size: 22px; +vertical-align: sub; } @media screen and (max-width: 970px) { - #main-wrapper, #content, #sidebar { - width: 100%; } + #main-wrapper, #content, #sidebar { + width: 100%; } - #inner-wrapper { - margin: 0 10px; } + #inner-wrapper { + margin: 0 10px; } - #sidebar.news-sidebar { - margin-top: 0; } } + #sidebar.news-sidebar { +margin-top: 0; } } @media screen and (max-width: 860px) { - #main-navigation { - display: block; } - #main-navigation a { - float: left; - display: block; - margin-top: -1px; - padding-top: 6px; - width: 60px; - height: 50px; - border-bottom: 0; - border-right-style: solid; - border-right-width: 1px; - border-bottom-style: solid; - border-bottom-width: 1px; } - #main-navigation .icon { - font-size: 16px; } - #main-navigation .title { - font-size: 10px; } - #main-navigation .btn { - border-radius: 0; } - #main-navigation .btn:first-child { - margin-left: -1px; } } + #main-navigation { + display: block; } + #main-navigation a { + float: left; + display: block; + margin-top: -1px; + padding-top: 6px; + width: 60px; + height: 50px; + border-bottom: 0; + border-right-style: solid; + border-right-width: 1px; + border-bottom-style: solid; + border-bottom-width: 1px; } + #main-navigation .icon { + font-size: 16px; } + #main-navigation .title { + font-size: 10px; } + #main-navigation .btn { + border-radius: 0; } + #main-navigation .btn:first-child { +margin-left: -1px; } } @media screen and (max-width: 670px) { - #main-navigation, #sidebar { - display: none; } + #main-navigation, #sidebar { + display: none; } - .menu-btn { - display: block; - margin-top: 8px; - margin-right: 10px; - font-size: 30px; } } + .menu-btn { + display: block; + margin-top: 8px; + margin-right: 10px; +font-size: 30px; } } @media screen and (max-width: 600px) { - #headerbar { - float: left; - width: 100%; } + #headerbar { + float: left; + width: 100%; } - #searchform { - float: left; - margin-top: 0; } + #searchform { + float: left; + margin-top: 0; } - #logout-button { - margin-top: 0; - margin-left: 0; } + #logout-button { + margin-top: 0; + margin-left: 0; } - #sidebar { - margin-top: 10px; } + #sidebar { + margin-top: 10px; } - .table, .table thead, .table tbody, .table tr, .table th, .table td { - display: block; } + .table, .table thead, .table tbody, .table tr, .table th, .table td { + display: block; } - .table caption { - width: 100%; } + .table caption { + width: 100%; } - .table thead tr { - position: absolute; - top: -9999px; - left: -9999px; } + .table thead tr { + position: absolute; + top: -9999px; + left: -9999px; } - .table tbody tr { - border-top: none; } + .table tbody tr { + border-top: none; } - .progress { - width: 100%; } } + .progress { +width: 100%; } } @media screen and (max-width: 350px) { - #searchform input { - width: 130px; } } + #searchform input { +width: 130px; } } diff --git a/interface/web/themes/default/assets/stylesheets/select2-bootstrap.css b/interface/web/themes/default/assets/stylesheets/select2-bootstrap.css index 3b83f0a229..300d3975c3 100644 --- a/interface/web/themes/default/assets/stylesheets/select2-bootstrap.css +++ b/interface/web/themes/default/assets/stylesheets/select2-bootstrap.css @@ -1,29 +1,29 @@ .form-control .select2-choice { - border: 0; - border-radius: 2px; + border: 0; + border-radius: 2px; } .form-control .select2-choice .select2-arrow { - border-radius: 0 2px 2px 0; + border-radius: 0 2px 2px 0; } .form-control.select2-container { - height: auto !important; - padding: 0; + height: auto !important; + padding: 0; } .form-control.select2-container.select2-dropdown-open { - border-color: #5897FB; - border-radius: 3px 3px 0 0; + border-color: #5897FB; + border-radius: 3px 3px 0 0; } .form-control .select2-container.select2-dropdown-open .select2-choices { - border-radius: 3px 3px 0 0; + border-radius: 3px 3px 0 0; } .form-control.select2-container .select2-choices { - border: 0 !important; - border-radius: 3px; + border: 0 !important; + border-radius: 3px; } .control-group.warning .select2-container .select2-choice, @@ -33,12 +33,12 @@ .control-group.warning .select2-dropdown-open.select2-drop-above .select2-choice, .control-group.warning .select2-dropdown-open.select2-drop-above .select2-choices, .control-group.warning .select2-container-multi.select2-container-active .select2-choices { - border: 1px solid #C09853 !important; + border: 1px solid #C09853 !important; } .control-group.warning .select2-container .select2-choice div { - border-left: 1px solid #C09853 !important; - background: #FCF8E3 !important; + border-left: 1px solid #C09853 !important; + background: #FCF8E3 !important; } .control-group.error .select2-container .select2-choice, @@ -48,12 +48,12 @@ .control-group.error .select2-dropdown-open.select2-drop-above .select2-choice, .control-group.error .select2-dropdown-open.select2-drop-above .select2-choices, .control-group.error .select2-container-multi.select2-container-active .select2-choices { - border: 1px solid #B94A48 !important; + border: 1px solid #B94A48 !important; } .control-group.error .select2-container .select2-choice div { - border-left: 1px solid #B94A48 !important; - background: #F2DEDE !important; + border-left: 1px solid #B94A48 !important; + background: #F2DEDE !important; } .control-group.info .select2-container .select2-choice, @@ -63,12 +63,12 @@ .control-group.info .select2-dropdown-open.select2-drop-above .select2-choice, .control-group.info .select2-dropdown-open.select2-drop-above .select2-choices, .control-group.info .select2-container-multi.select2-container-active .select2-choices { - border: 1px solid #3A87AD !important; + border: 1px solid #3A87AD !important; } .control-group.info .select2-container .select2-choice div { - border-left: 1px solid #3A87AD !important; - background: #D9EDF7 !important; + border-left: 1px solid #3A87AD !important; + background: #D9EDF7 !important; } .control-group.success .select2-container .select2-choice, @@ -78,10 +78,10 @@ .control-group.success .select2-dropdown-open.select2-drop-above .select2-choice, .control-group.success .select2-dropdown-open.select2-drop-above .select2-choices, .control-group.success .select2-container-multi.select2-container-active .select2-choices { - border: 1px solid #468847 !important; + border: 1px solid #468847 !important; } .control-group.success .select2-container .select2-choice div { - border-left: 1px solid #468847 !important; - background: #DFF0D8 !important; + border-left: 1px solid #468847 !important; + background: #DFF0D8 !important; } diff --git a/interface/web/themes/default/assets/stylesheets/select2.css b/interface/web/themes/default/assets/stylesheets/select2.css index e2cad23f5d..35196d0cad 100644 --- a/interface/web/themes/default/assets/stylesheets/select2.css +++ b/interface/web/themes/default/assets/stylesheets/select2.css @@ -1,59 +1,59 @@ /* Version: 3.5.2 Timestamp: Sat Nov 1 14:43:36 EDT 2014 -*/ + */ .select2-container { - margin: 0; - position: relative; - display: inline-block; - /* inline-block for ie7 */ - zoom: 1; - *display: inline; - vertical-align: middle; -} - -.select2-container, -.select2-drop, -.select2-search, -.select2-search input { - /* - Force border-box so that % widths fit the parent - container without overlap because of margin/padding. - More Info : http://www.quirksmode.org/css/box.html - */ - -webkit-box-sizing: border-box; /* webkit */ - -moz-box-sizing: border-box; /* firefox */ - box-sizing: border-box; /* css3 */ + margin: 0; + position: relative; + display: inline-block; + /* inline-block for ie7 */ + zoom: 1; + *display: inline; + vertical-align: middle; + } + + .select2-container, + .select2-drop, + .select2-search, + .select2-search input { + /* + Force border-box so that % widths fit the parent + container without overlap because of margin/padding. + More Info : http://www.quirksmode.org/css/box.html + */ +-webkit-box-sizing: border-box; /* webkit */ +-moz-box-sizing: border-box; /* firefox */ +box-sizing: border-box; /* css3 */ } .select2-container .select2-choice { - display: block; - height: 26px; - padding: 0 0 0 8px; - overflow: hidden; - position: relative; + display: block; + height: 26px; + padding: 0 0 0 8px; + overflow: hidden; + position: relative; - border: 1px solid #aaa; - white-space: nowrap; - line-height: 26px; - color: #444; - text-decoration: none; + border: 1px solid #aaa; + white-space: nowrap; + line-height: 26px; + color: #444; + text-decoration: none; - border-radius: 4px; + border-radius: 4px; - background-clip: padding-box; + background-clip: padding-box; - -webkit-touch-callout: none; - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; + -webkit-touch-callout: none; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; - background-color: #fff; - background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, #eee), color-stop(0.5, #fff)); - background-image: -webkit-linear-gradient(center bottom, #eee 0%, #fff 50%); - background-image: -moz-linear-gradient(center bottom, #eee 0%, #fff 50%); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr = '#ffffff', endColorstr = '#eeeeee', GradientType = 0); - background-image: linear-gradient(to top, #eee 0%, #fff 50%); + background-color: #fff; + background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, #eee), color-stop(0.5, #fff)); + background-image: -webkit-linear-gradient(center bottom, #eee 0%, #fff 50%); + background-image: -moz-linear-gradient(center bottom, #eee 0%, #fff 50%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr = '#ffffff', endColorstr = '#eeeeee', GradientType = 0); + background-image: linear-gradient(to top, #eee 0%, #fff 50%); } .tab-content .select2-container .select2-choice { @@ -62,342 +62,342 @@ Version: 3.5.2 Timestamp: Sat Nov 1 14:43:36 EDT 2014 } html[dir="rtl"] .select2-container .select2-choice { - padding: 0 8px 0 0; + padding: 0 8px 0 0; } .select2-container.select2-drop-above .select2-choice { - border-bottom-color: #aaa; + border-bottom-color: #aaa; - border-radius: 0 0 4px 4px; + border-radius: 0 0 4px 4px; - background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, #eee), color-stop(0.9, #fff)); - background-image: -webkit-linear-gradient(center bottom, #eee 0%, #fff 90%); - background-image: -moz-linear-gradient(center bottom, #eee 0%, #fff 90%); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#eeeeee', GradientType=0); - background-image: linear-gradient(to bottom, #eee 0%, #fff 90%); + background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, #eee), color-stop(0.9, #fff)); + background-image: -webkit-linear-gradient(center bottom, #eee 0%, #fff 90%); + background-image: -moz-linear-gradient(center bottom, #eee 0%, #fff 90%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#eeeeee', GradientType=0); + background-image: linear-gradient(to bottom, #eee 0%, #fff 90%); } .select2-container.select2-allowclear .select2-choice .select2-chosen { - margin-right: 42px; + margin-right: 42px; } .select2-container .select2-choice > .select2-chosen { - margin-right: 26px; - display: block; - overflow: hidden; + margin-right: 26px; + display: block; + overflow: hidden; - white-space: nowrap; + white-space: nowrap; - text-overflow: ellipsis; - float: none; - width: auto; + text-overflow: ellipsis; + float: none; + width: auto; } html[dir="rtl"] .select2-container .select2-choice > .select2-chosen { - margin-left: 26px; - margin-right: 0; + margin-left: 26px; + margin-right: 0; } .select2-container .select2-choice abbr { - display: none; - width: 12px; - height: 12px; - position: absolute; - right: 24px; - top: 8px; + display: none; + width: 12px; + height: 12px; + position: absolute; + right: 24px; + top: 8px; - font-size: 1px; - text-decoration: none; + font-size: 1px; + text-decoration: none; - border: 0; - background: url('select2.png') right top no-repeat; - cursor: pointer; - outline: 0; + border: 0; + background: url('select2.png') right top no-repeat; + cursor: pointer; + outline: 0; } .select2-container.select2-allowclear .select2-choice abbr { - display: inline-block; + display: inline-block; } .select2-container .select2-choice abbr:hover { - background-position: right -11px; - cursor: pointer; + background-position: right -11px; + cursor: pointer; } .select2-drop-mask { - border: 0; - margin: 0; - padding: 0; - position: fixed; - left: 0; - top: 0; - min-height: 100%; - min-width: 100%; - height: auto; - width: auto; - opacity: 0; - z-index: 9998; - /* styles required for IE to work */ - background-color: #fff; - filter: alpha(opacity=0); + border: 0; + margin: 0; + padding: 0; + position: fixed; + left: 0; + top: 0; + min-height: 100%; + min-width: 100%; + height: auto; + width: auto; + opacity: 0; + z-index: 9998; + /* styles required for IE to work */ + background-color: #fff; + filter: alpha(opacity=0); } .select2-drop { - width: 100%; - margin-top: -1px; - position: absolute; - z-index: 9999; - top: 100%; + width: 100%; + margin-top: -1px; + position: absolute; + z-index: 9999; + top: 100%; - background: #fff; - color: #000; - border: 1px solid #aaa; - border-top: 0; + background: #fff; + color: #000; + border: 1px solid #aaa; + border-top: 0; - border-radius: 0 0 4px 4px; + border-radius: 0 0 4px 4px; - -webkit-box-shadow: 0 4px 5px rgba(0, 0, 0, .15); - box-shadow: 0 4px 5px rgba(0, 0, 0, .15); + -webkit-box-shadow: 0 4px 5px rgba(0, 0, 0, .15); + box-shadow: 0 4px 5px rgba(0, 0, 0, .15); } .select2-drop.select2-drop-above { - margin-top: 1px; - border-top: 1px solid #aaa; - border-bottom: 0; + margin-top: 1px; + border-top: 1px solid #aaa; + border-bottom: 0; - border-radius: 4px 4px 0 0; + border-radius: 4px 4px 0 0; - -webkit-box-shadow: 0 -4px 5px rgba(0, 0, 0, .15); - box-shadow: 0 -4px 5px rgba(0, 0, 0, .15); + -webkit-box-shadow: 0 -4px 5px rgba(0, 0, 0, .15); + box-shadow: 0 -4px 5px rgba(0, 0, 0, .15); } .select2-drop-active { - border: 1px solid #5897fb; - border-top: none; + border: 1px solid #5897fb; + border-top: none; } .select2-drop.select2-drop-above.select2-drop-active { - border-top: 1px solid #5897fb; + border-top: 1px solid #5897fb; } .select2-drop-auto-width { - border-top: 1px solid #aaa; - width: auto; + border-top: 1px solid #aaa; + width: auto; } .select2-drop-auto-width .select2-search { - padding-top: 4px; + padding-top: 4px; } .select2-container .select2-choice .select2-arrow { - display: inline-block; - width: 18px; - height: 100%; - position: absolute; - right: 0; - top: 0; + display: inline-block; + width: 18px; + height: 100%; + position: absolute; + right: 0; + top: 0; - border-left: 1px solid #aaa; - border-radius: 0 4px 4px 0; + border-left: 1px solid #aaa; + border-radius: 0 4px 4px 0; - background-clip: padding-box; + background-clip: padding-box; - background: #ccc; - background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, #ccc), color-stop(0.6, #eee)); - background-image: -webkit-linear-gradient(center bottom, #ccc 0%, #eee 60%); - background-image: -moz-linear-gradient(center bottom, #ccc 0%, #eee 60%); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr = '#eeeeee', endColorstr = '#cccccc', GradientType = 0); - background-image: linear-gradient(to top, #ccc 0%, #eee 60%); + background: #ccc; + background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, #ccc), color-stop(0.6, #eee)); + background-image: -webkit-linear-gradient(center bottom, #ccc 0%, #eee 60%); + background-image: -moz-linear-gradient(center bottom, #ccc 0%, #eee 60%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr = '#eeeeee', endColorstr = '#cccccc', GradientType = 0); + background-image: linear-gradient(to top, #ccc 0%, #eee 60%); } html[dir="rtl"] .select2-container .select2-choice .select2-arrow { - left: 0; - right: auto; + left: 0; + right: auto; - border-left: none; - border-right: 1px solid #aaa; - border-radius: 4px 0 0 4px; + border-left: none; + border-right: 1px solid #aaa; + border-radius: 4px 0 0 4px; } .select2-container .select2-choice .select2-arrow b { - display: block; - width: 100%; - height: 100%; - background: url('select2.png') no-repeat 0 1px; + display: block; + width: 100%; + height: 100%; + background: url('select2.png') no-repeat 0 1px; } html[dir="rtl"] .select2-container .select2-choice .select2-arrow b { - background-position: 2px 1px; + background-position: 2px 1px; } .select2-search { - display: inline-block; - width: 100%; - min-height: 26px; - margin: 0; - padding-left: 4px; - padding-right: 4px; + display: inline-block; + width: 100%; + min-height: 26px; + margin: 0; + padding-left: 4px; + padding-right: 4px; - position: relative; - z-index: 10000; + position: relative; + z-index: 10000; - white-space: nowrap; + white-space: nowrap; } .select2-search input { - width: 100%; - height: auto !important; - min-height: 26px; - padding: 4px 20px 4px 5px; - margin: 0; + width: 100%; + height: auto !important; + min-height: 26px; + padding: 4px 20px 4px 5px; + margin: 0; - outline: 0; - font-family: sans-serif; - font-size: 1em; + outline: 0; + font-family: sans-serif; + font-size: 1em; - border: 1px solid #aaa; - border-radius: 0; + border: 1px solid #aaa; + border-radius: 0; - -webkit-box-shadow: none; - box-shadow: none; + -webkit-box-shadow: none; + box-shadow: none; - background: #fff url('select2.png') no-repeat 100% -22px; - background: url('select2.png') no-repeat 100% -22px, -webkit-gradient(linear, left bottom, left top, color-stop(0.85, #fff), color-stop(0.99, #eee)); - background: url('select2.png') no-repeat 100% -22px, -webkit-linear-gradient(center bottom, #fff 85%, #eee 99%); - background: url('select2.png') no-repeat 100% -22px, -moz-linear-gradient(center bottom, #fff 85%, #eee 99%); - background: url('select2.png') no-repeat 100% -22px, linear-gradient(to bottom, #fff 85%, #eee 99%) 0 0; + background: #fff url('select2.png') no-repeat 100% -22px; + background: url('select2.png') no-repeat 100% -22px, -webkit-gradient(linear, left bottom, left top, color-stop(0.85, #fff), color-stop(0.99, #eee)); + background: url('select2.png') no-repeat 100% -22px, -webkit-linear-gradient(center bottom, #fff 85%, #eee 99%); + background: url('select2.png') no-repeat 100% -22px, -moz-linear-gradient(center bottom, #fff 85%, #eee 99%); + background: url('select2.png') no-repeat 100% -22px, linear-gradient(to bottom, #fff 85%, #eee 99%) 0 0; } html[dir="rtl"] .select2-search input { - padding: 4px 5px 4px 20px; + padding: 4px 5px 4px 20px; - background: #fff url('select2.png') no-repeat -37px -22px; - background: url('select2.png') no-repeat -37px -22px, -webkit-gradient(linear, left bottom, left top, color-stop(0.85, #fff), color-stop(0.99, #eee)); - background: url('select2.png') no-repeat -37px -22px, -webkit-linear-gradient(center bottom, #fff 85%, #eee 99%); - background: url('select2.png') no-repeat -37px -22px, -moz-linear-gradient(center bottom, #fff 85%, #eee 99%); - background: url('select2.png') no-repeat -37px -22px, linear-gradient(to bottom, #fff 85%, #eee 99%) 0 0; + background: #fff url('select2.png') no-repeat -37px -22px; + background: url('select2.png') no-repeat -37px -22px, -webkit-gradient(linear, left bottom, left top, color-stop(0.85, #fff), color-stop(0.99, #eee)); + background: url('select2.png') no-repeat -37px -22px, -webkit-linear-gradient(center bottom, #fff 85%, #eee 99%); + background: url('select2.png') no-repeat -37px -22px, -moz-linear-gradient(center bottom, #fff 85%, #eee 99%); + background: url('select2.png') no-repeat -37px -22px, linear-gradient(to bottom, #fff 85%, #eee 99%) 0 0; } .select2-drop.select2-drop-above .select2-search input { - margin-top: 4px; + margin-top: 4px; } .select2-search input.select2-active { - background: #fff url('select2-spinner.gif') no-repeat 100%; - background: url('select2-spinner.gif') no-repeat 100%, -webkit-gradient(linear, left bottom, left top, color-stop(0.85, #fff), color-stop(0.99, #eee)); - background: url('select2-spinner.gif') no-repeat 100%, -webkit-linear-gradient(center bottom, #fff 85%, #eee 99%); - background: url('select2-spinner.gif') no-repeat 100%, -moz-linear-gradient(center bottom, #fff 85%, #eee 99%); - background: url('select2-spinner.gif') no-repeat 100%, linear-gradient(to bottom, #fff 85%, #eee 99%) 0 0; + background: #fff url('select2-spinner.gif') no-repeat 100%; + background: url('select2-spinner.gif') no-repeat 100%, -webkit-gradient(linear, left bottom, left top, color-stop(0.85, #fff), color-stop(0.99, #eee)); + background: url('select2-spinner.gif') no-repeat 100%, -webkit-linear-gradient(center bottom, #fff 85%, #eee 99%); + background: url('select2-spinner.gif') no-repeat 100%, -moz-linear-gradient(center bottom, #fff 85%, #eee 99%); + background: url('select2-spinner.gif') no-repeat 100%, linear-gradient(to bottom, #fff 85%, #eee 99%) 0 0; } .select2-container-active .select2-choice, .select2-container-active .select2-choices { - border: 1px solid #5897fb; - outline: none; + border: 1px solid #5897fb; + outline: none; - -webkit-box-shadow: 0 0 5px rgba(0, 0, 0, .3); - box-shadow: 0 0 5px rgba(0, 0, 0, .3); + -webkit-box-shadow: 0 0 5px rgba(0, 0, 0, .3); + box-shadow: 0 0 5px rgba(0, 0, 0, .3); } .select2-dropdown-open .select2-choice { - border-bottom-color: transparent; - -webkit-box-shadow: 0 1px 0 #fff inset; - box-shadow: 0 1px 0 #fff inset; + border-bottom-color: transparent; + -webkit-box-shadow: 0 1px 0 #fff inset; + box-shadow: 0 1px 0 #fff inset; - border-bottom-left-radius: 0; - border-bottom-right-radius: 0; + border-bottom-left-radius: 0; + border-bottom-right-radius: 0; - background-color: #eee; - background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, #fff), color-stop(0.5, #eee)); - background-image: -webkit-linear-gradient(center bottom, #fff 0%, #eee 50%); - background-image: -moz-linear-gradient(center bottom, #fff 0%, #eee 50%); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#eeeeee', endColorstr='#ffffff', GradientType=0); - background-image: linear-gradient(to top, #fff 0%, #eee 50%); + background-color: #eee; + background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, #fff), color-stop(0.5, #eee)); + background-image: -webkit-linear-gradient(center bottom, #fff 0%, #eee 50%); + background-image: -moz-linear-gradient(center bottom, #fff 0%, #eee 50%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#eeeeee', endColorstr='#ffffff', GradientType=0); + background-image: linear-gradient(to top, #fff 0%, #eee 50%); } .select2-dropdown-open.select2-drop-above .select2-choice, .select2-dropdown-open.select2-drop-above .select2-choices { - border: 1px solid #5897fb; - border-top-color: transparent; + border: 1px solid #5897fb; + border-top-color: transparent; - background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0, #fff), color-stop(0.5, #eee)); - background-image: -webkit-linear-gradient(center top, #fff 0%, #eee 50%); - background-image: -moz-linear-gradient(center top, #fff 0%, #eee 50%); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#eeeeee', endColorstr='#ffffff', GradientType=0); - background-image: linear-gradient(to bottom, #fff 0%, #eee 50%); + background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0, #fff), color-stop(0.5, #eee)); + background-image: -webkit-linear-gradient(center top, #fff 0%, #eee 50%); + background-image: -moz-linear-gradient(center top, #fff 0%, #eee 50%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#eeeeee', endColorstr='#ffffff', GradientType=0); + background-image: linear-gradient(to bottom, #fff 0%, #eee 50%); } .select2-dropdown-open .select2-choice .select2-arrow { - background: transparent; - border-left: none; - filter: none; + background: transparent; + border-left: none; + filter: none; } html[dir="rtl"] .select2-dropdown-open .select2-choice .select2-arrow { - border-right: none; + border-right: none; } .select2-dropdown-open .select2-choice .select2-arrow b { - background-position: -18px 1px; + background-position: -18px 1px; } html[dir="rtl"] .select2-dropdown-open .select2-choice .select2-arrow b { - background-position: -16px 1px; + background-position: -16px 1px; } .select2-hidden-accessible { - border: 0; - clip: rect(0 0 0 0); - height: 1px; - margin: -1px; - overflow: hidden; - padding: 0; - position: absolute; - width: 1px; + border: 0; + clip: rect(0 0 0 0); + height: 1px; + margin: -1px; + overflow: hidden; + padding: 0; + position: absolute; + width: 1px; } /* results */ .select2-results { - max-height: 200px; - padding: 0 0 0 4px; - margin: 4px 4px 4px 0; - position: relative; - overflow-x: hidden; - overflow-y: auto; - -webkit-tap-highlight-color: rgba(0, 0, 0, 0); + max-height: 200px; + padding: 0 0 0 4px; + margin: 4px 4px 4px 0; + position: relative; + overflow-x: hidden; + overflow-y: auto; + -webkit-tap-highlight-color: rgba(0, 0, 0, 0); } html[dir="rtl"] .select2-results { - padding: 0 4px 0 0; - margin: 4px 0 4px 4px; + padding: 0 4px 0 0; + margin: 4px 0 4px 4px; } .select2-results ul.select2-result-sub { - margin: 0; - padding-left: 0; + margin: 0; + padding-left: 0; } .select2-results li { - list-style: none; - display: list-item; - background-image: none; + list-style: none; + display: list-item; + background-image: none; } .select2-results li.select2-result-with-children > .select2-result-label { - font-weight: bold; + font-weight: bold; } .select2-results .select2-result-label { - padding: 3px 7px 4px; - margin: 0; - cursor: pointer; + padding: 3px 7px 4px; + margin: 0; + cursor: pointer; - min-height: 1em; + min-height: 1em; - -webkit-touch-callout: none; - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; + -webkit-touch-callout: none; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; } .select2-results-dept-1 .select2-result-label { padding-left: 20px } @@ -409,301 +409,301 @@ html[dir="rtl"] .select2-results { .select2-results-dept-7 .select2-result-label { padding-left: 120px } .select2-results .select2-highlighted { - background: #3875d7; - color: #fff; + background: #3875d7; + color: #fff; } .select2-results li em { - background: #feffde; - font-style: normal; + background: #feffde; + font-style: normal; } .select2-results .select2-highlighted em { - background: transparent; + background: transparent; } .select2-results .select2-highlighted ul { - background: #fff; - color: #000; + background: #fff; + color: #000; } .select2-results .select2-no-results, .select2-results .select2-searching, .select2-results .select2-ajax-error, .select2-results .select2-selection-limit { - background: #f4f4f4; - display: list-item; - padding-left: 5px; + background: #f4f4f4; + display: list-item; + padding-left: 5px; } /* disabled look for disabled choices in the results dropdown -*/ + */ .select2-results .select2-disabled.select2-highlighted { - color: #666; - background: #f4f4f4; - display: list-item; - cursor: default; + color: #666; + background: #f4f4f4; + display: list-item; + cursor: default; } .select2-results .select2-disabled { - background: #f4f4f4; - display: none; - cursor: default; + background: #f4f4f4; + display: none; + cursor: default; } .select2-results .select2-selected { - display: none; + display: none; } .select2-more-results.select2-active { - background: #f4f4f4 url('select2-spinner.gif') no-repeat 100%; + background: #f4f4f4 url('select2-spinner.gif') no-repeat 100%; } .select2-results .select2-ajax-error { - background: rgba(255, 50, 50, .2); + background: rgba(255, 50, 50, .2); } .select2-more-results { - background: #f4f4f4; - display: list-item; + background: #f4f4f4; + display: list-item; } /* disabled styles */ .select2-container.select2-container-disabled .select2-choice { - background-color: #f4f4f4; - background-image: none; - border: 1px solid #ddd; - cursor: default; + background-color: #f4f4f4; + background-image: none; + border: 1px solid #ddd; + cursor: default; } .select2-container.select2-container-disabled .select2-choice .select2-arrow { - background-color: #f4f4f4; - background-image: none; - border-left: 0; + background-color: #f4f4f4; + background-image: none; + border-left: 0; } .select2-container.select2-container-disabled .select2-choice abbr { - display: none; + display: none; } /* multiselect */ .select2-container-multi .select2-choices { - height: auto !important; - height: 1%; - margin: 0; - padding: 0 5px 0 0; - position: relative; + height: auto !important; + height: 1%; + margin: 0; + padding: 0 5px 0 0; + position: relative; - border: 1px solid #aaa; - cursor: text; - overflow: hidden; + border: 1px solid #aaa; + cursor: text; + overflow: hidden; - background-color: #fff; - background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, color-stop(1%, #eee), color-stop(15%, #fff)); - background-image: -webkit-linear-gradient(top, #eee 1%, #fff 15%); - background-image: -moz-linear-gradient(top, #eee 1%, #fff 15%); - background-image: linear-gradient(to bottom, #eee 1%, #fff 15%); + background-color: #fff; + background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, color-stop(1%, #eee), color-stop(15%, #fff)); + background-image: -webkit-linear-gradient(top, #eee 1%, #fff 15%); + background-image: -moz-linear-gradient(top, #eee 1%, #fff 15%); + background-image: linear-gradient(to bottom, #eee 1%, #fff 15%); } html[dir="rtl"] .select2-container-multi .select2-choices { - padding: 0 0 0 5px; + padding: 0 0 0 5px; } .select2-locked { - padding: 3px 5px 3px 5px !important; + padding: 3px 5px 3px 5px !important; } .select2-container-multi .select2-choices { - min-height: 26px; + min-height: 26px; } .select2-container-multi.select2-container-active .select2-choices { - border: 1px solid #5897fb; - outline: none; + border: 1px solid #5897fb; + outline: none; - -webkit-box-shadow: 0 0 5px rgba(0, 0, 0, .3); - box-shadow: 0 0 5px rgba(0, 0, 0, .3); + -webkit-box-shadow: 0 0 5px rgba(0, 0, 0, .3); + box-shadow: 0 0 5px rgba(0, 0, 0, .3); } .select2-container-multi .select2-choices li { - float: left; - list-style: none; + float: left; + list-style: none; } html[dir="rtl"] .select2-container-multi .select2-choices li { - float: right; + float: right; } .select2-container-multi .select2-choices .select2-search-field { - margin: 0; - padding: 0; - white-space: nowrap; + margin: 0; + padding: 0; + white-space: nowrap; } .select2-container-multi .select2-choices .select2-search-field input { - padding: 5px; - margin: 1px 0; + padding: 5px; + margin: 1px 0; - font-family: sans-serif; - font-size: 100%; - color: #666; - outline: 0; - border: 0; - -webkit-box-shadow: none; - box-shadow: none; - background: transparent !important; + font-family: sans-serif; + font-size: 100%; + color: #666; + outline: 0; + border: 0; + -webkit-box-shadow: none; + box-shadow: none; + background: transparent !important; } .select2-container-multi .select2-choices .select2-search-field input.select2-active { - background: #fff url('select2-spinner.gif') no-repeat 100% !important; + background: #fff url('select2-spinner.gif') no-repeat 100% !important; } .select2-default { - color: #999 !important; + color: #999 !important; } .select2-container-multi .select2-choices .select2-search-choice { - padding: 3px 5px 3px 18px; - margin: 3px 0 3px 5px; - position: relative; + padding: 3px 5px 3px 18px; + margin: 3px 0 3px 5px; + position: relative; - line-height: 13px; - color: #333; - cursor: default; - border: 1px solid #aaaaaa; + line-height: 13px; + color: #333; + cursor: default; + border: 1px solid #aaaaaa; - border-radius: 3px; + border-radius: 3px; - -webkit-box-shadow: 0 0 2px #fff inset, 0 1px 0 rgba(0, 0, 0, 0.05); - box-shadow: 0 0 2px #fff inset, 0 1px 0 rgba(0, 0, 0, 0.05); + -webkit-box-shadow: 0 0 2px #fff inset, 0 1px 0 rgba(0, 0, 0, 0.05); + box-shadow: 0 0 2px #fff inset, 0 1px 0 rgba(0, 0, 0, 0.05); - background-clip: padding-box; + background-clip: padding-box; - -webkit-touch-callout: none; - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; + -webkit-touch-callout: none; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; - background-color: #e4e4e4; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#eeeeee', endColorstr='#f4f4f4', GradientType=0); - background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, color-stop(20%, #f4f4f4), color-stop(50%, #f0f0f0), color-stop(52%, #e8e8e8), color-stop(100%, #eee)); - background-image: -webkit-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eee 100%); - background-image: -moz-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eee 100%); - background-image: linear-gradient(to bottom, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eee 100%); + background-color: #e4e4e4; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#eeeeee', endColorstr='#f4f4f4', GradientType=0); + background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, color-stop(20%, #f4f4f4), color-stop(50%, #f0f0f0), color-stop(52%, #e8e8e8), color-stop(100%, #eee)); + background-image: -webkit-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eee 100%); + background-image: -moz-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eee 100%); + background-image: linear-gradient(to bottom, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eee 100%); } html[dir="rtl"] .select2-container-multi .select2-choices .select2-search-choice { - margin: 3px 5px 3px 0; - padding: 3px 18px 3px 5px; + margin: 3px 5px 3px 0; + padding: 3px 18px 3px 5px; } .select2-container-multi .select2-choices .select2-search-choice .select2-chosen { - cursor: default; + cursor: default; } .select2-container-multi .select2-choices .select2-search-choice-focus { - background: #d4d4d4; + background: #d4d4d4; } .select2-search-choice-close { - display: block; - width: 12px; - height: 13px; - position: absolute; - right: 3px; - top: 4px; + display: block; + width: 12px; + height: 13px; + position: absolute; + right: 3px; + top: 4px; - font-size: 1px; - outline: none; - background: url('select2.png') right top no-repeat; + font-size: 1px; + outline: none; + background: url('select2.png') right top no-repeat; } html[dir="rtl"] .select2-search-choice-close { - right: auto; - left: 3px; + right: auto; + left: 3px; } .select2-container-multi .select2-search-choice-close { - left: 3px; + left: 3px; } html[dir="rtl"] .select2-container-multi .select2-search-choice-close { - left: auto; - right: 2px; + left: auto; + right: 2px; } .select2-container-multi .select2-choices .select2-search-choice .select2-search-choice-close:hover { - background-position: right -11px; + background-position: right -11px; } .select2-container-multi .select2-choices .select2-search-choice-focus .select2-search-choice-close { - background-position: right -11px; + background-position: right -11px; } /* disabled styles */ .select2-container-multi.select2-container-disabled .select2-choices { - background-color: #f4f4f4; - background-image: none; - border: 1px solid #ddd; - cursor: default; + background-color: #f4f4f4; + background-image: none; + border: 1px solid #ddd; + cursor: default; } .select2-container-multi.select2-container-disabled .select2-choices .select2-search-choice { - padding: 3px 5px 3px 5px; - border: 1px solid #ddd; - background-image: none; - background-color: #f4f4f4; + padding: 3px 5px 3px 5px; + border: 1px solid #ddd; + background-image: none; + background-color: #f4f4f4; } .select2-container-multi.select2-container-disabled .select2-choices .select2-search-choice .select2-search-choice-close { display: none; - background: none; + background: none; } /* end multiselect */ .select2-result-selectable .select2-match, .select2-result-unselectable .select2-match { - text-decoration: underline; + text-decoration: underline; } .select2-offscreen, .select2-offscreen:focus { - clip: rect(0 0 0 0) !important; - width: 1px !important; - height: 1px !important; - border: 0 !important; - margin: 0 !important; - padding: 0 !important; - overflow: hidden !important; - position: absolute !important; - outline: 0 !important; - left: 0px !important; - top: 0px !important; + clip: rect(0 0 0 0) !important; + width: 1px !important; + height: 1px !important; + border: 0 !important; + margin: 0 !important; + padding: 0 !important; + overflow: hidden !important; + position: absolute !important; + outline: 0 !important; + left: 0px !important; + top: 0px !important; } .select2-display-none { - display: none; + display: none; } .select2-measure-scrollbar { - position: absolute; - top: -10000px; - left: -10000px; - width: 100px; - height: 100px; - overflow: scroll; + position: absolute; + top: -10000px; + left: -10000px; + width: 100px; + height: 100px; + overflow: scroll; } /* Retina-ize icons */ @media only screen and (-webkit-min-device-pixel-ratio: 1.5), only screen and (min-resolution: 2dppx) { - .select2-search input, - .select2-search-choice-close, - .select2-container .select2-choice abbr, - .select2-container .select2-choice .select2-arrow b { - background-image: url('select2x2.png') !important; - background-repeat: no-repeat !important; - background-size: 60px 40px !important; - } - - .select2-search input { - background-position: 100% -21px !important; - } + .select2-search input, + .select2-search-choice-close, + .select2-container .select2-choice abbr, + .select2-container .select2-choice .select2-arrow b { + background-image: url('select2x2.png') !important; + background-repeat: no-repeat !important; + background-size: 60px 40px !important; + } + + .select2-search input { + background-position: 100% -21px !important; + } } diff --git a/interface/web/themes/default/assets/stylesheets/themes/dark/theme.css b/interface/web/themes/default/assets/stylesheets/themes/dark/theme.css index 47a0285815..13c9e2d24e 100644 --- a/interface/web/themes/default/assets/stylesheets/themes/dark/theme.css +++ b/interface/web/themes/default/assets/stylesheets/themes/dark/theme.css @@ -1,169 +1,169 @@ html, body { - -webkit-tap-highlight-color: black; } +-webkit-tap-highlight-color: black; } body { - background: #101a22; - color: #dfdfdf; } + background: #101a22; +color: #dfdfdf; } .green { - color: #3cb355; } +color: #3cb355; } .form-control:focus { - border-color: #f9f1c9; } +border-color: #f9f1c9; } .formbutton-default { - background: linear-gradient(to bottom, white, #b9bbbd); - color: #101a22; } - .formbutton-default:hover { - background: linear-gradient(to bottom, #f2f2f2, #acaeb1); } + background: linear-gradient(to bottom, white, #b9bbbd); +color: #101a22; } +.formbutton-default:hover { +background: linear-gradient(to bottom, #f2f2f2, #acaeb1); } .formbutton-success { - background: linear-gradient(to bottom, #7bcc89, #6ab977); - border-color: #5aab68; - border-bottom-color: #5aab68; - color: #101a22; } - .formbutton-success:hover { - background: linear-gradient(to bottom, #69c579, #59b167); } - .formbutton-success:hover, .formbutton-success.active { - border-bottom-color: #509b5a; - color: #101a22; } + background: linear-gradient(to bottom, #7bcc89, #6ab977); + border-color: #5aab68; + border-bottom-color: #5aab68; +color: #101a22; } +.formbutton-success:hover { +background: linear-gradient(to bottom, #69c579, #59b167); } +.formbutton-success:hover, .formbutton-success.active { + border-bottom-color: #509b5a; +color: #101a22; } .formbutton-danger { - background: linear-gradient(to bottom, #c70f19, #b60008); - border-color: #980b13; - border-bottom-color: #980b13; - color: white; } - .formbutton-danger:hover { - background: linear-gradient(to bottom, #c30b15, #b20004); } - .formbutton-danger:hover, .formbutton-danger.active { - border-bottom-color: #8f0209; - color: white; } + background: linear-gradient(to bottom, #c70f19, #b60008); + border-color: #980b13; + border-bottom-color: #980b13; +color: white; } +.formbutton-danger:hover { +background: linear-gradient(to bottom, #c30b15, #b20004); } +.formbutton-danger:hover, .formbutton-danger.active { + border-bottom-color: #8f0209; +color: white; } #searchform button { - background: linear-gradient(to bottom, white, #b9bbbd); } - #searchform button:hover { - background: linear-gradient(to bottom, #f2f2f2, #acaeb1); } +background: linear-gradient(to bottom, white, #b9bbbd); } +#searchform button:hover { +background: linear-gradient(to bottom, #f2f2f2, #acaeb1); } #logout-button { - background: #c70f19; - border-bottom-color: #980b13; } - #logout-button:hover { - background: #df111c; - border-bottom-color: #800a10; } + background: #c70f19; +border-bottom-color: #980b13; } +#logout-button:hover { + background: #df111c; +border-bottom-color: #800a10; } #main-navigation a { - background: linear-gradient(to bottom, white, #b9bbbd); - border-bottom-color: #878787; } - #main-navigation a:hover { - background: linear-gradient(to bottom, #f2f2f2, #acaeb1); } - #main-navigation a:hover, #main-navigation a.active { - border-bottom-color: #6b6b6b; - color: #c70f19; } + background: linear-gradient(to bottom, white, #b9bbbd); +border-bottom-color: #878787; } +#main-navigation a:hover { +background: linear-gradient(to bottom, #f2f2f2, #acaeb1); } +#main-navigation a:hover, #main-navigation a.active { + border-bottom-color: #6b6b6b; +color: #c70f19; } #main-navigation .icon { - text-shadow: 1px 1px 1px #101a22; } +text-shadow: 1px 1px 1px #101a22; } #sidebar { - border-color: #cedded; - background: #101a22; } - #sidebar header { - background: #00313d; - color: #f9f1c9; } - #sidebar li { - border-top-color: #cedded; } - #sidebar a { - color: inherit; } - #sidebar a:hover { - color: #f2eaca; } + border-color: #cedded; +background: #101a22; } +#sidebar header { + background: #00313d; +color: #f9f1c9; } +#sidebar li { +border-top-color: #cedded; } +#sidebar a { +color: inherit; } +#sidebar a:hover { +color: #f2eaca; } .page-header { - border-color: #878787; } +border-color: #878787; } .alert-notification { - background: #00313d; - border-color: #cedded; - color: #f9f1c9; } - .alert-notification a { - color: #e8d9a1; } - .alert-notification a:hover { - color: #f2eaca; } + background: #00313d; + border-color: #cedded; +color: #f9f1c9; } +.alert-notification a { +color: #e8d9a1; } +.alert-notification a:hover { +color: #f2eaca; } .alert-danger { - background: #f7dfdf; - border-color: #dcb2b3; - color: #af797d; } + background: #f7dfdf; + border-color: #dcb2b3; +color: #af797d; } .modules li { - background: #101a22; - border-color: #d3d7da; - box-shadow: inset 1px 3px 8px -5px rgba(0, 0, 0, 0.2); } + background: #101a22; + border-color: #d3d7da; +box-shadow: inset 1px 3px 8px -5px rgba(0, 0, 0, 0.2); } .modules .button { - background: linear-gradient(to bottom, white, #b9bbbd); - border-bottom-color: #878787; } - .modules .button:hover { - background: linear-gradient(to bottom, #f2f2f2, #acaeb1); } - .modules .button:hover, .modules .button.active { - border-bottom-color: #6b6b6b; } + background: linear-gradient(to bottom, white, #b9bbbd); +border-bottom-color: #878787; } +.modules .button:hover { +background: linear-gradient(to bottom, #f2f2f2, #acaeb1); } +.modules .button:hover, .modules .button.active { +border-bottom-color: #6b6b6b; } .modules a { - color: inherit; } +color: inherit; } .table-wrapper { - background: #101a22; - border-color: #d3d7da; } + background: #101a22; +border-color: #d3d7da; } .table caption { - border-bottom-color: #d3d7da; } +border-bottom-color: #d3d7da; } .table tbody tr { - border-top-color: #d3d7da; } - .table tbody tr:nth-child(odd) { - background: #101a22; } - .table tbody tr:nth-child(even) { - background: #101a22; } - .table tbody tr:hover { - background: #00313d; } +border-top-color: #d3d7da; } +.table tbody tr:nth-child(odd) { +background: #101a22; } +.table tbody tr:nth-child(even) { +background: #101a22; } +.table tbody tr:hover { +background: #00313d; } .tfooter { - border-top-color: #d3d7da; } +border-top-color: #d3d7da; } .content-tab-wrapper { - background: #101a22; - border-color: #d3d7da; } - .content-tab-wrapper .nav-tabs { - background: #243b55; - box-shadow: inset -1px -2px 6px -5px rgba(0, 0, 0, 0.2); } - .content-tab-wrapper .nav-tabs > li > a { - border-right-color: #d3d7da !important; - color: inherit; } - .content-tab-wrapper .nav-tabs > li > a:hover { - background: #1c2f43; } - .content-tab-wrapper .nav-tabs .active a { - background: #101a22 !important; } - .content-tab-wrapper .nav-tabs .active a:focus { - color: inherit; } + background: #101a22; +border-color: #d3d7da; } +.content-tab-wrapper .nav-tabs { + background: #243b55; +box-shadow: inset -1px -2px 6px -5px rgba(0, 0, 0, 0.2); } +.content-tab-wrapper .nav-tabs > li > a { + border-right-color: #d3d7da !important; +color: inherit; } +.content-tab-wrapper .nav-tabs > li > a:hover { +background: #1c2f43; } +.content-tab-wrapper .nav-tabs .active a { +background: #101a22 !important; } +.content-tab-wrapper .nav-tabs .active a:focus { +color: inherit; } thead.dark { - background: linear-gradient(to bottom, #2b556d, #1c394e) !important; - color: #dfdfdf; } + background: linear-gradient(to bottom, #2b556d, #1c394e) !important; +color: #dfdfdf; } thead.dark tr:nth-child(2) { - background: linear-gradient(to bottom, white, #b9bbbd) !important; } +background: linear-gradient(to bottom, white, #b9bbbd) !important; } #footer { - border-top-color: #d3d7da; } +border-top-color: #d3d7da; } .pushy { - background: #101a22; } - .pushy ul.subnavi li a:hover { - background: none; } - .pushy a:hover, .pushy a.active { - background: #101a22; - color: inherit; } +background: #101a22; } +.pushy ul.subnavi li a:hover { +background: none; } +.pushy a:hover, .pushy a.active { + background: #101a22; +color: inherit; } @media screen and (max-width: 860px) { - #main-navigation a { - border-right-color: #d3d7da; - border-bottom-color: #d3d7da; } - #main-navigation a.active { - border-right-color: #d3d7da; - border-bottom-color: #d3d7da; } - #main-navigation a:hover { - border-bottom-color: #d3d7da; } } + #main-navigation a { + border-right-color: #d3d7da; + border-bottom-color: #d3d7da; } + #main-navigation a.active { + border-right-color: #d3d7da; + border-bottom-color: #d3d7da; } + #main-navigation a:hover { +border-bottom-color: #d3d7da; } } diff --git a/interface/web/themes/default/assets/stylesheets/themes/default/theme.css b/interface/web/themes/default/assets/stylesheets/themes/default/theme.css index 4ddf824de8..a016a3a395 100644 --- a/interface/web/themes/default/assets/stylesheets/themes/default/theme.css +++ b/interface/web/themes/default/assets/stylesheets/themes/default/theme.css @@ -1,172 +1,172 @@ html, body { - -webkit-tap-highlight-color: black; } +-webkit-tap-highlight-color: black; } body { - background: #f2f5f7; - color: #3c444b; } + background: #f2f5f7; +color: #3c444b; } .green { - color: #3cb355; } +color: #3cb355; } .form-control:focus { - border-color: #698296; } +border-color: #698296; } .formbutton-default { - background: linear-gradient(to bottom, white, #eef0f2); - border-bottom-color: #cccccc; - color: #3c444b; } - .formbutton-default:hover { - background: linear-gradient(to bottom, #fafafa, #e8ebee); } - .formbutton-default:hover, .formbutton-default.active { - border-bottom-color: #adadad; } + background: linear-gradient(to bottom, white, #eef0f2); + border-bottom-color: #cccccc; +color: #3c444b; } +.formbutton-default:hover { +background: linear-gradient(to bottom, #fafafa, #e8ebee); } +.formbutton-default:hover, .formbutton-default.active { +border-bottom-color: #adadad; } .formbutton-success { - background: linear-gradient(to bottom, #7bcc89, #6ab977); - border-color: #5aab68; - border-bottom-color: #5aab68; - color: white; } - .formbutton-success:hover { - background: linear-gradient(to bottom, #74c982, #63b671); } - .formbutton-success:hover, .formbutton-success.active { - border-bottom-color: #509b5a; - color: white; } + background: linear-gradient(to bottom, #7bcc89, #6ab977); + border-color: #5aab68; + border-bottom-color: #5aab68; +color: white; } +.formbutton-success:hover { +background: linear-gradient(to bottom, #74c982, #63b671); } +.formbutton-success:hover, .formbutton-success.active { + border-bottom-color: #509b5a; +color: white; } .formbutton-danger { - background: linear-gradient(to bottom, #c70f19, #b60008); - border-color: #980b13; - border-bottom-color: #980b13; - color: white; } - .formbutton-danger:hover { - background: linear-gradient(to bottom, #c30b15, #b20004); } - .formbutton-danger:hover, .formbutton-danger.active { - border-bottom-color: #8f0209; - color: white; } + background: linear-gradient(to bottom, #c70f19, #b60008); + border-color: #980b13; + border-bottom-color: #980b13; +color: white; } +.formbutton-danger:hover { +background: linear-gradient(to bottom, #c30b15, #b20004); } +.formbutton-danger:hover, .formbutton-danger.active { + border-bottom-color: #8f0209; +color: white; } #searchform button { - background: linear-gradient(to bottom, white, #eef0f2); } - #searchform button:hover { - background: linear-gradient(to bottom, #fafafa, #e8ebee); } +background: linear-gradient(to bottom, white, #eef0f2); } +#searchform button:hover { +background: linear-gradient(to bottom, #fafafa, #e8ebee); } #logout-button { - background: #c70f19; - border-bottom-color: #980b13; } - #logout-button:hover { - background: #df111c; - border-bottom-color: #800a10; } + background: #c70f19; +border-bottom-color: #980b13; } +#logout-button:hover { + background: #df111c; +border-bottom-color: #800a10; } #main-navigation a { - background: linear-gradient(to bottom, white, #eef0f2); - border-bottom-color: #cccccc; } - #main-navigation a:hover { - background: linear-gradient(to bottom, #fafafa, #e8ebee); } - #main-navigation a:hover, #main-navigation a.active { - border-bottom-color: #adadad; - color: #c70f19; } + background: linear-gradient(to bottom, white, #eef0f2); +border-bottom-color: #cccccc; } +#main-navigation a:hover { +background: linear-gradient(to bottom, #fafafa, #e8ebee); } +#main-navigation a:hover, #main-navigation a.active { + border-bottom-color: #adadad; +color: #c70f19; } #main-navigation .icon { - text-shadow: 1px 1px 1px white; } +text-shadow: 1px 1px 1px white; } #sidebar { - border-color: #cedded; - background: white; } - #sidebar header { - background: #dfeaf6; - color: #698296; } - #sidebar li { - border-top-color: #cedded; } - #sidebar a { - color: inherit; } - #sidebar a:hover { - color: #428bde; } + border-color: #cedded; +background: white; } +#sidebar header { + background: #dfeaf6; +color: #698296; } +#sidebar li { +border-top-color: #cedded; } +#sidebar a { +color: inherit; } +#sidebar a:hover { +color: #428bde; } .page-header { - border-color: #cccccc; } +border-color: #cccccc; } .alert-notification { - background: #dfeaf6; - border-color: #cedded; - color: #698296; } - .alert-notification a { - color: #2371ca; } - .alert-notification a:hover { - color: #428bde; } + background: #dfeaf6; + border-color: #cedded; +color: #698296; } +.alert-notification a { +color: #2371ca; } +.alert-notification a:hover { +color: #428bde; } .alert-danger { - background: #f7dfdf; - border-color: #dcb2b3; - color: #95686b; } + background: #f7dfdf; + border-color: #dcb2b3; +color: #95686b; } .modules li { - background: #e1e4e9; - border-color: #d3d7da; - box-shadow: inset 1px 3px 8px -5px rgba(0, 0, 0, 0.2); } + background: #e1e4e9; + border-color: #d3d7da; +box-shadow: inset 1px 3px 8px -5px rgba(0, 0, 0, 0.2); } .modules .button { - background: linear-gradient(to bottom, white, #eef0f2); - border-bottom-color: #cccccc; } - .modules .button:hover { - background: linear-gradient(to bottom, #fafafa, #e8ebee); } - .modules .button:hover, .modules .button.active { - border-bottom-color: #adadad; } + background: linear-gradient(to bottom, white, #eef0f2); +border-bottom-color: #cccccc; } +.modules .button:hover { +background: linear-gradient(to bottom, #fafafa, #e8ebee); } +.modules .button:hover, .modules .button.active { +border-bottom-color: #adadad; } .modules a { - color: inherit; } +color: inherit; } .table-wrapper { - background: white; - border-color: #d3d7da; } + background: white; +border-color: #d3d7da; } .table caption { - border-bottom-color: #d3d7da; } +border-bottom-color: #d3d7da; } .table tbody tr { - border-top-color: #d3d7da; } - .table tbody tr:nth-child(odd) { - background: #f2f5f7; } - .table tbody tr:nth-child(even) { - background: white; } - .table tbody tr:hover { - background: #dfeaf6; } +border-top-color: #d3d7da; } +.table tbody tr:nth-child(odd) { +background: #f2f5f7; } +.table tbody tr:nth-child(even) { +background: white; } +.table tbody tr:hover { +background: #dfeaf6; } .tfooter { - background: linear-gradient(to bottom, white, #eef0f2); - border-top-color: #d3d7da; } + background: linear-gradient(to bottom, white, #eef0f2); +border-top-color: #d3d7da; } .content-tab-wrapper { - background: white; - border-color: #d3d7da; } - .content-tab-wrapper .nav-tabs { - background: #eef0f2; - box-shadow: inset -1px -2px 6px -5px rgba(0, 0, 0, 0.2); } - .content-tab-wrapper .nav-tabs > li > a { - border-right-color: #d3d7da !important; - color: inherit; } - .content-tab-wrapper .nav-tabs > li > a:hover { - background: #e0e3e7; } - .content-tab-wrapper .nav-tabs .active a { - background: white !important; } + background: white; +border-color: #d3d7da; } +.content-tab-wrapper .nav-tabs { + background: #eef0f2; +box-shadow: inset -1px -2px 6px -5px rgba(0, 0, 0, 0.2); } +.content-tab-wrapper .nav-tabs > li > a { + border-right-color: #d3d7da !important; +color: inherit; } +.content-tab-wrapper .nav-tabs > li > a:hover { +background: #e0e3e7; } +.content-tab-wrapper .nav-tabs .active a { +background: white !important; } thead.dark { - background: linear-gradient(to bottom, #57646d, #3e474e) !important; - color: white; } + background: linear-gradient(to bottom, #57646d, #3e474e) !important; +color: white; } thead.dark tr:nth-child(2) { - background: linear-gradient(to bottom, #FAFAFA, #E8EBEE) !important; } +background: linear-gradient(to bottom, #FAFAFA, #E8EBEE) !important; } #footer { - border-top-color: #d3d7da; } +border-top-color: #d3d7da; } .pushy { - background: #f2f5f7; } - .pushy ul.subnavi li a:hover { - background: none; } - .pushy a:hover, .pushy a.active { - background: #f2f5f7; - color: inherit; } +background: #f2f5f7; } +.pushy ul.subnavi li a:hover { +background: none; } +.pushy a:hover, .pushy a.active { + background: #f2f5f7; +color: inherit; } @media screen and (max-width: 860px) { - #main-navigation a { - border-right-color: #d3d7da; - border-bottom-color: #d3d7da; } - #main-navigation a.active { - border-right-color: #d3d7da; - border-bottom-color: #d3d7da; } - #main-navigation a:hover { - border-bottom-color: #d3d7da; } } + #main-navigation a { + border-right-color: #d3d7da; + border-bottom-color: #d3d7da; } + #main-navigation a.active { + border-right-color: #d3d7da; + border-bottom-color: #d3d7da; } + #main-navigation a:hover { +border-bottom-color: #d3d7da; } } diff --git a/remoting_client/API-docs/definitionen.css b/remoting_client/API-docs/definitionen.css index 6c4bde1b07..7ad8fda613 100644 --- a/remoting_client/API-docs/definitionen.css +++ b/remoting_client/API-docs/definitionen.css @@ -1,61 +1,61 @@ .command { - padding: 1em; - border: 1px dashed #2f6fab; - color: black; - background-color: #f9f9f9; - line-height: 1.1em; - font-family: Courier New, Courier, mono; - font-size: 12px; - font-style: italic; + padding: 1em; + border: 1px dashed #2f6fab; + color: black; + background-color: #f9f9f9; + line-height: 1.1em; + font-family: Courier New, Courier, mono; + font-size: 12px; + font-style: italic; } .system { - color: black; - font-family: Courier New, Courier, mono; - font-size: 12px; - font-style: italic; + color: black; + font-family: Courier New, Courier, mono; + font-size: 12px; + font-style: italic; } .highlight { - color: #FF0000; + color: #FF0000; font-family: Georgia, "Times New Roman", Times, serif; font-size: 12px; text-decoration: underline; } .headdescr { - color: black; + color: black; font-weight: bold; } .headinput { - color: black; + color: black; font-weight: bold; } .headparams { - color: black; + color: black; font-weight: bold; } .headoutput { - color: black; + color: black; font-weight: bold; } .headgrp { - color: black; + color: black; font-weight: bold; } .var { - color: #A17FFF; + color: #A17FFF; } .margin { - margin-left: 100px; + margin-left: 100px; } .paratype { - color: #2B8A60; + color: #2B8A60; } From 0693e8bc3577dbdfdefa80196df1513bf4fd0a50 Mon Sep 17 00:00:00 2001 From: Till Brehm Date: Wed, 17 May 2023 11:16:00 +0000 Subject: [PATCH 149/621] Update firewall_plugin.inc.php --- server/plugins-available/firewall_plugin.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/plugins-available/firewall_plugin.inc.php b/server/plugins-available/firewall_plugin.inc.php index 3545f573ee..c81cfd6d03 100644 --- a/server/plugins-available/firewall_plugin.inc.php +++ b/server/plugins-available/firewall_plugin.inc.php @@ -38,7 +38,7 @@ class firewall_plugin { public function onInstall() { global $conf; - if((isset($conf['bastille']['installed']) && $conf['bastille']['installed'] == true || isset($conf['ufw']['installed']) && $conf['ufw']['installed'] == true || isset($conf['firewall']['installed']) && $conf['firewall']['installed'] == true || isset($conf['services']['firewall']) && $conf['services']['firewall'] == true)) { + if((isset($conf['bastille']['installed']) && $conf['bastille']['installed'] == true) || (isset($conf['ufw']['installed']) && $conf['ufw']['installed'] == true) || (isset($conf['firewall']['installed']) && $conf['firewall']['installed'] == true) || (isset($conf['services']['firewall']) && $conf['services']['firewall'] == true)) { return true; } else { return false; From 9856af94c05654fe38d7d3f2339ba62799db4084 Mon Sep 17 00:00:00 2001 From: Till Brehm Date: Thu, 18 May 2023 06:55:26 +0000 Subject: [PATCH 150/621] Fixes #6504 wrong group ID in dns zone import --- interface/web/dns/dns_import.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/interface/web/dns/dns_import.php b/interface/web/dns/dns_import.php index 711e237db1..a229f3956b 100644 --- a/interface/web/dns/dns_import.php +++ b/interface/web/dns/dns_import.php @@ -58,7 +58,11 @@ // import variables $template_id = (isset($_POST['template_id']))?$app->functions->intval($_POST['template_id']):0; -$sys_groupid = (isset($_POST['client_group_id']))?$app->functions->intval($_POST['client_group_id']):0; +if (isset($_POST['client_group_id'])) { + $sys_groupid = $app->functions->intval($_POST['client_group_id']); +} else { + $sys_groupid = $_SESSION["s"]["user"]["default_group"]; +} $domain = (isset($_POST['domain'])&&!empty($_POST['domain']))?$_POST['domain']:NULL; // get the correct server_id From 4c6e5e06b7bb73e7a53418ed0372aa7fb5658d65 Mon Sep 17 00:00:00 2001 From: Herman van Rink Date: Thu, 18 May 2023 22:01:18 +0200 Subject: [PATCH 151/621] Grant dbmaster privileges on server_php, #6466 --- install/lib/installer_base.lib.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php index 482a8444bf..fb84be14ff 100644 --- a/install/lib/installer_base.lib.php +++ b/install/lib/installer_base.lib.php @@ -812,6 +812,14 @@ public function grant_master_database_rights($verbose = false) { $this->warning('Unable to set rights of user in master database: '.$value['db']."\n Query: ".$query."\n Error: ".$this->dbmaster->errorMessage); } + $query = "GRANT SELECT, INSERT ON ?? TO ?@?"; + if ($verbose){ + echo $query ."\n"; + } + if(!$this->dbmaster->query($query, $value['db'] . '.server_php', $value['user'], $host)) { + $this->warning('Unable to set rights of user in master database: '.$value['db']."\n Query: ".$query."\n Error: ".$this->dbmaster->errorMessage); + } + } } From dd5065080549b73a404c5f66d64456e636de344f Mon Sep 17 00:00:00 2001 From: Till Date: Fri, 19 May 2023 19:32:08 +0200 Subject: [PATCH 152/621] Add MySQL version check in installer and updater. --- install/install.php | 3 +++ install/lib/installer_base.lib.php | 23 +++++++++++++++++++++++ install/update.php | 3 +++ 3 files changed, 29 insertions(+) diff --git a/install/install.php b/install/install.php index 64d05feecd..114410b53c 100644 --- a/install/install.php +++ b/install/install.php @@ -252,6 +252,9 @@ include_once 'lib/mysql.lib.php'; $inst->db = new db(); +//* Check MySQL version +$inst->check_mysql_version(); + //** Begin with standard or expert installation $conf['services']['mail'] = false; diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php index fb84be14ff..06b7a411db 100644 --- a/install/lib/installer_base.lib.php +++ b/install/lib/installer_base.lib.php @@ -262,6 +262,29 @@ public function check_prerequisites() { if($msg != '') die($msg); } + //** Check MySQL version + public function check_mysql_version() { + global $conf; + + $min_mariadb_version = '10.0.5'; + $min_mysql_version = '8.0.0'; + + $rec = $this->db->queryOneRecord('SELECT VERSION() as mysql_version;'); + $version = if(is_array($rec))? $rec['mysql_version']: '0'; + + if(strpos($version,'MariaDB')) { + // We have MariaDB + $parts = explode('-',$version); + $version = $parts[0]; + if(version_compare($version, $min_mariadb_version, '<')) die("Minimum required MariaDB version is ".$min_mariadb_version."\n"); + } else { + // we have MySQL + if(version_compare($version, $min_mysql_version, '<')) die("Minimum required MySQL version is ".$min_mysql_version."\n"); + } + + + } + public function force_configure_app($service, $enable_force=true) { $force = false; if(AUTOINSTALL == true) return false; diff --git a/install/update.php b/install/update.php index 6047b7b930..e03b5d9de1 100644 --- a/install/update.php +++ b/install/update.php @@ -274,6 +274,9 @@ $inst->db->setDBData($conf['mysql']["host"], $conf['mysql']["ispconfig_user"], $conf['mysql']["ispconfig_password"], $conf['mysql']["port"]); $inst->db->setDBName($conf['mysql']['database']); +//* Check MySQL version +$inst->check_mysql_version(); + //* initialize the master DB, if we have a multiserver setup if($conf['mysql']['master_slave_setup'] == 'y') { From ccb442f814a185bd761774ef0a69cf29cb69eed1 Mon Sep 17 00:00:00 2001 From: Till Date: Fri, 19 May 2023 19:42:32 +0200 Subject: [PATCH 153/621] Fixed typo. --- install/lib/installer_base.lib.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php index 06b7a411db..d45e3e52ce 100644 --- a/install/lib/installer_base.lib.php +++ b/install/lib/installer_base.lib.php @@ -267,10 +267,10 @@ public function check_mysql_version() { global $conf; $min_mariadb_version = '10.0.5'; - $min_mysql_version = '8.0.0'; + $min_mysql_version = '8.0.4'; $rec = $this->db->queryOneRecord('SELECT VERSION() as mysql_version;'); - $version = if(is_array($rec))? $rec['mysql_version']: '0'; + $version = (is_array($rec))? $rec['mysql_version']: '0'; if(strpos($version,'MariaDB')) { // We have MariaDB From 9f0339e998c730fc253bb79ac2a67af50bca6968 Mon Sep 17 00:00:00 2001 From: Till Date: Sun, 21 May 2023 22:15:14 +0200 Subject: [PATCH 154/621] Improved MySQL version check. --- install/lib/installer_base.lib.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php index d45e3e52ce..b5f538d3ce 100644 --- a/install/lib/installer_base.lib.php +++ b/install/lib/installer_base.lib.php @@ -269,8 +269,12 @@ public function check_mysql_version() { $min_mariadb_version = '10.0.5'; $min_mysql_version = '8.0.4'; - $rec = $this->db->queryOneRecord('SELECT VERSION() as mysql_version;'); - $version = (is_array($rec))? $rec['mysql_version']: '0'; + $rec = $this->db->queryOneRecord('SELECT VERSION() as mysql_version'); + if(is_array($rec)) { + $version = $rec['mysql_version'] + } else { + die("Unable to get MySQL version\n"); + } if(strpos($version,'MariaDB')) { // We have MariaDB From ed4f50bd09dd641c9052514880e39d3f7fe2072e Mon Sep 17 00:00:00 2001 From: Till Date: Mon, 22 May 2023 12:40:15 +0200 Subject: [PATCH 155/621] Fixed typo --- install/lib/installer_base.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php index b5f538d3ce..654559a3b0 100644 --- a/install/lib/installer_base.lib.php +++ b/install/lib/installer_base.lib.php @@ -271,7 +271,7 @@ public function check_mysql_version() { $rec = $this->db->queryOneRecord('SELECT VERSION() as mysql_version'); if(is_array($rec)) { - $version = $rec['mysql_version'] + $version = $rec['mysql_version']; } else { die("Unable to get MySQL version\n"); } From 4d302738d499c71819e6e218944a73aff55cdb21 Mon Sep 17 00:00:00 2001 From: Branislav Viest Date: Tue, 23 May 2023 11:53:22 +0200 Subject: [PATCH 156/621] Configure Default mysql remote server regardless where website and database are created --- interface/web/sites/database_edit.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/interface/web/sites/database_edit.php b/interface/web/sites/database_edit.php index 55c582eeda..ccaf4a500e 100644 --- a/interface/web/sites/database_edit.php +++ b/interface/web/sites/database_edit.php @@ -388,6 +388,14 @@ function onBeforeUpdate() { } } } + } else { + // Add default remote_ips from Main Configuration. + $remote_ips = explode(",", $global_config['default_remote_dbserver']); + + if($this->dataRecord['remote_access'] != 'y'){ + $this->dataRecord['remote_ips'] = implode(',', $remote_ips); + $this->dataRecord['remote_access'] = 'y'; + } } if ($app->tform->errorMessage == '') { @@ -478,6 +486,14 @@ function onBeforeInsert() { } } } + } else { + // Add default remote_ips from Main Configuration. + $remote_ips = explode(",", $global_config['default_remote_dbserver']); + + if($this->dataRecord['remote_access'] != 'y'){ + $this->dataRecord['remote_ips'] = implode(',', $remote_ips); + $this->dataRecord['remote_access'] = 'y'; + } } if ($app->tform->errorMessage == '') { From e1adb40d456148fcce40b510a55dcfb5a69eb879 Mon Sep 17 00:00:00 2001 From: Branislav Viest Date: Tue, 23 May 2023 11:59:47 +0200 Subject: [PATCH 157/621] Added check if default configuration is set --- interface/web/sites/database_edit.php | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/interface/web/sites/database_edit.php b/interface/web/sites/database_edit.php index ccaf4a500e..528ec444ed 100644 --- a/interface/web/sites/database_edit.php +++ b/interface/web/sites/database_edit.php @@ -389,12 +389,14 @@ function onBeforeUpdate() { } } } else { - // Add default remote_ips from Main Configuration. - $remote_ips = explode(",", $global_config['default_remote_dbserver']); + if(!empty($global_config['default_remote_dbserver'])) { + // Add default remote_ips from Main Configuration. + $remote_ips = explode(",", $global_config['default_remote_dbserver']); - if($this->dataRecord['remote_access'] != 'y'){ - $this->dataRecord['remote_ips'] = implode(',', $remote_ips); - $this->dataRecord['remote_access'] = 'y'; + if($this->dataRecord['remote_access'] != 'y'){ + $this->dataRecord['remote_ips'] = implode(',', $remote_ips); + $this->dataRecord['remote_access'] = 'y'; + } } } @@ -487,12 +489,14 @@ function onBeforeInsert() { } } } else { - // Add default remote_ips from Main Configuration. - $remote_ips = explode(",", $global_config['default_remote_dbserver']); + if(!empty($global_config['default_remote_dbserver'])) { + // Add default remote_ips from Main Configuration. + $remote_ips = explode(",", $global_config['default_remote_dbserver']); - if($this->dataRecord['remote_access'] != 'y'){ - $this->dataRecord['remote_ips'] = implode(',', $remote_ips); - $this->dataRecord['remote_access'] = 'y'; + if($this->dataRecord['remote_access'] != 'y'){ + $this->dataRecord['remote_ips'] = implode(',', $remote_ips); + $this->dataRecord['remote_access'] = 'y'; + } } } From 6edcf11ce42d69d308e13910d74edf5832b88504 Mon Sep 17 00:00:00 2001 From: Johannes Koschier Date: Tue, 23 May 2023 18:50:37 +0000 Subject: [PATCH 158/621] 6509_double_key_in_lang_file --- interface/web/admin/lib/lang/it_system_config.lng | 1 - 1 file changed, 1 deletion(-) diff --git a/interface/web/admin/lib/lang/it_system_config.lng b/interface/web/admin/lib/lang/it_system_config.lng index 6917b0232e..bdff687eb5 100644 --- a/interface/web/admin/lib/lang/it_system_config.lng +++ b/interface/web/admin/lib/lang/it_system_config.lng @@ -105,7 +105,6 @@ $wb['show_support_messages_txt'] = 'Mostra la funzione messaggio nel modulo Help $wb['show_aps_menu_txt'] = 'Mostra menu APS'; $wb['show_aps_menu_note_txt'] = 'APS saranno rimosse dal pannello in un prossimo futuro.'; $wb['show_aps_menu_note_url_txt'] = 'Clicca qui per maggiori informazioni.'; -$wb['show_aps_menu_note_url_txt'] = 'Click here for more information.'; $wb['dns_show_zoneexport_txt'] = 'Show zone export.'; $wb['le_caa_autocreate_options_txt'] = 'Enable automatic creation of CAA record on issuing LE'; $wb['show_delete_on_forms_txt'] = 'Show delete button on edit forms'; From d0e2edb44114f4d130e2990110ec8c9639ed0e4e Mon Sep 17 00:00:00 2001 From: Till Date: Wed, 24 May 2023 11:50:04 +0200 Subject: [PATCH 159/621] Add menu.d directories. --- interface/web/client/lib/menu.d/empty.dir | 0 interface/web/dns/lib/menu.d/empty.dir | 0 interface/web/help/lib/menu.d/empty.dir | 0 interface/web/mail/lib/menu.d/empty.dir | 0 interface/web/mailuser/lib/menu.d/empty.dir | 0 interface/web/monitor/lib/menu.d/empty.dir | 0 interface/web/sites/lib/menu.d/empty.dir | 0 interface/web/vm/lib/menu.d/empty.dir | 0 8 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 interface/web/client/lib/menu.d/empty.dir create mode 100644 interface/web/dns/lib/menu.d/empty.dir create mode 100644 interface/web/help/lib/menu.d/empty.dir create mode 100644 interface/web/mail/lib/menu.d/empty.dir create mode 100644 interface/web/mailuser/lib/menu.d/empty.dir create mode 100644 interface/web/monitor/lib/menu.d/empty.dir create mode 100644 interface/web/sites/lib/menu.d/empty.dir create mode 100644 interface/web/vm/lib/menu.d/empty.dir diff --git a/interface/web/client/lib/menu.d/empty.dir b/interface/web/client/lib/menu.d/empty.dir new file mode 100644 index 0000000000..e69de29bb2 diff --git a/interface/web/dns/lib/menu.d/empty.dir b/interface/web/dns/lib/menu.d/empty.dir new file mode 100644 index 0000000000..e69de29bb2 diff --git a/interface/web/help/lib/menu.d/empty.dir b/interface/web/help/lib/menu.d/empty.dir new file mode 100644 index 0000000000..e69de29bb2 diff --git a/interface/web/mail/lib/menu.d/empty.dir b/interface/web/mail/lib/menu.d/empty.dir new file mode 100644 index 0000000000..e69de29bb2 diff --git a/interface/web/mailuser/lib/menu.d/empty.dir b/interface/web/mailuser/lib/menu.d/empty.dir new file mode 100644 index 0000000000..e69de29bb2 diff --git a/interface/web/monitor/lib/menu.d/empty.dir b/interface/web/monitor/lib/menu.d/empty.dir new file mode 100644 index 0000000000..e69de29bb2 diff --git a/interface/web/sites/lib/menu.d/empty.dir b/interface/web/sites/lib/menu.d/empty.dir new file mode 100644 index 0000000000..e69de29bb2 diff --git a/interface/web/vm/lib/menu.d/empty.dir b/interface/web/vm/lib/menu.d/empty.dir new file mode 100644 index 0000000000..e69de29bb2 From 1ef818a1e1b7c2bac97c4842973a20c4e8f73209 Mon Sep 17 00:00:00 2001 From: Till Date: Thu, 25 May 2023 17:57:22 +0200 Subject: [PATCH 160/621] Change required MySQL version for CentOS 7 --- install/lib/installer_base.lib.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php index 654559a3b0..a70e6b01e9 100644 --- a/install/lib/installer_base.lib.php +++ b/install/lib/installer_base.lib.php @@ -267,7 +267,8 @@ public function check_mysql_version() { global $conf; $min_mariadb_version = '10.0.5'; - $min_mysql_version = '8.0.4'; + // Set MySQL version to 8.0.4 after CentOS 7 support ended to allow preg_* functions in SQL queries + $min_mysql_version = '5.5'; $rec = $this->db->queryOneRecord('SELECT VERSION() as mysql_version'); if(is_array($rec)) { From 90a7d000cd41cbaad35c031ae019875ca0b69bce Mon Sep 17 00:00:00 2001 From: Till Date: Thu, 25 May 2023 18:07:17 +0200 Subject: [PATCH 161/621] Show MySQL and MariaDB version during installation and update. --- install/lib/installer_base.lib.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php index a70e6b01e9..b42aa6b78a 100644 --- a/install/lib/installer_base.lib.php +++ b/install/lib/installer_base.lib.php @@ -281,9 +281,11 @@ public function check_mysql_version() { // We have MariaDB $parts = explode('-',$version); $version = $parts[0]; + swriteln("MariaDB version ".$version); if(version_compare($version, $min_mariadb_version, '<')) die("Minimum required MariaDB version is ".$min_mariadb_version."\n"); } else { // we have MySQL + swriteln("MySQL version ".$version); if(version_compare($version, $min_mysql_version, '<')) die("Minimum required MySQL version is ".$min_mysql_version."\n"); } From d092bacdc3b6bc8c9c14fed9e09e3394d8c4c13f Mon Sep 17 00:00:00 2001 From: Till Brehm Date: Thu, 25 May 2023 16:19:26 +0000 Subject: [PATCH 162/621] Handle value conversion for mailbox_soft_delete in PHP code --- server/lib/classes/cron.d/500-clean_mailboxes.inc.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/server/lib/classes/cron.d/500-clean_mailboxes.inc.php b/server/lib/classes/cron.d/500-clean_mailboxes.inc.php index 2b6d073a98..4f6283aae4 100755 --- a/server/lib/classes/cron.d/500-clean_mailboxes.inc.php +++ b/server/lib/classes/cron.d/500-clean_mailboxes.inc.php @@ -115,6 +115,12 @@ private function purge_soft_deleted_maildir() { global $app, $conf; $mail_config = $app->getconf->get_server_config($conf["server_id"], 'mail'); + // Convert olf values in mailbox_soft_delete field + if(isset($mail_config['mailbox_soft_delete']) && $mail_config['mailbox_soft_delete'] == 'n') $mail_config['mailbox_soft_delete'] = 0; + if(isset($mail_config['mailbox_soft_delete']) && $mail_config['mailbox_soft_delete'] == 'y') $mail_config['mailbox_soft_delete'] = 7; + $mail_config['mailbox_soft_delete'] = intval($mail_config['mailbox_soft_delete']); + + if ($mail_config['mailbox_soft_delete'] > 0) { $matched_dirs = glob($mail_config['homedir_path'] . "/*/[a-z0-9.-]*-deleted-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]"); From 06b03444926b9ecfc47e3556d04968a515e27c9a Mon Sep 17 00:00:00 2001 From: Till Brehm Date: Thu, 25 May 2023 16:21:38 +0000 Subject: [PATCH 163/621] Update upd_dev_collection.sql to remove regex mysql functions that will fail on older MySQL versions. --- install/sql/incremental/upd_dev_collection.sql | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install/sql/incremental/upd_dev_collection.sql b/install/sql/incremental/upd_dev_collection.sql index cec31dae2c..bb81a3c18c 100644 --- a/install/sql/incremental/upd_dev_collection.sql +++ b/install/sql/incremental/upd_dev_collection.sql @@ -8,5 +8,5 @@ UPDATE `dns_ssl_ca` SET `ca_name` = 'Sectigo (formerly Comodo CA)' WHERE `ca_iss -- not updating the dns_rr table to change all CAA records that have comodo.com / comodoca.com - we should not touch users records imo - TP -- #6445 Update the mailbox_soft_delete config option to it's new structure. -UPDATE server SET config=REGEXP_REPLACE(config, 'mailbox_soft_delete=n', 'mailbox_soft_delete=0') WHERE config LIKE '%mailbox_soft_delete=n%' -UPDATE server SET config=REGEXP_REPLACE(config, 'mailbox_soft_delete=y', 'mailbox_soft_delete=7') WHERE config LIKE '%mailbox_soft_delete=y%' +-- UPDATE server SET config=REGEXP_REPLACE(config, 'mailbox_soft_delete=n', 'mailbox_soft_delete=0') WHERE config LIKE '%mailbox_soft_delete=n%' +-- UPDATE server SET config=REGEXP_REPLACE(config, 'mailbox_soft_delete=y', 'mailbox_soft_delete=7') WHERE config LIKE '%mailbox_soft_delete=y%' From 70c4945c6eac2dc3528c25acc47bb624a2e0653f Mon Sep 17 00:00:00 2001 From: Herman van Rink Date: Thu, 25 May 2023 19:09:38 +0200 Subject: [PATCH 164/621] typo + whitespace --- server/lib/classes/cron.d/500-clean_mailboxes.inc.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/server/lib/classes/cron.d/500-clean_mailboxes.inc.php b/server/lib/classes/cron.d/500-clean_mailboxes.inc.php index 4f6283aae4..f05cb7a3d4 100755 --- a/server/lib/classes/cron.d/500-clean_mailboxes.inc.php +++ b/server/lib/classes/cron.d/500-clean_mailboxes.inc.php @@ -31,8 +31,8 @@ class cronjob_clean_mailboxes extends cronjob { // should run before quota notify and backup - // quota notify and backup is both '0 0 * * *' - + // quota notify and backup is both '0 0 * * *' + // job schedule protected $_schedule = '00 22 * * *'; @@ -77,7 +77,7 @@ private function purge_junk_thrash() { WHERE maildir_format = 'maildir' AND disableimap = 'n' AND server_id = ? AND (purge_trash_days > 0 OR purge_junk_days > 0)", $server_id); - + if(is_array($records) && !empty($records)) { foreach($records as $email) { @@ -115,12 +115,11 @@ private function purge_soft_deleted_maildir() { global $app, $conf; $mail_config = $app->getconf->get_server_config($conf["server_id"], 'mail'); - // Convert olf values in mailbox_soft_delete field + // Convert old values in mailbox_soft_delete field. if(isset($mail_config['mailbox_soft_delete']) && $mail_config['mailbox_soft_delete'] == 'n') $mail_config['mailbox_soft_delete'] = 0; if(isset($mail_config['mailbox_soft_delete']) && $mail_config['mailbox_soft_delete'] == 'y') $mail_config['mailbox_soft_delete'] = 7; $mail_config['mailbox_soft_delete'] = intval($mail_config['mailbox_soft_delete']); - if ($mail_config['mailbox_soft_delete'] > 0) { $matched_dirs = glob($mail_config['homedir_path'] . "/*/[a-z0-9.-]*-deleted-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]"); From a4aab7f0dd5e914b8a4690ec61920dd495d5519c Mon Sep 17 00:00:00 2001 From: Till Brehm Date: Thu, 25 May 2023 17:15:41 +0000 Subject: [PATCH 165/621] Update 500-clean_mailboxes.inc.php --- .../cron.d/500-clean_mailboxes.inc.php | 31 ++++++++++--------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/server/lib/classes/cron.d/500-clean_mailboxes.inc.php b/server/lib/classes/cron.d/500-clean_mailboxes.inc.php index f05cb7a3d4..6a275db85a 100755 --- a/server/lib/classes/cron.d/500-clean_mailboxes.inc.php +++ b/server/lib/classes/cron.d/500-clean_mailboxes.inc.php @@ -31,8 +31,8 @@ class cronjob_clean_mailboxes extends cronjob { // should run before quota notify and backup - // quota notify and backup is both '0 0 * * *' - + // quota notify and backup is both '0 0 * * *' + // job schedule protected $_schedule = '00 22 * * *'; @@ -77,7 +77,7 @@ private function purge_junk_thrash() { WHERE maildir_format = 'maildir' AND disableimap = 'n' AND server_id = ? AND (purge_trash_days > 0 OR purge_junk_days > 0)", $server_id); - + if(is_array($records) && !empty($records)) { foreach($records as $email) { @@ -115,22 +115,25 @@ private function purge_soft_deleted_maildir() { global $app, $conf; $mail_config = $app->getconf->get_server_config($conf["server_id"], 'mail'); - // Convert old values in mailbox_soft_delete field. + // Convert old values in mailbox_soft_delete field if(isset($mail_config['mailbox_soft_delete']) && $mail_config['mailbox_soft_delete'] == 'n') $mail_config['mailbox_soft_delete'] = 0; if(isset($mail_config['mailbox_soft_delete']) && $mail_config['mailbox_soft_delete'] == 'y') $mail_config['mailbox_soft_delete'] = 7; $mail_config['mailbox_soft_delete'] = intval($mail_config['mailbox_soft_delete']); + if ($mail_config['mailbox_soft_delete'] > 0) { - $matched_dirs = glob($mail_config['homedir_path'] . "/*/[a-z0-9.-]*-deleted-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]"); - - if (!empty($matched_dirs)) { - $delay_days = $mail_config['mailbox_soft_delete']; - foreach($matched_dirs as $dir) { - if (is_dir($dir)) { - $mtime = filemtime($dir); - if ($mtime < strtotime("-$delay_days days")) { - // do remove - $app->system->exec_safe('rm -rf ?', $dir); + if(isset($mail_config['homedir_path']) || strlen($mail_config['homedir_path']) > 4) { + $matched_dirs = glob($mail_config['homedir_path'] . "/*/[a-z0-9.-]*-deleted-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]"); + + if (!empty($matched_dirs)) { + $delay_days = $mail_config['mailbox_soft_delete']; + foreach($matched_dirs as $dir) { + if (is_dir($dir)) { + $mtime = filemtime($dir); + if ($mtime < strtotime("-$delay_days days")) { + // do remove + $app->system->exec_safe('sudo -u vmail rm -rf ?', $dir); + } } } } From f49bbf8204c929fc022d654dd1afd60d5cdc0015 Mon Sep 17 00:00:00 2001 From: Till Brehm Date: Thu, 25 May 2023 17:26:09 +0000 Subject: [PATCH 166/621] Update 500-clean_mailboxes.inc.php --- server/lib/classes/cron.d/500-clean_mailboxes.inc.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server/lib/classes/cron.d/500-clean_mailboxes.inc.php b/server/lib/classes/cron.d/500-clean_mailboxes.inc.php index 6a275db85a..b5e3db4425 100755 --- a/server/lib/classes/cron.d/500-clean_mailboxes.inc.php +++ b/server/lib/classes/cron.d/500-clean_mailboxes.inc.php @@ -128,7 +128,8 @@ private function purge_soft_deleted_maildir() { if (!empty($matched_dirs)) { $delay_days = $mail_config['mailbox_soft_delete']; foreach($matched_dirs as $dir) { - if (is_dir($dir)) { + $owner = posix_getpwuid(fileowner($dir)) + if (is_dir($dir) && is_array($owner) && $owner['name'] = 'vmail') { $mtime = filemtime($dir); if ($mtime < strtotime("-$delay_days days")) { // do remove From e613c7ae70d7a392c05cdee0087655821edf591d Mon Sep 17 00:00:00 2001 From: Till Brehm Date: Thu, 25 May 2023 17:27:36 +0000 Subject: [PATCH 167/621] Update 500-clean_mailboxes.inc.php --- server/lib/classes/cron.d/500-clean_mailboxes.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/lib/classes/cron.d/500-clean_mailboxes.inc.php b/server/lib/classes/cron.d/500-clean_mailboxes.inc.php index b5e3db4425..0d51e533e4 100755 --- a/server/lib/classes/cron.d/500-clean_mailboxes.inc.php +++ b/server/lib/classes/cron.d/500-clean_mailboxes.inc.php @@ -129,7 +129,7 @@ private function purge_soft_deleted_maildir() { $delay_days = $mail_config['mailbox_soft_delete']; foreach($matched_dirs as $dir) { $owner = posix_getpwuid(fileowner($dir)) - if (is_dir($dir) && is_array($owner) && $owner['name'] = 'vmail') { + if (is_dir($dir) && is_array($owner) && $owner['name'] == 'vmail') { $mtime = filemtime($dir); if ($mtime < strtotime("-$delay_days days")) { // do remove From c91b5fb836d9b1963cfa910a0616e6fe2a77a4a3 Mon Sep 17 00:00:00 2001 From: Till Date: Thu, 25 May 2023 20:10:45 +0200 Subject: [PATCH 168/621] Do not show DKIM key in split format --- interface/web/mail/mail_domain_edit.php | 9 ++++++--- interface/web/mail/templates/mail_domain_edit.htm | 3 ++- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/interface/web/mail/mail_domain_edit.php b/interface/web/mail/mail_domain_edit.php index f17f74e012..badeb67d45 100644 --- a/interface/web/mail/mail_domain_edit.php +++ b/interface/web/mail/mail_domain_edit.php @@ -245,9 +245,12 @@ function onShowEnd() { $rec = $app->db->queryOneRecord($sql, $app->functions->intval($_GET['id'])); $dns_key = str_replace(array('-----BEGIN PUBLIC KEY-----','-----END PUBLIC KEY-----',"\r","\n"),'',$rec['dkim_public']); - $keyparts = str_split('v=DKIM1; t=s; p=' . $dns_key, 200); - array_walk($keyparts, function(&$value, $key) { $value = '"'.$value.'"'; } ); - $dkim_txt = implode('', $keyparts); + /* we do not show split DKIM key anymore + $keyparts = str_split('v=DKIM1; t=s; p=' . $dns_key, 200); + array_walk($keyparts, function(&$value, $key) { $value = '"'.$value.'"'; } ); + $dkim_txt = implode('', $keyparts); + */ + $dkim_txt = '"v=DKIM1; t=s; p=' . $dns_key . '"'; $dns_record = $rec['dkim_selector'] . '._domainkey.' . $rec['domain'] . '. 3600 IN TXT '.$dkim_txt; diff --git a/interface/web/mail/templates/mail_domain_edit.htm b/interface/web/mail/templates/mail_domain_edit.htm index 3486dcfff2..9e69bd723a 100644 --- a/interface/web/mail/templates/mail_domain_edit.htm +++ b/interface/web/mail/templates/mail_domain_edit.htm @@ -157,7 +157,8 @@ type : "create_dkim" }, function(data) { var dkim_txt = 'v=DKIM1; t=s; p=' + data['dns_record'].replace(/(\r\n|\n|\r)/gm, ""); - var dns=data['dkim_selector'] + '._domainkey.' + data['domain'] + '. 3600 IN TXT ' + dkim_txt.match(new RegExp('.{1,' + '200' + '}', 'g')).map(chunk => '"' + chunk + '"').join(''); + //var dns=data['dkim_selector'] + '._domainkey.' + data['domain'] + '. 3600 IN TXT ' + dkim_txt.match(new RegExp('.{1,' + '200' + '}', 'g')).map(chunk => '"' + chunk + '"').join(''); + var dns=data['dkim_selector'] + '._domainkey.' + data['domain'] + '. 3600 IN TXT "' + dkim_txt + '"'; $("#dkim_selector").val(data.dkim_selector); $("#dkim_public").val(data.dkim_public); From 046ba49f9fa82f1100e4f576bcc283c43a526a6a Mon Sep 17 00:00:00 2001 From: Till Brehm Date: Thu, 25 May 2023 18:11:57 +0000 Subject: [PATCH 169/621] Update 500-clean_mailboxes.inc.php --- server/lib/classes/cron.d/500-clean_mailboxes.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/lib/classes/cron.d/500-clean_mailboxes.inc.php b/server/lib/classes/cron.d/500-clean_mailboxes.inc.php index 0d51e533e4..a1a053fcca 100755 --- a/server/lib/classes/cron.d/500-clean_mailboxes.inc.php +++ b/server/lib/classes/cron.d/500-clean_mailboxes.inc.php @@ -128,7 +128,7 @@ private function purge_soft_deleted_maildir() { if (!empty($matched_dirs)) { $delay_days = $mail_config['mailbox_soft_delete']; foreach($matched_dirs as $dir) { - $owner = posix_getpwuid(fileowner($dir)) + $owner = posix_getpwuid(fileowner($dir)); if (is_dir($dir) && is_array($owner) && $owner['name'] == 'vmail') { $mtime = filemtime($dir); if ($mtime < strtotime("-$delay_days days")) { From 3b58a802d9228ebc398cbd58236a142e7fcca81f Mon Sep 17 00:00:00 2001 From: Till Date: Fri, 26 May 2023 09:36:43 +0200 Subject: [PATCH 170/621] Moved sql dev collection do upd_0098.sql --- install/sql/incremental/upd_0098.sql | 11 +++++++++++ install/sql/incremental/upd_dev_collection.sql | 11 ----------- 2 files changed, 11 insertions(+), 11 deletions(-) create mode 100644 install/sql/incremental/upd_0098.sql diff --git a/install/sql/incremental/upd_0098.sql b/install/sql/incremental/upd_0098.sql new file mode 100644 index 0000000000..31f045a6f9 --- /dev/null +++ b/install/sql/incremental/upd_0098.sql @@ -0,0 +1,11 @@ +ALTER TABLE `mail_user` CHANGE `quota` `quota` BIGINT(20) NOT NULL DEFAULT '0'; +ALTER TABLE `server_php` ADD `sortprio` INT(20) NOT NULL DEFAULT '100' AFTER `active`; +ALTER TABLE `mail_user` ADD COLUMN `imap_prefix` varchar(255) NULL default NULL AFTER `backup_copies`; +-- #6456 comodoca.com needs to become sectigo.com +UPDATE `dns_ssl_ca` SET `ca_issue` = 'sectigo.com' WHERE `ca_issue` = 'comodo.com'; +UPDATE `dns_ssl_ca` SET `ca_issue` = 'sectigo.com' WHERE `ca_issue` = 'comodoca.com'; +UPDATE `dns_ssl_ca` SET `ca_name` = 'Sectigo (formerly Comodo CA)' WHERE `ca_issue` = 'sectigo.com'; +-- not updating the dns_rr table to change all CAA records that have comodo.com / comodoca.com - we should not touch users records imo - TP +-- #6445 Update the mailbox_soft_delete config option to it's new structure. +-- UPDATE server SET config=REGEXP_REPLACE(config, 'mailbox_soft_delete=n', 'mailbox_soft_delete=0') WHERE config LIKE '%mailbox_soft_delete=n%' +-- UPDATE server SET config=REGEXP_REPLACE(config, 'mailbox_soft_delete=y', 'mailbox_soft_delete=7') WHERE config LIKE '%mailbox_soft_delete=y%' \ No newline at end of file diff --git a/install/sql/incremental/upd_dev_collection.sql b/install/sql/incremental/upd_dev_collection.sql index 31f045a6f9..e69de29bb2 100644 --- a/install/sql/incremental/upd_dev_collection.sql +++ b/install/sql/incremental/upd_dev_collection.sql @@ -1,11 +0,0 @@ -ALTER TABLE `mail_user` CHANGE `quota` `quota` BIGINT(20) NOT NULL DEFAULT '0'; -ALTER TABLE `server_php` ADD `sortprio` INT(20) NOT NULL DEFAULT '100' AFTER `active`; -ALTER TABLE `mail_user` ADD COLUMN `imap_prefix` varchar(255) NULL default NULL AFTER `backup_copies`; --- #6456 comodoca.com needs to become sectigo.com -UPDATE `dns_ssl_ca` SET `ca_issue` = 'sectigo.com' WHERE `ca_issue` = 'comodo.com'; -UPDATE `dns_ssl_ca` SET `ca_issue` = 'sectigo.com' WHERE `ca_issue` = 'comodoca.com'; -UPDATE `dns_ssl_ca` SET `ca_name` = 'Sectigo (formerly Comodo CA)' WHERE `ca_issue` = 'sectigo.com'; --- not updating the dns_rr table to change all CAA records that have comodo.com / comodoca.com - we should not touch users records imo - TP --- #6445 Update the mailbox_soft_delete config option to it's new structure. --- UPDATE server SET config=REGEXP_REPLACE(config, 'mailbox_soft_delete=n', 'mailbox_soft_delete=0') WHERE config LIKE '%mailbox_soft_delete=n%' --- UPDATE server SET config=REGEXP_REPLACE(config, 'mailbox_soft_delete=y', 'mailbox_soft_delete=7') WHERE config LIKE '%mailbox_soft_delete=y%' \ No newline at end of file From 6643ef36024dc04caa5b752a0d69db652d736ff7 Mon Sep 17 00:00:00 2001 From: Michael Seevogel Date: Fri, 26 May 2023 16:08:32 +0200 Subject: [PATCH 171/621] Improve verbosity when an error occurs during replication --- server/lib/classes/modules.inc.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/server/lib/classes/modules.inc.php b/server/lib/classes/modules.inc.php index b3aae3acf9..d209fe2e51 100644 --- a/server/lib/classes/modules.inc.php +++ b/server/lib/classes/modules.inc.php @@ -160,7 +160,7 @@ function processDatalog() { } $params = array_merge($f_params, $params); unset($f_params); - + $tmp_sql1 = substr($tmp_sql1, 0, -1); $tmp_sql2 = substr($tmp_sql2, 0, -1); //$tmp_sql1 .= "$idx[0]"; @@ -171,14 +171,14 @@ function processDatalog() { $app->db->query($sql, true, $params); if($app->db->errorNumber > 0) { $replication_error = true; - $app->log("Replication failed. Error: (" . $d['dbtable'] . ") in MySQL server: (".$app->db->dbHost.") " . $app->db->errorMessage . " # SQL: " . $sql, LOGLEVEL_ERROR); + $app->log("Replication for datalog_id: " . $d['datalog_id'] . " failed. Error: (" . $d['dbtable'] . ") in MySQL server: (".$app->db->dbHost.") " . $app->db->errorMessage . " # SQL: " . $sql, LOGLEVEL_ERROR); } $log = $app->db->_build_query_string($sql, true, $params); $app->log('Replicated from master: '.$log, LOGLEVEL_DEBUG); unset($params); unset($log); } - + if($d['action'] == 'd') { $idx = explode(':', $d['dbidx']); $sql = "DELETE FROM ?? "; From d6a86bf1dab0ec27adad372ecb828e21a77d3966 Mon Sep 17 00:00:00 2001 From: Herman van Rink Date: Sun, 28 May 2023 22:47:37 +0200 Subject: [PATCH 172/621] Only display a dashlet table if there is content for it, #6512 --- interface/web/dashboard/dashlets/databasequota.php | 9 +++++---- interface/web/dashboard/dashlets/mailquota.php | 9 +++++---- interface/web/dashboard/dashlets/quota.php | 9 ++++----- 3 files changed, 14 insertions(+), 13 deletions(-) diff --git a/interface/web/dashboard/dashlets/databasequota.php b/interface/web/dashboard/dashlets/databasequota.php index 077a7ddbcb..5bb38be854 100644 --- a/interface/web/dashboard/dashlets/databasequota.php +++ b/interface/web/dashboard/dashlets/databasequota.php @@ -41,11 +41,12 @@ function show($limit_to_client_id = null) { $databases = $app->functions->htmlentities($databases); $tpl->setloop('databasequota', $databases); $has_databasequota = isset($databases[0]['used']); + + $tpl->setVar('has_databasequota', $has_databasequota); + $tpl->setVar('total_used', $app->functions->formatBytes($total_used, 0)); + + return $tpl->grab(); } - $tpl->setVar('has_databasequota', $has_databasequota); - $tpl->setVar('total_used', $app->functions->formatBytes($total_used, 0)); - - return $tpl->grab(); } } diff --git a/interface/web/dashboard/dashlets/mailquota.php b/interface/web/dashboard/dashlets/mailquota.php index 8b328ab6f9..f097005d7f 100644 --- a/interface/web/dashboard/dashlets/mailquota.php +++ b/interface/web/dashboard/dashlets/mailquota.php @@ -37,11 +37,12 @@ function show($limit_to_client_id = null) { //$emails = $app->functions->htmlentities($emails); $tpl->setloop('mailquota', $emails); $has_mailquota = isset($emails[0]['used']); - } - $tpl->setVar('has_mailquota', $has_mailquota); - $tpl->setVar('total_used', $app->functions->formatBytes($total_used, 0)); - return $tpl->grab(); + $tpl->setVar('has_mailquota', $has_mailquota); + $tpl->setVar('total_used', $app->functions->formatBytes($total_used, 0)); + + return $tpl->grab(); + } } } diff --git a/interface/web/dashboard/dashlets/quota.php b/interface/web/dashboard/dashlets/quota.php index adedbcf5c9..a70a1bf253 100644 --- a/interface/web/dashboard/dashlets/quota.php +++ b/interface/web/dashboard/dashlets/quota.php @@ -45,13 +45,12 @@ function show($limit_to_client_id = null) { $sites = $app->functions->htmlentities($sites); $tpl->setloop('quota', $sites); $has_quota = isset($sites[0]['used']); - } - $tpl->setVar('has_quota', $has_quota); - $tpl->setVar('total_used', $app->functions->formatBytes($total_used, 0)); - - return $tpl->grab(); + $tpl->setVar('has_quota', $has_quota); + $tpl->setVar('total_used', $app->functions->formatBytes($total_used, 0)); + return $tpl->grab(); + } } } From 671d71533b7f5c884a8d139a3a6c7808e0071204 Mon Sep 17 00:00:00 2001 From: Michael Seevogel Date: Tue, 30 May 2023 11:49:41 +0200 Subject: [PATCH 173/621] Fix mixed up version numbers in check_mysql_version --- install/lib/installer_base.lib.php | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php index 1d15474cf4..34f0d5df81 100644 --- a/install/lib/installer_base.lib.php +++ b/install/lib/installer_base.lib.php @@ -247,7 +247,7 @@ public function find_installed_apps() { //** Check prerequisites public function check_prerequisites() { global $conf; - + $msg = ''; if ($conf['default_php'] != '') { @@ -266,30 +266,28 @@ public function check_prerequisites() { public function check_mysql_version() { global $conf; - $min_mariadb_version = '10.0.5'; - // Set MySQL version to 8.0.4 after CentOS 7 support ended to allow preg_* functions in SQL queries - $min_mysql_version = '5.5'; + // Set MariaDB version to 10.0.5 after CentOS 7 support ended to allow preg_* functions in SQL queries + $min_mariadb_version = '5.5'; + $min_mysql_version = '8.0.4'; $rec = $this->db->queryOneRecord('SELECT VERSION() as mysql_version'); if(is_array($rec)) { $version = $rec['mysql_version']; } else { - die("Unable to get MySQL version\n"); + die("Unable to get MySQL or compatible version\n"); } if(strpos($version,'MariaDB')) { // We have MariaDB $parts = explode('-',$version); $version = $parts[0]; - swriteln("MariaDB version ".$version); - if(version_compare($version, $min_mariadb_version, '<')) die("Minimum required MariaDB version is ".$min_mariadb_version."\n"); + swriteln("Checking MariaDB version " . $version . " .. OK"); + if(version_compare($version, $min_mariadb_version, '<')) die("Minimum required MariaDB version is " . $min_mariadb_version . "\n"); } else { - // we have MySQL - swriteln("MySQL version ".$version); - if(version_compare($version, $min_mysql_version, '<')) die("Minimum required MySQL version is ".$min_mysql_version."\n"); + // We have MySQL or Percona + swriteln("Checking MySQL or compatible version " . $version . " .. OK"); + if(version_compare($version, $min_mysql_version, '<')) die("Minimum required MySQL or compatible version is " . $min_mysql_version . "\n"); } - - } public function force_configure_app($service, $enable_force=true) { From 5793f85671ab8ba4c0543da01f8c80d566809b49 Mon Sep 17 00:00:00 2001 From: Michael Seevogel Date: Tue, 30 May 2023 13:04:09 +0200 Subject: [PATCH 174/621] Only print OK if the required MySQL/MariaDB versions are met --- install/lib/installer_base.lib.php | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php index 34f0d5df81..d3e49db025 100644 --- a/install/lib/installer_base.lib.php +++ b/install/lib/installer_base.lib.php @@ -281,12 +281,18 @@ public function check_mysql_version() { // We have MariaDB $parts = explode('-',$version); $version = $parts[0]; - swriteln("Checking MariaDB version " . $version . " .. OK"); - if(version_compare($version, $min_mariadb_version, '<')) die("Minimum required MariaDB version is " . $min_mariadb_version . "\n"); + if(version_compare($version, $min_mariadb_version, '<')) { + die("Minimum required MariaDB version is " . $min_mariadb_version . " ,found " . $version ." \n"); + } else { + swriteln("Checking MariaDB version " . $version . " .. OK"); + } } else { // We have MySQL or Percona - swriteln("Checking MySQL or compatible version " . $version . " .. OK"); - if(version_compare($version, $min_mysql_version, '<')) die("Minimum required MySQL or compatible version is " . $min_mysql_version . "\n"); + if(version_compare($version, $min_mysql_version, '<')) { + die("Minimum required MySQL or compatible version is " . $min_mysql_version . " ,found " . $version ." \n"); + } else { + swriteln("Checking MySQL or compatible version " . $version . " .. OK"); + } } } From df6b0bd3b09a436d4daf67d4456c5841b51a1e16 Mon Sep 17 00:00:00 2001 From: Michael Seevogel Date: Tue, 30 May 2023 13:10:59 +0200 Subject: [PATCH 175/621] clean up --- install/lib/installer_base.lib.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php index d3e49db025..70e34cdd31 100644 --- a/install/lib/installer_base.lib.php +++ b/install/lib/installer_base.lib.php @@ -282,14 +282,14 @@ public function check_mysql_version() { $parts = explode('-',$version); $version = $parts[0]; if(version_compare($version, $min_mariadb_version, '<')) { - die("Minimum required MariaDB version is " . $min_mariadb_version . " ,found " . $version ." \n"); + die("Minimum required MariaDB version is " . $min_mariadb_version . ",found " . $version ." \n"); } else { swriteln("Checking MariaDB version " . $version . " .. OK"); } } else { // We have MySQL or Percona if(version_compare($version, $min_mysql_version, '<')) { - die("Minimum required MySQL or compatible version is " . $min_mysql_version . " ,found " . $version ." \n"); + die("Minimum required MySQL or compatible version is " . $min_mysql_version . ",found " . $version ." \n"); } else { swriteln("Checking MySQL or compatible version " . $version . " .. OK"); } From a9088f8c33f28ba2b7df2b5cd7d023a51a17ca09 Mon Sep 17 00:00:00 2001 From: Michael Seevogel Date: Tue, 30 May 2023 15:40:14 +0200 Subject: [PATCH 176/621] fix whitespace --- install/lib/installer_base.lib.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php index 70e34cdd31..73208e4bc3 100644 --- a/install/lib/installer_base.lib.php +++ b/install/lib/installer_base.lib.php @@ -282,14 +282,14 @@ public function check_mysql_version() { $parts = explode('-',$version); $version = $parts[0]; if(version_compare($version, $min_mariadb_version, '<')) { - die("Minimum required MariaDB version is " . $min_mariadb_version . ",found " . $version ." \n"); + die("Minimum required MariaDB version is " . $min_mariadb_version . ",found " . $version . "\n"); } else { swriteln("Checking MariaDB version " . $version . " .. OK"); } } else { // We have MySQL or Percona if(version_compare($version, $min_mysql_version, '<')) { - die("Minimum required MySQL or compatible version is " . $min_mysql_version . ",found " . $version ." \n"); + die("Minimum required MySQL or compatible version is " . $min_mysql_version . ",found " . $version . "\n"); } else { swriteln("Checking MySQL or compatible version " . $version . " .. OK"); } From 065d49168a3dd05b299b90f8dcf79bc4e4261108 Mon Sep 17 00:00:00 2001 From: Michael Seevogel Date: Tue, 30 May 2023 15:43:15 +0200 Subject: [PATCH 177/621] fix spelling --- server/lib/classes/modules.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/lib/classes/modules.inc.php b/server/lib/classes/modules.inc.php index d209fe2e51..a8c3a21566 100644 --- a/server/lib/classes/modules.inc.php +++ b/server/lib/classes/modules.inc.php @@ -171,7 +171,7 @@ function processDatalog() { $app->db->query($sql, true, $params); if($app->db->errorNumber > 0) { $replication_error = true; - $app->log("Replication for datalog_id: " . $d['datalog_id'] . " failed. Error: (" . $d['dbtable'] . ") in MySQL server: (".$app->db->dbHost.") " . $app->db->errorMessage . " # SQL: " . $sql, LOGLEVEL_ERROR); + $app->log("Replication of datalog_id: " . $d['datalog_id'] . " failed. Error: (" . $d['dbtable'] . ") in MySQL server: (".$app->db->dbHost.") " . $app->db->errorMessage . " # SQL: " . $sql, LOGLEVEL_ERROR); } $log = $app->db->_build_query_string($sql, true, $params); $app->log('Replicated from master: '.$log, LOGLEVEL_DEBUG); From cd0fed54688e565316e72046688211c32ec8c265 Mon Sep 17 00:00:00 2001 From: Till Brehm Date: Wed, 31 May 2023 07:32:28 +0000 Subject: [PATCH 178/621] Cast smtp port to int --- interface/lib/classes/ispcmail.inc.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/interface/lib/classes/ispcmail.inc.php b/interface/lib/classes/ispcmail.inc.php index f5aa359577..17ab0eb300 100644 --- a/interface/lib/classes/ispcmail.inc.php +++ b/interface/lib/classes/ispcmail.inc.php @@ -169,7 +169,7 @@ public function setOption($key, $value) { $this->smtp_host = $value; break; case 'smtp_port': - if(intval($value) > 0) $this->smtp_port = $value; + if(intval($value) > 0) $this->smtp_port = intval($value); break; case 'smtp_user': $this->smtp_user = $value; @@ -585,7 +585,7 @@ private function _encodeSubject($input, $charset = 'ISO-8859-1') { * @access private */ private function _smtp_login() { - $this->_smtp_conn = fsockopen(($this->smtp_crypt == 'ssl' ? 'tls://' : '') . $this->smtp_host, $this->smtp_port, $errno, $errstr, 30); + $this->_smtp_conn = fsockopen(($this->smtp_crypt == 'ssl' ? 'tls://' : '') . $this->smtp_host, (int)$this->smtp_port, $errno, $errstr, 30); if(empty($this->_smtp_conn)) return false; $response = fgets($this->_smtp_conn, 515); From 18a81d8ec555ad71e6a63ec0416e160a00124e36 Mon Sep 17 00:00:00 2001 From: Johannes Koschier Date: Wed, 31 May 2023 19:25:09 +0000 Subject: [PATCH 179/621] 6516_help_system_message_sort_fix --- interface/web/help/templates/support_message_list.htm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interface/web/help/templates/support_message_list.htm b/interface/web/help/templates/support_message_list.htm index c0b4b75d74..1c2443ab22 100644 --- a/interface/web/help/templates/support_message_list.htm +++ b/interface/web/help/templates/support_message_list.htm @@ -18,7 +18,7 @@

- + {tmpl_var name='search_limit'} From 35f449d16bb32a7b54b5e1dc619d8b4ec8d91c49 Mon Sep 17 00:00:00 2001 From: Till Brehm Date: Thu, 1 Jun 2023 12:43:25 +0000 Subject: [PATCH 180/621] Update installer_base.lib.php --- install/lib/installer_base.lib.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php index 73208e4bc3..43d312b0e6 100644 --- a/install/lib/installer_base.lib.php +++ b/install/lib/installer_base.lib.php @@ -266,9 +266,9 @@ public function check_prerequisites() { public function check_mysql_version() { global $conf; - // Set MariaDB version to 10.0.5 after CentOS 7 support ended to allow preg_* functions in SQL queries + // Set MariaDB version to 10.0.5 and MySQL version to 8.0.4 after CentOS 7 support ended to allow preg_* functions in SQL queries $min_mariadb_version = '5.5'; - $min_mysql_version = '8.0.4'; + $min_mysql_version = '5.5'; $rec = $this->db->queryOneRecord('SELECT VERSION() as mysql_version'); if(is_array($rec)) { From a98c9a3332ddb9e36a2dd32c0737f806003051ef Mon Sep 17 00:00:00 2001 From: Herman van Rink Date: Tue, 6 Jun 2023 16:29:21 +0200 Subject: [PATCH 181/621] Replace one more occurance of slave_zone_file_prefix, #6520 --- server/plugins-available/bind_plugin.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/plugins-available/bind_plugin.inc.php b/server/plugins-available/bind_plugin.inc.php index 5beeed2c56..815e3ca144 100644 --- a/server/plugins-available/bind_plugin.inc.php +++ b/server/plugins-available/bind_plugin.inc.php @@ -460,7 +460,7 @@ function slave_update($event_name, $data) { } //* Ensure that the named slave directory is writable by the named user - $slave_record_dir = $dns_config['bind_zonefiles_dir'].'/'.$this->slave_zone_file_prefix(); + $slave_record_dir = $dns_config['bind_zonefiles_dir'].'/'.$dns_config['bind_zonefiles_slaveprefix']; if(!@is_dir($slave_record_dir)) mkdir($slave_record_dir, 0770, true); chown($slave_record_dir, $dns_config['bind_user']); chgrp($slave_record_dir, $dns_config['bind_group']); From 545a09c05966f43e4b579c8d5d4d9357788bcd40 Mon Sep 17 00:00:00 2001 From: Till Brehm Date: Tue, 6 Jun 2023 18:50:44 +0000 Subject: [PATCH 182/621] Update bind_plugin.inc.php --- server/plugins-available/bind_plugin.inc.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/server/plugins-available/bind_plugin.inc.php b/server/plugins-available/bind_plugin.inc.php index 815e3ca144..b973fe9d85 100644 --- a/server/plugins-available/bind_plugin.inc.php +++ b/server/plugins-available/bind_plugin.inc.php @@ -460,7 +460,11 @@ function slave_update($event_name, $data) { } //* Ensure that the named slave directory is writable by the named user - $slave_record_dir = $dns_config['bind_zonefiles_dir'].'/'.$dns_config['bind_zonefiles_slaveprefix']; + if(!empty($dns_config['bind_zonefiles_slaveprefix'])) { + $slave_record_dir = dirname($dns_config['bind_zonefiles_dir'].'/'.$dns_config['bind_zonefiles_slaveprefix']); + } else { + $slave_record_dir = $dns_config['bind_zonefiles_dir']; + } if(!@is_dir($slave_record_dir)) mkdir($slave_record_dir, 0770, true); chown($slave_record_dir, $dns_config['bind_user']); chgrp($slave_record_dir, $dns_config['bind_group']); From 7c397031a69f735c9c7c74c2fbd34be34d0b9e00 Mon Sep 17 00:00:00 2001 From: Till Brehm Date: Tue, 6 Jun 2023 20:40:03 +0000 Subject: [PATCH 183/621] Update bind_plugin.inc.php --- server/plugins-available/bind_plugin.inc.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server/plugins-available/bind_plugin.inc.php b/server/plugins-available/bind_plugin.inc.php index b973fe9d85..452ef1b9ae 100644 --- a/server/plugins-available/bind_plugin.inc.php +++ b/server/plugins-available/bind_plugin.inc.php @@ -461,7 +461,8 @@ function slave_update($event_name, $data) { //* Ensure that the named slave directory is writable by the named user if(!empty($dns_config['bind_zonefiles_slaveprefix'])) { - $slave_record_dir = dirname($dns_config['bind_zonefiles_dir'].'/'.$dns_config['bind_zonefiles_slaveprefix']); + $slave_record_dir = $dns_config['bind_zonefiles_dir'].'/'.$dns_config['bind_zonefiles_slaveprefix']; + if(substr($slave_record_dir,-1) != '/') $slave_record_dir = dirname($slave_record_dir); } else { $slave_record_dir = $dns_config['bind_zonefiles_dir']; } From b8929250bb80813d30bb5f49a7474dcad0b5ef90 Mon Sep 17 00:00:00 2001 From: Johannes Koschier Date: Wed, 7 Jun 2023 09:35:53 +0000 Subject: [PATCH 184/621] 6521_database_list_sort_on_dbuser_column --- interface/web/sites/templates/database_list.htm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interface/web/sites/templates/database_list.htm b/interface/web/sites/templates/database_list.htm index 208741ff5a..5ef6aa91c9 100644 --- a/interface/web/sites/templates/database_list.htm +++ b/interface/web/sites/templates/database_list.htm @@ -39,7 +39,7 @@

--> - + {tmpl_var name='search_limit'} From 60705e3bbc1ad0087efafc22a6cb8bc91f58bebb Mon Sep 17 00:00:00 2001 From: Till Date: Thu, 8 Jun 2023 17:15:03 +0200 Subject: [PATCH 185/621] Fixed DNS wizard issue --- interface/web/dns/dns_wizard.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/interface/web/dns/dns_wizard.php b/interface/web/dns/dns_wizard.php index 380e9c23b1..87698ae6b7 100644 --- a/interface/web/dns/dns_wizard.php +++ b/interface/web/dns/dns_wizard.php @@ -201,11 +201,11 @@ if(is_array($domains) && sizeof($domains) > 0) { /* We have domains in the list, so create the drop-down-list */ foreach( $domains as $domain) { - $domain_select .= "\r\n"; + $domain_select .= ">" . $app->functions->idn_decode($domain['domain']) . "\r\n"; } } else { From 4e825ff7dfd97a5cf3dc9e91b3e20507c9152562 Mon Sep 17 00:00:00 2001 From: Till Date: Fri, 9 Jun 2023 11:23:04 +0200 Subject: [PATCH 186/621] Fix issues in DNS wizard --- interface/lib/classes/dns_wizard.inc.php | 32 +++++++++++++++++------- 1 file changed, 23 insertions(+), 9 deletions(-) diff --git a/interface/lib/classes/dns_wizard.inc.php b/interface/lib/classes/dns_wizard.inc.php index 10c6eae473..9b81748d23 100644 --- a/interface/lib/classes/dns_wizard.inc.php +++ b/interface/lib/classes/dns_wizard.inc.php @@ -37,6 +37,11 @@ function create(array $data) global $app; $app->uses('getconf'); + // get system settings + $settings = $app->getconf->get_global_config(); + + $error = ''; + // get the correct server_id if (isset($data['server_id'])) { $server_id = $app->functions->intval($data['server_id']); @@ -45,13 +50,18 @@ function create(array $data) $server_id = $app->functions->intval($data['server_id_value']); $post_server_id = true; } else { - $settings = $app->getconf->get_global_config('dns'); - $server_id = $app->functions->intval($settings['default_dnsserver']); + $server_id = $app->functions->intval($settings['dns']['default_dnsserver']); + if(empty($server_id)) { + $tmp = $app->db->queryOneRecord('SELECT server_id FROM server WHERE dns_server = 1 LIMIT 0,1'); + if(!empty($tmp['server_id'])) { + $server_id = $tmp['server_id']; + } else { + $error .= $app->lng('error_no_server_id').'
'; + } + } $post_server_id = false; } - $error = ''; - if ($post_server_id) { $client_group_id = $app->functions->intval($_SESSION["s"]["user"]["default_group"]); @@ -74,12 +84,16 @@ function create(array $data) // apply filters if(isset($data['domain']) && $data['domain'] != ''){ /* check if the domain module is used - and check if the selected domain can be used! */ - if ($domains_settings['use_domain_module'] == 'y') { + if ($settings['domains']['use_domain_module'] == 'y') { + // get domain_id for domain + $tmp = $app->db->queryOneRecord('SELECT domain_id from domain where domain = ?', $data['domain']); + $domain_id = $app->functions->intval( $tmp['domain_id']); + if ($_SESSION["s"]["user"]["typ"] == 'admin' || $app->auth->has_clients($_SESSION['s']['user']['userid'])) { - $data['client_group_id'] = $app->tools_sites->getClientIdForDomain($data['domain']); + $data['client_group_id'] = $app->tools_sites->getClientIdForDomain($domain_id); } - $domain_check = $app->tools_sites->checkDomainModuleDomain($data['domain']); - if(!$domain_check) { + $domain_check = $app->tools_sites->checkDomainModuleDomain($domain_id); + if($domain_check === false) { // invalid domain selected $data['domain'] = ''; } else { @@ -110,7 +124,7 @@ function create(array $data) if(isset($data['ip']) && $data['ip'] == '') $error .= $app->lng('error_ip_empty').'
'; - if(isset($data['ipv6']) && $data['ipv6'] == '') $error .= $app->lng('error_ipv6_empty').'
'; + //if(isset($data['ipv6']) && $data['ipv6'] == '') $error .= $app->lng('error_ipv6_empty').'
'; # fixme: this regex is pretty poor for hostname validation if(isset($data['ns1']) && $data['ns1'] == '') $error .= $app->lng('error_ns1_empty').'
'; From 2d3878b98dde9cf548ffb5e27eba0531ef1bb2d3 Mon Sep 17 00:00:00 2001 From: Till Date: Fri, 9 Jun 2023 12:49:42 +0200 Subject: [PATCH 187/621] Set dkim_selector in mail_domain_add function if missing. --- interface/lib/classes/remote.d/mail.inc.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/interface/lib/classes/remote.d/mail.inc.php b/interface/lib/classes/remote.d/mail.inc.php index 2d26b1969f..2cd0338a0c 100644 --- a/interface/lib/classes/remote.d/mail.inc.php +++ b/interface/lib/classes/remote.d/mail.inc.php @@ -60,6 +60,10 @@ public function mail_domain_add($session_id, $client_id, $params) throw new SoapFault('permission_denied', 'You do not have the permissions to access this function.'); return false; } + + // set default value for dkim selector if not set in $params array + if(!isset($params['dkim_selector'])) $params['dkim_selector'] = 'default'; + $primary_id = $this->insertQuery('../mail/form/mail_domain.tform.php', $client_id, $params, 'mail:mail_domain:on_after_insert'); return $primary_id; } @@ -332,7 +336,7 @@ public function mail_user_filter_delete($session_id, $primary_id) return $affected_rows; } - // Mail backup list function by Dominik Mller, info@profi-webdesign.net + // Mail backup list function by Dominik M�ller, info@profi-webdesign.net public function mail_user_backup_list($session_id, $primary_id = null) { global $app; @@ -355,7 +359,7 @@ public function mail_user_backup_list($session_id, $primary_id = null) return $result; } - // Mail backup restore/download functions by Dominik Mller, info@profi-webdesign.net + // Mail backup restore/download functions by Dominik M�ller, info@profi-webdesign.net public function mail_user_backup($session_id, $primary_id, $action_type) { global $app; From decf33d9880885b4033ef7135ed90c11f0ae8312 Mon Sep 17 00:00:00 2001 From: Till Date: Fri, 9 Jun 2023 16:13:55 +0200 Subject: [PATCH 188/621] Fix server column in dns zone list in client view. --- interface/lib/classes/custom_datasource.inc.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/interface/lib/classes/custom_datasource.inc.php b/interface/lib/classes/custom_datasource.inc.php index 3158fdde1a..a52446f36a 100644 --- a/interface/lib/classes/custom_datasource.inc.php +++ b/interface/lib/classes/custom_datasource.inc.php @@ -47,12 +47,12 @@ function dns_servers($field, $record) { if($_SESSION["s"]["user"]["typ"] == 'user') { // Get the limits of the client $client_group_id = $app->functions->intval($_SESSION["s"]["user"]["default_group"]); - $client = $app->db->queryOneRecord("SELECT default_dnsserver FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = ?", $client_group_id); - $sql = "SELECT server_id,server_name FROM server WHERE server_id = ?"; + $client = $app->db->queryOneRecord("SELECT dns_servers FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = ?", $client_group_id); + $sql = "SELECT server_id,server_name FROM server WHERE server_id in (?)"; } else { $sql = "SELECT server_id,server_name FROM server WHERE dns_server = 1 ORDER BY server_name AND mirror_server_id = 0"; } - $records = $app->db->queryAllRecords($sql, $client['default_dnsserver']); + $records = $app->db->queryAllRecords($sql, $client['dns_servers']); $records_new = array(); if(is_array($records)) { foreach($records as $rec) { From 67084ffe3b4ff2eda956b6e077c29296db0e97a2 Mon Sep 17 00:00:00 2001 From: Johannes Koschier Date: Fri, 23 Jun 2023 07:29:36 +0000 Subject: [PATCH 189/621] 6532_prevent_change_event_option --- interface/web/mail/templates/mail_user_mailfilter_edit.htm | 4 ++-- interface/web/themes/default/assets/javascripts/ispconfig.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/interface/web/mail/templates/mail_user_mailfilter_edit.htm b/interface/web/mail/templates/mail_user_mailfilter_edit.htm index 8d14eb4ee6..27d1d3ee46 100644 --- a/interface/web/mail/templates/mail_user_mailfilter_edit.htm +++ b/interface/web/mail/templates/mail_user_mailfilter_edit.htm @@ -1,6 +1,6 @@
-
{tmpl_var name='move_junk'}
@@ -31,7 +31,7 @@
- + {tmpl_var name='filter_records'} diff --git a/interface/web/themes/default/assets/javascripts/ispconfig.js b/interface/web/themes/default/assets/javascripts/ispconfig.js index 54d5cd3c64..d909f38183 100644 --- a/interface/web/themes/default/assets/javascripts/ispconfig.js +++ b/interface/web/themes/default/assets/javascripts/ispconfig.js @@ -112,7 +112,7 @@ var ISPConfig = { else return escapeMarkup(o.text); } }).on('change', function(e) { - if ($("#pageForm .table #Filter").length > 0) { + if ($("#pageForm .table #Filter").length > 0 && ! $(this).hasClass("disableChangeEvent")) { $("#pageForm .table #Filter").trigger('click'); } }); @@ -599,7 +599,7 @@ var ISPConfig = { $(document).on("change", function(event) { var elName = event.target.localName; - if ($("#pageForm .table #Filter").length > 0 && elName == 'select') { + if ($("#pageForm .table #Filter").length > 0 && elName == 'select' && ! $(event.target).hasClass("disableChangeEvent") ) { event.preventDefault(); $("#pageForm .table #Filter").trigger('click'); } From 699aaadeaedf32e528977ac12aff5ec932e5fdea Mon Sep 17 00:00:00 2001 From: Till Brehm Date: Thu, 29 Jun 2023 13:58:31 +0000 Subject: [PATCH 190/621] Fixes #6533 --- interface/lib/classes/tools_sites.inc.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/interface/lib/classes/tools_sites.inc.php b/interface/lib/classes/tools_sites.inc.php index 4ff2b4c75c..b2881f57cc 100644 --- a/interface/lib/classes/tools_sites.inc.php +++ b/interface/lib/classes/tools_sites.inc.php @@ -145,13 +145,9 @@ function convertClientName($name){ } /* TODO: rewrite SQL */ - function getDomainModuleDomains($not_used_in_table = null, $selected_domain = '') { + function getDomainModuleDomains($not_used_in_table = null, $selected_domain = null) { global $app; - // Fix a null value passed in by the create new forms, which lack an id. - if ($selected_domain == null) { - $selected_domain = ''; - } $sql = "SELECT domain_id, domain FROM domain WHERE"; if ($not_used_in_table) { if (strpos($not_used_in_table, 'dns') !== false) { From 7bb2a0f2a9c7e3191c39064ba9854ce59ca324d5 Mon Sep 17 00:00:00 2001 From: Herman van Rink Date: Sat, 1 Jul 2023 23:08:08 +0200 Subject: [PATCH 191/621] Enable DKIM when generating a Private-key #6538 --- interface/web/mail/templates/mail_domain_edit.htm | 1 + 1 file changed, 1 insertion(+) diff --git a/interface/web/mail/templates/mail_domain_edit.htm b/interface/web/mail/templates/mail_domain_edit.htm index 9b9bf683c2..cc7031b787 100644 --- a/interface/web/mail/templates/mail_domain_edit.htm +++ b/interface/web/mail/templates/mail_domain_edit.htm @@ -169,6 +169,7 @@ $("#dkim_public").val(data.dkim_public); $("#dkim_private").val(data.dkim_private); $("#dns_record").val(dns); + $('#dkim').prop("checked", true); }); }; From b4275af32a6d1e158fecdb2712fa9e82a8360be5 Mon Sep 17 00:00:00 2001 From: Herman van Rink Date: Wed, 21 Jun 2023 15:31:59 +0200 Subject: [PATCH 192/621] Mark that the zone is managed, thus dkim can be auto added --- .../web/mail/lib/lang/en_mail_domain.lng | 1 + interface/web/mail/mail_domain_edit.php | 37 +++++++++++++------ .../web/mail/templates/mail_domain_edit.htm | 2 +- 3 files changed, 27 insertions(+), 13 deletions(-) diff --git a/interface/web/mail/lib/lang/en_mail_domain.lng b/interface/web/mail/lib/lang/en_mail_domain.lng index 39e22f75b6..c27b674c85 100644 --- a/interface/web/mail/lib/lang/en_mail_domain.lng +++ b/interface/web/mail/lib/lang/en_mail_domain.lng @@ -20,6 +20,7 @@ $wb['no_policy'] = '- not enabled -'; $wb['error_not_allowed_server_id'] = 'Chosen server is not allowed for this account.'; $wb['dkim_selector_txt'] = 'DKIM-Selector'; $wb['dkim_selector_error'] = 'Invalid DKIM-Selector. Use only lower-case alphanumeric characters (a-z or 0-9) up to 63 chars'; +$wb['dkim_auto_dns_txt'] = 'Managed zone, dns updated automatically'; $wb['relayhost_txt'] = 'Relayhost'; $wb['relayhost_user_txt'] = 'Relayhost User'; $wb['relayhost_password_txt'] = 'Relayhost Password'; diff --git a/interface/web/mail/mail_domain_edit.php b/interface/web/mail/mail_domain_edit.php index f5697b4f1c..ab9fc88a65 100644 --- a/interface/web/mail/mail_domain_edit.php +++ b/interface/web/mail/mail_domain_edit.php @@ -259,6 +259,13 @@ function onShowEnd() { $app->tpl->setVar('dkim_public', $rec['dkim_public'], true); if (!empty($rec['dkim_public'])) $app->tpl->setVar('dns_record', $dns_record, true); + if($this->id > 0) { + $soa = $this->find_soa_domain($this->dataRecord['domain']); + if ( !empty($soa) ) { + $app->tpl->setVar('dkim_auto_dns', $app->tform->lng('dkim_auto_dns_txt'), true); + } + } + $csrf_token = $app->auth->csrf_token_get('mail_domain_del'); $app->tpl->setVar('_csrf_id', $csrf_token['csrf_id']); $app->tpl->setVar('_csrf_key', $csrf_token['csrf_key']); @@ -372,12 +379,8 @@ function onAfterInsert() { //* create dns-record with dkim-values if the zone exists if ( $this->dataRecord['active'] == 'y' && $this->dataRecord['dkim'] == 'y' ) { - $soaDomain = $this->dataRecord['domain'].'.'; - while ((!isset($soa) && (substr_count($soaDomain,'.') > 1))) { - $soa = $app->db->queryOneRecord("SELECT id AS zone, sys_userid, sys_groupid, sys_perm_user, sys_perm_group, sys_perm_other, server_id, ttl, serial FROM dns_soa WHERE active = 'Y' AND origin = ?", $soaDomain); - $soaDomain = preg_replace("/^[^\.]+\./","",$soaDomain); - } - if ( isset($soa) && !empty($soa) ) $this->update_dns($this->dataRecord, $soa); + $soa = $this->find_soa_domain($this->dataRecord['domain']); + if ( !empty($soa) ) $this->update_dns($this->dataRecord, $soa); } } @@ -690,15 +693,11 @@ function onAfterUpdate() { $selector = @($this->dataRecord['dkim_selector'] != $this->oldDataRecord['dkim_selector']) ? true : false; $dkim_private = @($this->dataRecord['dkim_private'] != $this->oldDataRecord['dkim_private']) ? true : false; - $soaDomain = $domain.'.'; - while ((!isset($soa) && (substr_count($soaDomain,'.') > 1))) { - $soa = $app->db->queryOneRecord("SELECT id AS zone, sys_userid, sys_groupid, sys_perm_user, sys_perm_group, sys_perm_other, server_id, ttl, serial FROM dns_soa WHERE active = 'Y' AND origin = ?", $soaDomain); - $soaDomain = preg_replace("/^[^\.]+\./","",$soaDomain); - } + $soa = $this->find_soa_domain($this->dataRecord['domain']); if ( ($selector || $dkim_private || $dkim_active) && $dkim_active ) //* create a new record only if the dns-zone exists - if ( isset($soa) && !empty($soa) ) { + if ( !empty($soa) ) { $this->update_dns($this->dataRecord, $soa); } if (! $dkim_active) { @@ -718,6 +717,20 @@ function onAfterUpdate() { } + /** + * Lookup if we host a dns zone for this domain. + */ + private function find_soa_domain($domain) { + global $app; + $soaDomain = $domain . '.'; + $soa = null; + while ((!isset($soa) && (substr_count($soaDomain,'.') > 1))) { + $soa = $app->db->queryOneRecord("SELECT id AS zone, sys_userid, sys_groupid, sys_perm_user, sys_perm_group, sys_perm_other, server_id, ttl, serial FROM dns_soa WHERE active = 'Y' AND origin = ?", $soaDomain); + $soaDomain = preg_replace("/^[^\.]+\./","",$soaDomain); + } + return $soa; + } + private function update_dns($dataRecord, $new_rr) { global $app, $conf; diff --git a/interface/web/mail/templates/mail_domain_edit.htm b/interface/web/mail/templates/mail_domain_edit.htm index 9b9bf683c2..88082d1b8c 100644 --- a/interface/web/mail/templates/mail_domain_edit.htm +++ b/interface/web/mail/templates/mail_domain_edit.htm @@ -129,7 +129,7 @@
- +
From c6159a279012492fca7bab6753c22b0c49becd2d Mon Sep 17 00:00:00 2001 From: Demian Date: Fri, 7 Jul 2023 09:12:04 +0200 Subject: [PATCH 193/621] Fixed regex pattern for dkim_selector #6459 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Changed the regex pattern for dkim_selectors again. We now follow the DKIMCore technical specification as stated on the website: A selector is a string of no more than 63 lower-case alphanumeric characters (a-z or 0-9) followed by a period “.”, followed by another string of no more than 63 lower-case alphanumeric characters. --- interface/web/mail/form/mail_domain.tform.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/interface/web/mail/form/mail_domain.tform.php b/interface/web/mail/form/mail_domain.tform.php index 4a042abf2e..fac30541f4 100644 --- a/interface/web/mail/form/mail_domain.tform.php +++ b/interface/web/mail/form/mail_domain.tform.php @@ -130,9 +130,9 @@ 'default' => 'default', 'value' => 'default', 'width' => '20', - 'maxlength' => '63', + 'maxlength' => '126', 'validators' => array ( 0 => array ( 'type' => 'REGEX', - 'regex' => '/^(?=.*[a-z])[a-z0-9]{1,63}$/', + 'regex' => '/^[a-z0-9]{1,63}(?:\.[a-z0-9]{1,63})?$/', 'errmsg'=> 'dkim_selector_error'), ), ), From 93628b09d331ba8c2aa672c0388d10c66acbbdb6 Mon Sep 17 00:00:00 2001 From: Demian Date: Fri, 7 Jul 2023 09:17:29 +0200 Subject: [PATCH 194/621] Add new error message for invalid dkim slector #6459 As the regex condition changed, the error message for invalid did too. Lanuage files for en/de/es are now state the new rules for a valid selector. --- interface/web/mail/lib/lang/de_mail_domain.lng | 2 +- interface/web/mail/lib/lang/en_mail_domain.lng | 2 +- interface/web/mail/lib/lang/es_mail_domain.lng | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/interface/web/mail/lib/lang/de_mail_domain.lng b/interface/web/mail/lib/lang/de_mail_domain.lng index 1a64a44231..0a972caa42 100644 --- a/interface/web/mail/lib/lang/de_mail_domain.lng +++ b/interface/web/mail/lib/lang/de_mail_domain.lng @@ -17,7 +17,7 @@ $wb['limit_maildomain_txt'] = 'Die maximale Anzahl an E-Mail Domains für Ihr Ko $wb['policy_txt'] = 'Spamfilter'; $wb['no_policy'] = '- nicht aktiviert -'; $wb['dkim_selector_txt'] = 'DKIM-Selector'; -$wb['dkim_selector_error'] = 'Ungültiger DKIM-Selector. Verwenden Sie nur max. 63 alphanumerische Zeichen (a-z oder 0-9)'; +$wb['dkim_selector_error'] = 'Ungültiger DKIM-Selector. Verwenden Sie nur max. 63 alphanumerische Zeichen (a-z oder 0-9), gefolgt von einem optionalen Punkt und weiter 63 alphanumerischen Zeichen.'; $wb['dkim_settings_txt'] = 'DomainKeys Identified Mail (DKIM)'; $wb['error_not_allowed_server_id'] = 'Chosen server is not allowed for this account.'; $wb['relayhost_txt'] = 'Relayhost'; diff --git a/interface/web/mail/lib/lang/en_mail_domain.lng b/interface/web/mail/lib/lang/en_mail_domain.lng index 39e22f75b6..fe4cad303f 100644 --- a/interface/web/mail/lib/lang/en_mail_domain.lng +++ b/interface/web/mail/lib/lang/en_mail_domain.lng @@ -19,7 +19,7 @@ $wb['policy_txt'] = 'Spamfilter'; $wb['no_policy'] = '- not enabled -'; $wb['error_not_allowed_server_id'] = 'Chosen server is not allowed for this account.'; $wb['dkim_selector_txt'] = 'DKIM-Selector'; -$wb['dkim_selector_error'] = 'Invalid DKIM-Selector. Use only lower-case alphanumeric characters (a-z or 0-9) up to 63 chars'; +$wb['dkim_selector_error'] = 'Invalid DKIM-Selector. Use only lower-case alphanumeric characters (a-z or 0-9) up to 63 chars, optional followed by a period and by another string of no more than 63 lower-case alphanumeric characters.'; $wb['relayhost_txt'] = 'Relayhost'; $wb['relayhost_user_txt'] = 'Relayhost User'; $wb['relayhost_password_txt'] = 'Relayhost Password'; diff --git a/interface/web/mail/lib/lang/es_mail_domain.lng b/interface/web/mail/lib/lang/es_mail_domain.lng index bd23b94191..4a3feb7c8b 100644 --- a/interface/web/mail/lib/lang/es_mail_domain.lng +++ b/interface/web/mail/lib/lang/es_mail_domain.lng @@ -6,7 +6,7 @@ $wb['dkim_generate_txt'] = 'Generar clave privada DKIM'; $wb['dkim_private_key_error'] = 'Clave privada DKIM no válida'; $wb['dkim_private_txt'] = 'Clave privada DKIM'; $wb['dkim_public_txt'] = 'Clave pública DKIM\nsólo para información'; -$wb['dkim_selector_error'] = 'Selector DKIM no válido. Use como máximo 63 caracteres alfanuméricos en minúsculas (a-z o 0-9)'; +$wb['dkim_selector_error'] = 'Selector DKIM inválido. Utilice . El subdominio tiene un máximo de 63 caracteres en minúsculas y el segundo subdominio es opcional'; $wb['dkim_selector_txt'] = 'Selector DKIM'; $wb['dkim_settings_txt'] = 'Correo Identificado por Claves de Dominio (DKIM)'; $wb['dkim_txt'] = 'Activar DKIM'; From 9c3d65f43af8deddf011ef1b909a0ff856a535f8 Mon Sep 17 00:00:00 2001 From: Till Brehm Date: Thu, 20 Jul 2023 13:18:16 +0000 Subject: [PATCH 195/621] Fixed editing subdomain fails with domain limit module on. --- interface/web/sites/web_childdomain_edit.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interface/web/sites/web_childdomain_edit.php b/interface/web/sites/web_childdomain_edit.php index 3f2726a040..019057b3be 100644 --- a/interface/web/sites/web_childdomain_edit.php +++ b/interface/web/sites/web_childdomain_edit.php @@ -105,7 +105,7 @@ function onShowEnd() { /* * The domain-module is in use. */ - $domains = $app->tools_sites->getDomainModuleDomains($this->_vhostdomain_type == 'subdomain' ? null : "web_domain", $this->dataRecord['domain']); + $domains = $app->tools_sites->getDomainModuleDomains($this->_vhostdomain_type == 'subdomain' ? null : "web_domain"); $domain_select = ""; $selected_domain = ''; if(is_array($domains) && sizeof($domains) > 0) { From 224a5966d8eed3ddcc2f482704900ce4645cfd28 Mon Sep 17 00:00:00 2001 From: Till Date: Thu, 20 Jul 2023 16:17:44 +0200 Subject: [PATCH 196/621] Fixes #6528 Account limit incorrectly informed in dashboard --- .../web/dashboard/dashlets/databasequota.php | 21 +++-------- interface/web/dashboard/dashlets/limits.php | 35 ++++++++----------- .../web/dashboard/dashlets/mailquota.php | 20 +++-------- interface/web/dashboard/dashlets/quota.php | 19 ++++------ 4 files changed, 31 insertions(+), 64 deletions(-) diff --git a/interface/web/dashboard/dashlets/databasequota.php b/interface/web/dashboard/dashlets/databasequota.php index 5bb38be854..4b06599d1c 100644 --- a/interface/web/dashboard/dashlets/databasequota.php +++ b/interface/web/dashboard/dashlets/databasequota.php @@ -2,7 +2,7 @@ class dashlet_databasequota { - function show($limit_to_client_id = null) { + function show() { global $app; //* Loading Template @@ -23,30 +23,19 @@ function show($limit_to_client_id = null) { $lng_file = 'lib/lang/'.$_SESSION['s']['language'].'_dashlet_databasequota.lng'; if(is_file($lng_file)) include $lng_file; $tpl->setVar($wb); - if ($_SESSION["s"]["user"]["typ"] != 'admin') { - $client_id = $_SESSION['s']['user']['client_id']; - } else { - $client_id = $limit_to_client_id; - } - $databases = $app->quota_lib->get_databasequota_data($client_id); + $databases = $app->quota_lib->get_databasequota_data( ($_SESSION["s"]["user"]["typ"] != 'admin') ? $_SESSION['s']['user']['client_id'] : null); //print_r($databases); $has_databasequota = false; - $total_used = 0; if(is_array($databases) && !empty($databases)){ - foreach ($databases as &$db) { - $total_used += $db['used_raw'] * 1000 * 1000; - } $databases = $app->functions->htmlentities($databases); $tpl->setloop('databasequota', $databases); $has_databasequota = isset($databases[0]['used']); - - $tpl->setVar('has_databasequota', $has_databasequota); - $tpl->setVar('total_used', $app->functions->formatBytes($total_used, 0)); - - return $tpl->grab(); } + $tpl->setVar('has_databasequota', $has_databasequota); + + return $tpl->grab(); } } diff --git a/interface/web/dashboard/dashlets/limits.php b/interface/web/dashboard/dashlets/limits.php index 79ac2126c8..50bcad9122 100644 --- a/interface/web/dashboard/dashlets/limits.php +++ b/interface/web/dashboard/dashlets/limits.php @@ -2,7 +2,7 @@ class dashlet_limits { - public function show($limit_to_client_id = 0) + public function show() { global $app, $conf; @@ -147,35 +147,33 @@ public function show($limit_to_client_id = 0) } $tpl->setVar($wb); - if ($limit_to_client_id == 0) { - $client_id = $_SESSION['s']['user']['client_id']; - $user_is_admin = true; + if ($app->auth->is_admin()) { + $user_is_admin = true; } else { - $client_id = $limit_to_client_id; - $user_is_admin = false; + $user_is_admin = false; } + $tpl->setVar('is_admin', $user_is_admin); - $client_group_id = $app->functions->intval($_SESSION["s"]["user"]["default_group"]); - $client = $app->db->queryOneRecord("SELECT * FROM client WHERE client_id = ?", $client_id); - + if ($user_is_admin == false) { + $client_group_id = $app->functions->intval($_SESSION["s"]["user"]["default_group"]); + $client = $app->db->queryOneRecord("SELECT * FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = ?", $client_group_id); + } $rows = array(); foreach ($limits as $limit) { $field = $limit['field']; - $value = $client[$field]; if ($user_is_admin) { $value = $wb['unlimited_txt']; } else { $value = $client[$field]; } - if ($value != 0 || $value == $wb['unlimited_txt']) { $value_formatted = ($value == '-1')?$wb['unlimited_txt']:$value; if (isset($limit['q_type']) && $limit['q_type'] != '') { - $usage = $this->_get_assigned_quota($limit, $client_id) . " MB"; + $usage = $this->_get_assigned_quota($limit) . " MB"; $value_formatted = ($value == '-1')?$wb['unlimited_txt']:$value . " MB"; } else { - $usage = $this->_get_limit_usage($limit, $client_id); + $usage = $this->_get_limit_usage($limit); } $percentage = ($value == '-1' || intval($value) == 0 || trim($value) == '' ? -1 : round(100 * (int)$usage / (int)$value)); $progressbar = $percentage > 100 ? 100 : $percentage; @@ -197,7 +195,7 @@ public function show($limit_to_client_id = 0) return $tpl->grab(); } - public function _get_limit_usage($limit, $limit_to_client_id) + public function _get_limit_usage($limit) { global $app; @@ -205,15 +203,12 @@ public function _get_limit_usage($limit, $limit_to_client_id) if ($limit['db_where'] != '') { $sql .= $limit['db_where']." AND "; } - $sql .= $app->tform->getAuthSQL('r', '', $limit_to_client_id); - // TEST to show reseller data. - //$sql .= $app->tform->getAuthSQL('r', '', 0, '3,28,39'); - //echo $sql; + $sql .= $app->tform->getAuthSQL('r'); $rec = $app->db->queryOneRecord($sql, $limit['db_table']); return $rec['number']; } - public function _get_assigned_quota($limit, $limit_to_client_id) + public function _get_assigned_quota($limit) { global $app; @@ -221,7 +216,7 @@ public function _get_assigned_quota($limit, $limit_to_client_id) if ($limit['db_where'] != '') { $sql .= $limit['db_where']." AND "; } - $sql .= $app->tform->getAuthSQL('r', '', $limit_to_client_id); + $sql .= $app->tform->getAuthSQL('r'); $rec = $app->db->queryOneRecord($sql, $limit['q_type'], $limit['db_table']); if ($limit['db_table']=='mail_user') { $quotaMB = $rec['number'] / 1048576; diff --git a/interface/web/dashboard/dashlets/mailquota.php b/interface/web/dashboard/dashlets/mailquota.php index f097005d7f..a9434e58ea 100644 --- a/interface/web/dashboard/dashlets/mailquota.php +++ b/interface/web/dashboard/dashlets/mailquota.php @@ -2,7 +2,7 @@ class dashlet_mailquota { - function show($limit_to_client_id = null) { + function show() { global $app; //* Loading Template @@ -16,33 +16,23 @@ function show($limit_to_client_id = null) { if(is_file($lng_file)) include $lng_file; $tpl->setVar($wb); - if ($_SESSION["s"]["user"]["typ"] != 'admin') { - $client_id = $_SESSION['s']['user']['client_id']; - } else { - $client_id = $limit_to_client_id; - } - - $emails = $app->quota_lib->get_mailquota_data($client_id); + $emails = $app->quota_lib->get_mailquota_data( ($_SESSION["s"]["user"]["typ"] != 'admin') ? $_SESSION['s']['user']['client_id'] : null); //print_r($emails); $has_mailquota = false; - $total_used = 0; if(is_array($emails) && !empty($emails)){ foreach($emails as &$email) { $email['email'] = $app->functions->idn_decode($email['email']); - $total_used += $email['used_raw']; } unset($email); // email username is quoted in quota.lib already, so no htmlentities here to prevent double encoding //$emails = $app->functions->htmlentities($emails); $tpl->setloop('mailquota', $emails); $has_mailquota = isset($emails[0]['used']); - - $tpl->setVar('has_mailquota', $has_mailquota); - $tpl->setVar('total_used', $app->functions->formatBytes($total_used, 0)); - - return $tpl->grab(); } + $tpl->setVar('has_mailquota', $has_mailquota); + + return $tpl->grab(); } } diff --git a/interface/web/dashboard/dashlets/quota.php b/interface/web/dashboard/dashlets/quota.php index a70a1bf253..d0b1be998f 100644 --- a/interface/web/dashboard/dashlets/quota.php +++ b/interface/web/dashboard/dashlets/quota.php @@ -2,7 +2,7 @@ class dashlet_quota { - function show($limit_to_client_id = null) { + function show() { global $app; //* Loading Template @@ -24,13 +24,7 @@ function show($limit_to_client_id = null) { if(is_file($lng_file)) include $lng_file; $tpl->setVar($wb); - if ($_SESSION["s"]["user"]["typ"] != 'admin') { - $client_id = $_SESSION['s']['user']['client_id']; - } else { - $client_id = $limit_to_client_id; - } - - $sites = $app->quota_lib->get_quota_data($client_id); + $sites = $app->quota_lib->get_quota_data( ($_SESSION["s"]["user"]["typ"] != 'admin') ? $_SESSION['s']['user']['client_id'] : null); //print_r($sites); $has_quota = false; @@ -38,19 +32,18 @@ function show($limit_to_client_id = null) { foreach($sites as &$site) { $site['domain'] = $app->functions->idn_decode($site['domain']); $site['progressbar'] = $site['hd_quota']; - $total_used += $site['used_raw'] * 1000; } unset($site); $sites = $app->functions->htmlentities($sites); $tpl->setloop('quota', $sites); $has_quota = isset($sites[0]['used']); + } + $tpl->setVar('has_quota', $has_quota); + + return $tpl->grab(); - $tpl->setVar('has_quota', $has_quota); - $tpl->setVar('total_used', $app->functions->formatBytes($total_used, 0)); - return $tpl->grab(); - } } } From 46fe7cb3a520e7f7dfeaf2e028cd0210df11d853 Mon Sep 17 00:00:00 2001 From: Till Brehm Date: Thu, 20 Jul 2023 15:09:47 +0000 Subject: [PATCH 197/621] Fixes #6544 --- interface/web/dashboard/dashlets/limits.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interface/web/dashboard/dashlets/limits.php b/interface/web/dashboard/dashlets/limits.php index 50bcad9122..2251fd80c2 100644 --- a/interface/web/dashboard/dashlets/limits.php +++ b/interface/web/dashboard/dashlets/limits.php @@ -222,7 +222,7 @@ public function _get_assigned_quota($limit) $quotaMB = $rec['number'] / 1048576; } // Mail quota is in bytes, must be converted to MB else { - $quotaMB = $rec['number']; + $quotaMB = $app->functions->intval($rec['number']); } return $quotaMB; } From 2513df3f68df3e56950ed37aa3ec9016ba2e348a Mon Sep 17 00:00:00 2001 From: Herman van Rink Date: Sun, 23 Jul 2023 21:39:28 +0200 Subject: [PATCH 198/621] Fix sorting of the database list by user, #6521 --- interface/web/sites/templates/database_admin_list.htm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interface/web/sites/templates/database_admin_list.htm b/interface/web/sites/templates/database_admin_list.htm index 08c4447fab..93ca7d02e6 100644 --- a/interface/web/sites/templates/database_admin_list.htm +++ b/interface/web/sites/templates/database_admin_list.htm @@ -23,7 +23,7 @@

- + {tmpl_var name='search_limit'} From 402759bd02c123f3b6b17ec389b0ea3bb55e0b20 Mon Sep 17 00:00:00 2001 From: Herman van Rink Date: Sun, 23 Jul 2023 23:19:27 +0200 Subject: [PATCH 199/621] Add language_error_empty to the language files, #6495 In addition to !1719 --- interface/web/client/lib/lang/ar_client.lng | 1 + interface/web/client/lib/lang/bg_client.lng | 1 + interface/web/client/lib/lang/br_client.lng | 1 + interface/web/client/lib/lang/ca_client.lng | 1 + interface/web/client/lib/lang/cn_client.lng | 1 + interface/web/client/lib/lang/cz_client.lng | 1 + interface/web/client/lib/lang/de_client.lng | 1 + interface/web/client/lib/lang/dk_client.lng | 1 + interface/web/client/lib/lang/el_client.lng | 1 + interface/web/client/lib/lang/en_client.lng | 1 + interface/web/client/lib/lang/es_client.lng | 1 + interface/web/client/lib/lang/fi_client.lng | 1 + interface/web/client/lib/lang/fr_client.lng | 1 + interface/web/client/lib/lang/hr_client.lng | 1 + interface/web/client/lib/lang/hu_client.lng | 1 + interface/web/client/lib/lang/id_client.lng | 1 + interface/web/client/lib/lang/it_client.lng | 1 + interface/web/client/lib/lang/ja_client.lng | 1 + interface/web/client/lib/lang/nl_client.lng | 1 + interface/web/client/lib/lang/pl_client.lng | 1 + interface/web/client/lib/lang/pt_client.lng | 1 + interface/web/client/lib/lang/ro_client.lng | 1 + interface/web/client/lib/lang/ru_client.lng | 1 + interface/web/client/lib/lang/se_client.lng | 1 + interface/web/client/lib/lang/sk_client.lng | 1 + interface/web/client/lib/lang/tr_client.lng | 1 + 26 files changed, 26 insertions(+) diff --git a/interface/web/client/lib/lang/ar_client.lng b/interface/web/client/lib/lang/ar_client.lng index 8b6ff765c9..9f881f7c17 100644 --- a/interface/web/client/lib/lang/ar_client.lng +++ b/interface/web/client/lib/lang/ar_client.lng @@ -206,3 +206,4 @@ $wb['password_click_to_set_txt'] = 'Click to set'; $wb['limit_dns_record_error_notint'] = 'The dns record limit must be a number.'; $wb['Address'] = 'Address'; $wb['Limits'] = 'Limits'; +$wb['language_error_empty'] = 'Language is empty.'; diff --git a/interface/web/client/lib/lang/bg_client.lng b/interface/web/client/lib/lang/bg_client.lng index 233a7c9b27..d44884b1a9 100644 --- a/interface/web/client/lib/lang/bg_client.lng +++ b/interface/web/client/lib/lang/bg_client.lng @@ -206,3 +206,4 @@ $wb['password_click_to_set_txt'] = 'Click to set'; $wb['limit_dns_record_error_notint'] = 'The dns record limit must be a number.'; $wb['Address'] = 'Address'; $wb['Limits'] = 'Limits'; +$wb['language_error_empty'] = 'Language is empty.'; diff --git a/interface/web/client/lib/lang/br_client.lng b/interface/web/client/lib/lang/br_client.lng index 58557a3a00..9f7e4eb642 100644 --- a/interface/web/client/lib/lang/br_client.lng +++ b/interface/web/client/lib/lang/br_client.lng @@ -206,3 +206,4 @@ $wb['email_error_empty'] = 'O email está vazio'; $wb['limit_directive_snippets_txt'] = 'Exibir configurações de seleção do servidor Web'; $wb['Address'] = 'Cliente'; $wb['Limits'] = 'Limites'; +$wb['language_error_empty'] = 'Language is empty.'; diff --git a/interface/web/client/lib/lang/ca_client.lng b/interface/web/client/lib/lang/ca_client.lng index 4482b8f241..99fd5bafb7 100644 --- a/interface/web/client/lib/lang/ca_client.lng +++ b/interface/web/client/lib/lang/ca_client.lng @@ -206,3 +206,4 @@ $wb['password_click_to_set_txt'] = 'Click to set'; $wb['limit_dns_record_error_notint'] = 'The dns record limit must be a number.'; $wb['Address'] = 'Address'; $wb['Limits'] = 'Limits'; +$wb['language_error_empty'] = 'Language is empty.'; diff --git a/interface/web/client/lib/lang/cn_client.lng b/interface/web/client/lib/lang/cn_client.lng index 0d477335a8..1c1e578019 100644 --- a/interface/web/client/lib/lang/cn_client.lng +++ b/interface/web/client/lib/lang/cn_client.lng @@ -208,3 +208,4 @@ $wb['email_error_empty'] = '电子邮件为空'; $wb['limit_directive_snippets_txt'] = '显示 Web 服务器配置选择'; $wb['Address'] = '地址'; $wb['Limits'] = '限制'; +$wb['language_error_empty'] = 'Language is empty.'; diff --git a/interface/web/client/lib/lang/cz_client.lng b/interface/web/client/lib/lang/cz_client.lng index 691bac508a..2217ca1958 100644 --- a/interface/web/client/lib/lang/cz_client.lng +++ b/interface/web/client/lib/lang/cz_client.lng @@ -206,3 +206,4 @@ $wb['password_click_to_set_txt'] = 'Pro nastavení klikni zde'; $wb['limit_dns_record_error_notint'] = 'Limit DNS záznamů musí být číslo.'; $wb['Address'] = 'Adresa'; $wb['Limits'] = 'Limity'; +$wb['language_error_empty'] = 'Language is empty.'; diff --git a/interface/web/client/lib/lang/de_client.lng b/interface/web/client/lib/lang/de_client.lng index 34328a17f8..3774319404 100644 --- a/interface/web/client/lib/lang/de_client.lng +++ b/interface/web/client/lib/lang/de_client.lng @@ -206,3 +206,4 @@ $wb['password_click_to_set_txt'] = 'Click to set'; $wb['limit_dns_record_error_notint'] = 'The dns record limit must be a number.'; $wb['Address'] = 'Address'; $wb['Limits'] = 'Limits'; +$wb['language_error_empty'] = 'Language is empty.'; diff --git a/interface/web/client/lib/lang/dk_client.lng b/interface/web/client/lib/lang/dk_client.lng index c5154dac5d..43c00f9c01 100644 --- a/interface/web/client/lib/lang/dk_client.lng +++ b/interface/web/client/lib/lang/dk_client.lng @@ -206,3 +206,4 @@ $wb['limit_directive_snippets_txt'] = 'Show web server config selection'; $wb['limit_dns_record_error_notint'] = 'The dns record limit must be a number.'; $wb['Address'] = 'Address'; $wb['Limits'] = 'Limits'; +$wb['language_error_empty'] = 'Language is empty.'; diff --git a/interface/web/client/lib/lang/el_client.lng b/interface/web/client/lib/lang/el_client.lng index 373c751a52..151b2ed4f5 100644 --- a/interface/web/client/lib/lang/el_client.lng +++ b/interface/web/client/lib/lang/el_client.lng @@ -206,3 +206,4 @@ $wb['password_click_to_set_txt'] = 'Click to set'; $wb['limit_dns_record_error_notint'] = 'The dns record limit must be a number.'; $wb['Address'] = 'Address'; $wb['Limits'] = 'Limits'; +$wb['language_error_empty'] = 'Language is empty.'; diff --git a/interface/web/client/lib/lang/en_client.lng b/interface/web/client/lib/lang/en_client.lng index acaafeb390..467424a6ca 100644 --- a/interface/web/client/lib/lang/en_client.lng +++ b/interface/web/client/lib/lang/en_client.lng @@ -208,3 +208,4 @@ $wb['email_error_empty'] = 'Email is empty'; $wb['limit_directive_snippets_txt'] = 'Show web server config selection'; $wb['Address'] = 'Address'; $wb['Limits'] = 'Limits'; +$wb['language_error_empty'] = 'Language is empty.'; diff --git a/interface/web/client/lib/lang/es_client.lng b/interface/web/client/lib/lang/es_client.lng index d9210b8ec3..b55abb52e2 100644 --- a/interface/web/client/lib/lang/es_client.lng +++ b/interface/web/client/lib/lang/es_client.lng @@ -206,3 +206,4 @@ $wb['password_click_to_set_txt'] = 'Click to set'; $wb['limit_dns_record_error_notint'] = 'The dns record limit must be a number.'; $wb['Address'] = 'Address'; $wb['Limits'] = 'Limits'; +$wb['language_error_empty'] = 'Language is empty.'; diff --git a/interface/web/client/lib/lang/fi_client.lng b/interface/web/client/lib/lang/fi_client.lng index 68058e1ab5..e55a5e9bfb 100644 --- a/interface/web/client/lib/lang/fi_client.lng +++ b/interface/web/client/lib/lang/fi_client.lng @@ -206,3 +206,4 @@ $wb['password_click_to_set_txt'] = 'Click to set'; $wb['limit_dns_record_error_notint'] = 'The dns record limit must be a number.'; $wb['Address'] = 'Address'; $wb['Limits'] = 'Limits'; +$wb['language_error_empty'] = 'Language is empty.'; diff --git a/interface/web/client/lib/lang/fr_client.lng b/interface/web/client/lib/lang/fr_client.lng index fc96c0d319..98a3907fb7 100644 --- a/interface/web/client/lib/lang/fr_client.lng +++ b/interface/web/client/lib/lang/fr_client.lng @@ -206,3 +206,4 @@ $wb['password_click_to_set_txt'] = 'Click to set'; $wb['limit_dns_record_error_notint'] = 'The dns record limit must be a number.'; $wb['Address'] = 'Address'; $wb['Limits'] = 'Limits'; +$wb['language_error_empty'] = 'Language is empty.'; diff --git a/interface/web/client/lib/lang/hr_client.lng b/interface/web/client/lib/lang/hr_client.lng index ed00a5c520..709b20c793 100644 --- a/interface/web/client/lib/lang/hr_client.lng +++ b/interface/web/client/lib/lang/hr_client.lng @@ -206,3 +206,4 @@ $wb['password_click_to_set_txt'] = 'Click to set'; $wb['limit_dns_record_error_notint'] = 'The dns record limit must be a number.'; $wb['Address'] = 'Address'; $wb['Limits'] = 'Limits'; +$wb['language_error_empty'] = 'Language is empty.'; diff --git a/interface/web/client/lib/lang/hu_client.lng b/interface/web/client/lib/lang/hu_client.lng index 9e6ad94a7b..98c0d2ceb9 100644 --- a/interface/web/client/lib/lang/hu_client.lng +++ b/interface/web/client/lib/lang/hu_client.lng @@ -206,3 +206,4 @@ $wb['password_click_to_set_txt'] = 'Click to set'; $wb['limit_dns_record_error_notint'] = 'The dns record limit must be a number.'; $wb['Address'] = 'Address'; $wb['Limits'] = 'Limits'; +$wb['language_error_empty'] = 'Language is empty.'; diff --git a/interface/web/client/lib/lang/id_client.lng b/interface/web/client/lib/lang/id_client.lng index 47f8971b1f..4e2a526c74 100644 --- a/interface/web/client/lib/lang/id_client.lng +++ b/interface/web/client/lib/lang/id_client.lng @@ -206,3 +206,4 @@ $wb['password_click_to_set_txt'] = 'Click to set'; $wb['limit_dns_record_error_notint'] = 'The dns record limit must be a number.'; $wb['Address'] = 'Address'; $wb['Limits'] = 'Limits'; +$wb['language_error_empty'] = 'Language is empty.'; diff --git a/interface/web/client/lib/lang/it_client.lng b/interface/web/client/lib/lang/it_client.lng index 9b2e6492cf..520bcd37de 100644 --- a/interface/web/client/lib/lang/it_client.lng +++ b/interface/web/client/lib/lang/it_client.lng @@ -206,3 +206,4 @@ $wb['password_click_to_set_txt'] = 'Clicca per impostare'; $wb['limit_dns_record_error_notint'] = 'Il limite di record DNS deve essere un numero.'; $wb['Address'] = 'Indirizzo'; $wb['Limits'] = 'Limiti'; +$wb['language_error_empty'] = 'Language is empty.'; diff --git a/interface/web/client/lib/lang/ja_client.lng b/interface/web/client/lib/lang/ja_client.lng index 4639125717..10caa99603 100644 --- a/interface/web/client/lib/lang/ja_client.lng +++ b/interface/web/client/lib/lang/ja_client.lng @@ -206,3 +206,4 @@ $wb['password_click_to_set_txt'] = 'Click to set'; $wb['limit_dns_record_error_notint'] = 'The dns record limit must be a number.'; $wb['Address'] = 'Address'; $wb['Limits'] = 'Limits'; +$wb['language_error_empty'] = 'Language is empty.'; diff --git a/interface/web/client/lib/lang/nl_client.lng b/interface/web/client/lib/lang/nl_client.lng index 593d5dbdff..b247947c76 100644 --- a/interface/web/client/lib/lang/nl_client.lng +++ b/interface/web/client/lib/lang/nl_client.lng @@ -206,3 +206,4 @@ $wb['limit_directive_snippets_txt'] = 'Show web server config selection'; $wb['limit_dns_record_error_notint'] = 'The dns record limit must be a number.'; $wb['Address'] = 'Address'; $wb['Limits'] = 'Limits'; +$wb['language_error_empty'] = 'Language is empty.'; diff --git a/interface/web/client/lib/lang/pl_client.lng b/interface/web/client/lib/lang/pl_client.lng index 6943deef95..662d04e447 100644 --- a/interface/web/client/lib/lang/pl_client.lng +++ b/interface/web/client/lib/lang/pl_client.lng @@ -206,3 +206,4 @@ $wb['password_click_to_set_txt'] = 'Click to set'; $wb['limit_dns_record_error_notint'] = 'The dns record limit must be a number.'; $wb['Address'] = 'Address'; $wb['Limits'] = 'Limits'; +$wb['language_error_empty'] = 'Language is empty.'; diff --git a/interface/web/client/lib/lang/pt_client.lng b/interface/web/client/lib/lang/pt_client.lng index 2b90c823ca..96fd1dd4e0 100644 --- a/interface/web/client/lib/lang/pt_client.lng +++ b/interface/web/client/lib/lang/pt_client.lng @@ -206,3 +206,4 @@ $wb['password_click_to_set_txt'] = 'Click to set'; $wb['limit_dns_record_error_notint'] = 'The dns record limit must be a number.'; $wb['Address'] = 'Address'; $wb['Limits'] = 'Limits'; +$wb['language_error_empty'] = 'Language is empty.'; diff --git a/interface/web/client/lib/lang/ro_client.lng b/interface/web/client/lib/lang/ro_client.lng index 70407714a8..79dcc4fc50 100644 --- a/interface/web/client/lib/lang/ro_client.lng +++ b/interface/web/client/lib/lang/ro_client.lng @@ -206,3 +206,4 @@ $wb['password_click_to_set_txt'] = 'Click to set'; $wb['limit_dns_record_error_notint'] = 'The dns record limit must be a number.'; $wb['Address'] = 'Address'; $wb['Limits'] = 'Limits'; +$wb['language_error_empty'] = 'Language is empty.'; diff --git a/interface/web/client/lib/lang/ru_client.lng b/interface/web/client/lib/lang/ru_client.lng index d8cd5e4788..936463e3e8 100644 --- a/interface/web/client/lib/lang/ru_client.lng +++ b/interface/web/client/lib/lang/ru_client.lng @@ -206,3 +206,4 @@ $wb['password_click_to_set_txt'] = 'Клик для установки'; $wb['limit_dns_record_error_notint'] = 'Лимит вторичных DNS-зон должен быть числом.'; $wb['Address'] = 'Address'; $wb['Limits'] = 'Лимиты'; +$wb['language_error_empty'] = 'Language is empty.'; diff --git a/interface/web/client/lib/lang/se_client.lng b/interface/web/client/lib/lang/se_client.lng index 41aca6a6bb..c1a921d750 100644 --- a/interface/web/client/lib/lang/se_client.lng +++ b/interface/web/client/lib/lang/se_client.lng @@ -206,3 +206,4 @@ $wb['password_click_to_set_txt'] = 'Click to set'; $wb['limit_dns_record_error_notint'] = 'The dns record limit must be a number.'; $wb['Address'] = 'Address'; $wb['Limits'] = 'Limits'; +$wb['language_error_empty'] = 'Language is empty.'; diff --git a/interface/web/client/lib/lang/sk_client.lng b/interface/web/client/lib/lang/sk_client.lng index 5ca58b5b0e..87c92c7184 100644 --- a/interface/web/client/lib/lang/sk_client.lng +++ b/interface/web/client/lib/lang/sk_client.lng @@ -206,3 +206,4 @@ $wb['password_click_to_set_txt'] = 'Click to set'; $wb['limit_dns_record_error_notint'] = 'The dns record limit must be a number.'; $wb['Address'] = 'Address'; $wb['Limits'] = 'Limits'; +$wb['language_error_empty'] = 'Language is empty.'; diff --git a/interface/web/client/lib/lang/tr_client.lng b/interface/web/client/lib/lang/tr_client.lng index ca1e2f7429..25d28da1fc 100644 --- a/interface/web/client/lib/lang/tr_client.lng +++ b/interface/web/client/lib/lang/tr_client.lng @@ -208,3 +208,4 @@ $wb['email_error_empty'] = 'E-posta boş olamaz.'; $wb['limit_directive_snippets_txt'] = 'Web Sunucu Yapılandırma Seçimi Görüntülensin'; $wb['Address'] = 'Address'; $wb['Limits'] = 'Sınırlar'; +$wb['language_error_empty'] = 'Language is empty.'; From b3735ebce048530773f7d65560be9b21e883e52d Mon Sep 17 00:00:00 2001 From: Herman van Rink Date: Tue, 25 Jul 2023 22:59:10 +0200 Subject: [PATCH 200/621] Generalize the form title to be content aware, #6545 --- interface/lib/classes/tform_actions.inc.php | 4 ++++ interface/web/client/form/client.tform.php | 1 + interface/web/client/form/domain.tform.php | 1 + interface/web/client/form/reseller.tform.php | 1 + interface/web/dns/dns_soa_edit.php | 10 ---------- interface/web/dns/form/dns_soa.tform.php | 1 + interface/web/mail/form/mail_domain.tform.php | 1 + interface/web/mail/form/mail_user.tform.php | 1 + interface/web/mail/mail_user_edit.php | 11 ----------- interface/web/sites/form/database.tform.php | 1 + interface/web/sites/form/database_user.tform.php | 1 + interface/web/sites/form/ftp_user.tform.php | 1 + interface/web/sites/form/shell_user.tform.php | 1 + interface/web/sites/form/web_childdomain.tform.php | 1 + interface/web/sites/form/web_vhost_domain.tform.php | 1 + 15 files changed, 16 insertions(+), 21 deletions(-) diff --git a/interface/lib/classes/tform_actions.inc.php b/interface/lib/classes/tform_actions.inc.php index 0053be2663..7060fee2d3 100644 --- a/interface/lib/classes/tform_actions.inc.php +++ b/interface/lib/classes/tform_actions.inc.php @@ -580,6 +580,10 @@ function onShowEdit() { $this->dataRecord = $record; + if(isset($app->tform->formDef['record_name_field'])) { + $app->tform->formDef['title'] = $app->lng($app->tform->formDef['title']) . ' ' . $this->dataRecord[$app->tform->formDef['record_name_field']]; + } + // Userdaten umwandeln $record = $app->tform->getHTML($record, $this->active_tab, 'EDIT'); $record['id'] = $this->id; diff --git a/interface/web/client/form/client.tform.php b/interface/web/client/form/client.tform.php index 3f51c20902..c373bf0a38 100644 --- a/interface/web/client/form/client.tform.php +++ b/interface/web/client/form/client.tform.php @@ -41,6 +41,7 @@ $form["title"] = "Client"; $form["description"] = ""; $form["name"] = "client"; +$form["record_name_field"] = "username"; $form["action"] = "client_edit.php"; $form["db_table"] = "client"; $form["db_table_idx"] = "client_id"; diff --git a/interface/web/client/form/domain.tform.php b/interface/web/client/form/domain.tform.php index f521a55b2d..c96af934d7 100644 --- a/interface/web/client/form/domain.tform.php +++ b/interface/web/client/form/domain.tform.php @@ -63,6 +63,7 @@ $form["title"] = "Domain"; $form["description"] = ""; $form["name"] = "domain"; +$form["record_name_field"] = "domain"; $form["action"] = "domain_edit.php"; $form["db_table"] = "domain"; $form["db_table_idx"] = "domain_id"; diff --git a/interface/web/client/form/reseller.tform.php b/interface/web/client/form/reseller.tform.php index d48dea6229..c90b8f4a0a 100644 --- a/interface/web/client/form/reseller.tform.php +++ b/interface/web/client/form/reseller.tform.php @@ -41,6 +41,7 @@ $form["title"] = "Reseller"; $form["description"] = ""; $form["name"] = "reseller"; +$form["record_name_field"] = "username"; $form["action"] = "reseller_edit.php"; $form["db_table"] = "client"; $form["db_table_idx"] = "client_id"; diff --git a/interface/web/dns/dns_soa_edit.php b/interface/web/dns/dns_soa_edit.php index 309a84236a..e17571e736 100644 --- a/interface/web/dns/dns_soa_edit.php +++ b/interface/web/dns/dns_soa_edit.php @@ -79,16 +79,6 @@ function onShowNew() { parent::onShowNew(); } - function onShowEdit() { - global $app, $conf; - - parent::onShowEdit(); - - if(isset($this->dataRecord)) { - $app->tform->formDef['title'] = $app->lng('DNS Zone') . ' ' . $this->dataRecord['origin']; - } - } - function onShowEnd() { global $app, $conf; diff --git a/interface/web/dns/form/dns_soa.tform.php b/interface/web/dns/form/dns_soa.tform.php index 7deb109456..b9ec102d1f 100644 --- a/interface/web/dns/form/dns_soa.tform.php +++ b/interface/web/dns/form/dns_soa.tform.php @@ -42,6 +42,7 @@ $form["title"] = "DNS Zone"; $form["description"] = ""; $form["name"] = "dns_soa"; +$form["record_name_field"] = "origin"; $form["action"] = "dns_soa_edit.php"; $form["db_table"] = "dns_soa"; $form["db_table_idx"] = "id"; diff --git a/interface/web/mail/form/mail_domain.tform.php b/interface/web/mail/form/mail_domain.tform.php index 4a042abf2e..7e105f97a1 100644 --- a/interface/web/mail/form/mail_domain.tform.php +++ b/interface/web/mail/form/mail_domain.tform.php @@ -41,6 +41,7 @@ $form["title"] = "Mail Domain"; $form["description"] = ""; $form["name"] = "mail_domain"; +$form["record_name_field"] = "domain"; $form["action"] = "mail_domain_edit.php"; $form["db_table"] = "mail_domain"; $form["db_table_idx"] = "domain_id"; diff --git a/interface/web/mail/form/mail_user.tform.php b/interface/web/mail/form/mail_user.tform.php index d135e4f3de..3dd334a29c 100644 --- a/interface/web/mail/form/mail_user.tform.php +++ b/interface/web/mail/form/mail_user.tform.php @@ -51,6 +51,7 @@ $form["title"] = "Mailbox"; $form["description"] = ""; $form["name"] = "mail_user"; +$form["record_name_field"] = "email"; $form["action"] = "mail_user_edit.php"; $form["db_table"] = "mail_user"; $form["db_table_idx"] = "mailuser_id"; diff --git a/interface/web/mail/mail_user_edit.php b/interface/web/mail/mail_user_edit.php index e435f6ab96..975133fdc4 100644 --- a/interface/web/mail/mail_user_edit.php +++ b/interface/web/mail/mail_user_edit.php @@ -67,17 +67,6 @@ function onShowNew() { parent::onShowNew(); } - function onShowEdit() { - global $app, $conf; - - parent::onShowEdit(); - - if(isset($this->dataRecord)) { - $app->tform->formDef['title'] = $app->lng('Mailbox') . ' ' . $this->dataRecord['email']; - } - } - - function onShowEnd() { global $app, $conf; diff --git a/interface/web/sites/form/database.tform.php b/interface/web/sites/form/database.tform.php index dd3910c043..2d4785df99 100644 --- a/interface/web/sites/form/database.tform.php +++ b/interface/web/sites/form/database.tform.php @@ -41,6 +41,7 @@ $form["title"] = "Database"; $form["description"] = ""; $form["name"] = "database"; +$form["record_name_field"] = "database_name"; $form["action"] = "database_edit.php"; $form["db_table"] = "web_database"; $form["db_table_idx"] = "database_id"; diff --git a/interface/web/sites/form/database_user.tform.php b/interface/web/sites/form/database_user.tform.php index 5f91cbd1f3..3c62fa42bb 100644 --- a/interface/web/sites/form/database_user.tform.php +++ b/interface/web/sites/form/database_user.tform.php @@ -41,6 +41,7 @@ $form["title"] = "Database User"; $form["description"] = ""; $form["name"] = "database_user"; +$form["record_name_field"] = "database_user"; $form["action"] = "database_user_edit.php"; $form["db_table"] = "web_database_user"; $form["db_table_idx"] = "database_user_id"; diff --git a/interface/web/sites/form/ftp_user.tform.php b/interface/web/sites/form/ftp_user.tform.php index e62f5ca40a..092fc016a1 100644 --- a/interface/web/sites/form/ftp_user.tform.php +++ b/interface/web/sites/form/ftp_user.tform.php @@ -41,6 +41,7 @@ $form["title"] = "FTP User"; $form["description"] = ""; $form["name"] = "ftp_user"; +$form["record_name_field"] = "username"; $form["action"] = "ftp_user_edit.php"; $form["db_table"] = "ftp_user"; $form["db_table_idx"] = "ftp_user_id"; diff --git a/interface/web/sites/form/shell_user.tform.php b/interface/web/sites/form/shell_user.tform.php index 523a03687a..d4230e1f0a 100644 --- a/interface/web/sites/form/shell_user.tform.php +++ b/interface/web/sites/form/shell_user.tform.php @@ -41,6 +41,7 @@ $form["title"] = "Shell User"; $form["description"] = ""; $form["name"] = "shell_user"; +$form["record_name_field"] = "username"; $form["action"] = "shell_user_edit.php"; $form["db_table"] = "shell_user"; $form["db_table_idx"] = "shell_user_id"; diff --git a/interface/web/sites/form/web_childdomain.tform.php b/interface/web/sites/form/web_childdomain.tform.php index 36718f5c9d..a8fe73ebc2 100644 --- a/interface/web/sites/form/web_childdomain.tform.php +++ b/interface/web/sites/form/web_childdomain.tform.php @@ -43,6 +43,7 @@ $form["title"] = ($childdomain_type == 'subdomain' ? "Subdomain" : 'Web Aliasdomain'); $form["description"] = ""; $form["name"] = "web_childdomain"; +$form["record_name_field"] = "domain"; $form["action"] = "web_childdomain_edit.php"; $form["db_table"] = "web_domain"; $form["db_table_idx"] = "domain_id"; diff --git a/interface/web/sites/form/web_vhost_domain.tform.php b/interface/web/sites/form/web_vhost_domain.tform.php index ba0d86f3eb..c773df1334 100644 --- a/interface/web/sites/form/web_vhost_domain.tform.php +++ b/interface/web/sites/form/web_vhost_domain.tform.php @@ -60,6 +60,7 @@ $form["title"] = $form_title; $form["description"] = ""; $form["name"] = "web_vhost_domain"; +$form["record_name_field"] = "domain"; $form["action"] = "web_vhost_domain_edit.php"; $form["db_table"] = "web_domain"; $form["db_table_idx"] = "domain_id"; From e406c48cc28d5c9ff747435bdfb60d7a53d91867 Mon Sep 17 00:00:00 2001 From: Herman van Rink Date: Sat, 29 Jul 2023 11:20:28 +0200 Subject: [PATCH 201/621] Revert "Fixes #6528 Account limit incorrectly informed in dashboard" This reverts commit 224a5966d8eed3ddcc2f482704900ce4645cfd28. --- .../web/dashboard/dashlets/databasequota.php | 21 ++++++++--- interface/web/dashboard/dashlets/limits.php | 35 +++++++++++-------- .../web/dashboard/dashlets/mailquota.php | 20 ++++++++--- interface/web/dashboard/dashlets/quota.php | 19 ++++++---- 4 files changed, 64 insertions(+), 31 deletions(-) diff --git a/interface/web/dashboard/dashlets/databasequota.php b/interface/web/dashboard/dashlets/databasequota.php index 4b06599d1c..5bb38be854 100644 --- a/interface/web/dashboard/dashlets/databasequota.php +++ b/interface/web/dashboard/dashlets/databasequota.php @@ -2,7 +2,7 @@ class dashlet_databasequota { - function show() { + function show($limit_to_client_id = null) { global $app; //* Loading Template @@ -23,19 +23,30 @@ function show() { $lng_file = 'lib/lang/'.$_SESSION['s']['language'].'_dashlet_databasequota.lng'; if(is_file($lng_file)) include $lng_file; $tpl->setVar($wb); + if ($_SESSION["s"]["user"]["typ"] != 'admin') { + $client_id = $_SESSION['s']['user']['client_id']; + } else { + $client_id = $limit_to_client_id; + } - $databases = $app->quota_lib->get_databasequota_data( ($_SESSION["s"]["user"]["typ"] != 'admin') ? $_SESSION['s']['user']['client_id'] : null); + $databases = $app->quota_lib->get_databasequota_data($client_id); //print_r($databases); $has_databasequota = false; + $total_used = 0; if(is_array($databases) && !empty($databases)){ + foreach ($databases as &$db) { + $total_used += $db['used_raw'] * 1000 * 1000; + } $databases = $app->functions->htmlentities($databases); $tpl->setloop('databasequota', $databases); $has_databasequota = isset($databases[0]['used']); + + $tpl->setVar('has_databasequota', $has_databasequota); + $tpl->setVar('total_used', $app->functions->formatBytes($total_used, 0)); + + return $tpl->grab(); } - $tpl->setVar('has_databasequota', $has_databasequota); - - return $tpl->grab(); } } diff --git a/interface/web/dashboard/dashlets/limits.php b/interface/web/dashboard/dashlets/limits.php index 2251fd80c2..f34d8c150a 100644 --- a/interface/web/dashboard/dashlets/limits.php +++ b/interface/web/dashboard/dashlets/limits.php @@ -2,7 +2,7 @@ class dashlet_limits { - public function show() + public function show($limit_to_client_id = 0) { global $app, $conf; @@ -147,33 +147,35 @@ public function show() } $tpl->setVar($wb); - if ($app->auth->is_admin()) { - $user_is_admin = true; + if ($limit_to_client_id == 0) { + $client_id = $_SESSION['s']['user']['client_id']; + $user_is_admin = true; } else { - $user_is_admin = false; + $client_id = $limit_to_client_id; + $user_is_admin = false; } - $tpl->setVar('is_admin', $user_is_admin); - if ($user_is_admin == false) { - $client_group_id = $app->functions->intval($_SESSION["s"]["user"]["default_group"]); - $client = $app->db->queryOneRecord("SELECT * FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = ?", $client_group_id); - } + $client_group_id = $app->functions->intval($_SESSION["s"]["user"]["default_group"]); + $client = $app->db->queryOneRecord("SELECT * FROM client WHERE client_id = ?", $client_id); + $rows = array(); foreach ($limits as $limit) { $field = $limit['field']; + $value = $client[$field]; if ($user_is_admin) { $value = $wb['unlimited_txt']; } else { $value = $client[$field]; } + if ($value != 0 || $value == $wb['unlimited_txt']) { $value_formatted = ($value == '-1')?$wb['unlimited_txt']:$value; if (isset($limit['q_type']) && $limit['q_type'] != '') { - $usage = $this->_get_assigned_quota($limit) . " MB"; + $usage = $this->_get_assigned_quota($limit, $client_id) . " MB"; $value_formatted = ($value == '-1')?$wb['unlimited_txt']:$value . " MB"; } else { - $usage = $this->_get_limit_usage($limit); + $usage = $this->_get_limit_usage($limit, $client_id); } $percentage = ($value == '-1' || intval($value) == 0 || trim($value) == '' ? -1 : round(100 * (int)$usage / (int)$value)); $progressbar = $percentage > 100 ? 100 : $percentage; @@ -195,7 +197,7 @@ public function show() return $tpl->grab(); } - public function _get_limit_usage($limit) + public function _get_limit_usage($limit, $limit_to_client_id) { global $app; @@ -203,12 +205,15 @@ public function _get_limit_usage($limit) if ($limit['db_where'] != '') { $sql .= $limit['db_where']." AND "; } - $sql .= $app->tform->getAuthSQL('r'); + $sql .= $app->tform->getAuthSQL('r', '', $limit_to_client_id); + // TEST to show reseller data. + //$sql .= $app->tform->getAuthSQL('r', '', 0, '3,28,39'); + //echo $sql; $rec = $app->db->queryOneRecord($sql, $limit['db_table']); return $rec['number']; } - public function _get_assigned_quota($limit) + public function _get_assigned_quota($limit, $limit_to_client_id) { global $app; @@ -216,7 +221,7 @@ public function _get_assigned_quota($limit) if ($limit['db_where'] != '') { $sql .= $limit['db_where']." AND "; } - $sql .= $app->tform->getAuthSQL('r'); + $sql .= $app->tform->getAuthSQL('r', '', $limit_to_client_id); $rec = $app->db->queryOneRecord($sql, $limit['q_type'], $limit['db_table']); if ($limit['db_table']=='mail_user') { $quotaMB = $rec['number'] / 1048576; diff --git a/interface/web/dashboard/dashlets/mailquota.php b/interface/web/dashboard/dashlets/mailquota.php index a9434e58ea..f097005d7f 100644 --- a/interface/web/dashboard/dashlets/mailquota.php +++ b/interface/web/dashboard/dashlets/mailquota.php @@ -2,7 +2,7 @@ class dashlet_mailquota { - function show() { + function show($limit_to_client_id = null) { global $app; //* Loading Template @@ -16,23 +16,33 @@ function show() { if(is_file($lng_file)) include $lng_file; $tpl->setVar($wb); - $emails = $app->quota_lib->get_mailquota_data( ($_SESSION["s"]["user"]["typ"] != 'admin') ? $_SESSION['s']['user']['client_id'] : null); + if ($_SESSION["s"]["user"]["typ"] != 'admin') { + $client_id = $_SESSION['s']['user']['client_id']; + } else { + $client_id = $limit_to_client_id; + } + + $emails = $app->quota_lib->get_mailquota_data($client_id); //print_r($emails); $has_mailquota = false; + $total_used = 0; if(is_array($emails) && !empty($emails)){ foreach($emails as &$email) { $email['email'] = $app->functions->idn_decode($email['email']); + $total_used += $email['used_raw']; } unset($email); // email username is quoted in quota.lib already, so no htmlentities here to prevent double encoding //$emails = $app->functions->htmlentities($emails); $tpl->setloop('mailquota', $emails); $has_mailquota = isset($emails[0]['used']); - } - $tpl->setVar('has_mailquota', $has_mailquota); - return $tpl->grab(); + $tpl->setVar('has_mailquota', $has_mailquota); + $tpl->setVar('total_used', $app->functions->formatBytes($total_used, 0)); + + return $tpl->grab(); + } } } diff --git a/interface/web/dashboard/dashlets/quota.php b/interface/web/dashboard/dashlets/quota.php index d0b1be998f..a70a1bf253 100644 --- a/interface/web/dashboard/dashlets/quota.php +++ b/interface/web/dashboard/dashlets/quota.php @@ -2,7 +2,7 @@ class dashlet_quota { - function show() { + function show($limit_to_client_id = null) { global $app; //* Loading Template @@ -24,7 +24,13 @@ function show() { if(is_file($lng_file)) include $lng_file; $tpl->setVar($wb); - $sites = $app->quota_lib->get_quota_data( ($_SESSION["s"]["user"]["typ"] != 'admin') ? $_SESSION['s']['user']['client_id'] : null); + if ($_SESSION["s"]["user"]["typ"] != 'admin') { + $client_id = $_SESSION['s']['user']['client_id']; + } else { + $client_id = $limit_to_client_id; + } + + $sites = $app->quota_lib->get_quota_data($client_id); //print_r($sites); $has_quota = false; @@ -32,18 +38,19 @@ function show() { foreach($sites as &$site) { $site['domain'] = $app->functions->idn_decode($site['domain']); $site['progressbar'] = $site['hd_quota']; + $total_used += $site['used_raw'] * 1000; } unset($site); $sites = $app->functions->htmlentities($sites); $tpl->setloop('quota', $sites); $has_quota = isset($sites[0]['used']); - } - $tpl->setVar('has_quota', $has_quota); - - return $tpl->grab(); + $tpl->setVar('has_quota', $has_quota); + $tpl->setVar('total_used', $app->functions->formatBytes($total_used, 0)); + return $tpl->grab(); + } } } From 9741885941b232b221fc85f690e0eb622f91dfce Mon Sep 17 00:00:00 2001 From: Herman van Rink Date: Sun, 18 Jun 2023 20:34:42 +0200 Subject: [PATCH 202/621] Rework dashlet code - Move translations more to the frontend code --- interface/lib/classes/functions.inc.php | 22 ++++++ interface/lib/classes/quota_lib.inc.php | 67 +++---------------- interface/web/dashboard/dashboard.php | 2 +- .../web/dashboard/dashlets/databasequota.php | 12 ++-- interface/web/dashboard/dashlets/limits.php | 24 +++---- .../web/dashboard/dashlets/mailquota.php | 18 +---- interface/web/dashboard/dashlets/quota.php | 13 ++-- 7 files changed, 57 insertions(+), 101 deletions(-) diff --git a/interface/lib/classes/functions.inc.php b/interface/lib/classes/functions.inc.php index 629da2fb0e..bca97ed301 100644 --- a/interface/lib/classes/functions.inc.php +++ b/interface/lib/classes/functions.inc.php @@ -287,11 +287,33 @@ public function intval($string, $force_numeric = false) { * @return string - formated bytes */ public function formatBytes($size, $precision = 2) { + // 0 is a special as it would give NAN otehrwise. + if ($size == 0) { + return 0; + } + $base=log($size)/log(1024); $suffixes=array('', ' kB', ' MB', ' GB', ' TB'); return round(pow(1024, $base-floor($base)), $precision).$suffixes[floor($base)]; } + /** + * Function to change bytes to kB, MB, GB or TB or the translated string 'Unlimited' for -1 + * @param int $size - size in bytes + * @param int precicion - after-comma-numbers (default: 2) + * @return string - formated bytes + */ + public function formatBytesOrUnlimited($size, $precision = 2) { + global $app; + + if ($size == -1) { + return $app->lng('unlimited_txt'); + } + else { + return $this->formatBytes($size, $precision); + } + + } /** * Normalize a path and strip duplicate slashes from it diff --git a/interface/lib/classes/quota_lib.inc.php b/interface/lib/classes/quota_lib.inc.php index 7c5b388536..7f26de8aa7 100644 --- a/interface/lib/classes/quota_lib.inc.php +++ b/interface/lib/classes/quota_lib.inc.php @@ -36,9 +36,10 @@ public function get_quota_data($clientid = null, $readable = true) { if (!is_numeric($sites[$i]['hard'])) $sites[$i]['hard']=$sites[$i]['hard'][1]; if (!is_numeric($sites[$i]['files'])) $sites[$i]['files']=$sites[$i]['files'][1]; - $sites[$i]['used_raw'] = $sites[$i]['used']; - $sites[$i]['soft_raw'] = $sites[$i]['soft']; - $sites[$i]['hard_raw'] = $sites[$i]['hard']; + // Convert from kb to bytes, and use -1 for instead of 0 for Unlimited. + $sites[$i]['used_raw'] = $sites[$i]['used'] * 1024; + $sites[$i]['soft_raw'] = ($sites[$i]['soft'] > 0) ? $sites[$i]['soft'] * 1024 : -1; + $sites[$i]['hard_raw'] = ($sites[$i]['hard'] > 0) ? $sites[$i]['hard'] * 1024 : -1; $sites[$i]['files_raw'] = $sites[$i]['files']; $sites[$i]['used_percentage'] = ($sites[$i]['soft'] > 0 && $sites[$i]['used'] > 0 ? round($sites[$i]['used'] * 100 / $sites[$i]['soft']) : 0); @@ -53,29 +54,6 @@ public function get_quota_data($clientid = null, $readable = true) { if($used_ratio >= 0.8) $sites[$i]['display_colour'] = '#fd934f'; if($used_ratio >= 1) $sites[$i]['display_colour'] = '#cc0000'; - if($sites[$i]['used'] > 1024) { - $sites[$i]['used'] = round($sites[$i]['used'] / 1024, 1).' MB'; - } else { - if ($sites[$i]['used'] != '') $sites[$i]['used'] .= ' KB'; - } - - if($sites[$i]['soft'] > 1024) { - $sites[$i]['soft'] = round($sites[$i]['soft'] / 1024, 1).' MB'; - } else { - $sites[$i]['soft'] .= ' KB'; - } - - if($sites[$i]['hard'] > 1024) { - $sites[$i]['hard'] = round($sites[$i]['hard'] / 1024, 1).' MB'; - } else { - $sites[$i]['hard'] .= ' KB'; - } - - if($sites[$i]['soft'] == " KB") $sites[$i]['soft'] = $app->lng('unlimited_txt'); - if($sites[$i]['hard'] == " KB") $sites[$i]['hard'] = $app->lng('unlimited_txt'); - - if($sites[$i]['soft'] == '0 B' || $sites[$i]['soft'] == '0 KB' || $sites[$i]['soft'] == '0') $sites[$i]['soft'] = $app->lng('unlimited_txt'); - if($sites[$i]['hard'] == '0 B' || $sites[$i]['hard'] == '0 KB' || $sites[$i]['hard'] == '0') $sites[$i]['hard'] = $app->lng('unlimited_txt'); /* if(!strstr($sites[$i]['used'],'M') && !strstr($sites[$i]['used'],'K')) $sites[$i]['used'].= ' B'; @@ -83,13 +61,7 @@ public function get_quota_data($clientid = null, $readable = true) { if(!strstr($sites[$i]['hard'],'M') && !strstr($sites[$i]['hard'],'K')) $sites[$i]['hard'].= ' B'; */ } - else { - if (empty($sites[$i]['soft'])) $sites[$i]['soft'] = -1; - if (empty($sites[$i]['hard'])) $sites[$i]['hard'] = -1; - if($sites[$i]['soft'] == '0 B' || $sites[$i]['soft'] == '0 KB' || $sites[$i]['soft'] == '0') $sites[$i]['soft'] = -1; - if($sites[$i]['hard'] == '0 B' || $sites[$i]['hard'] == '0 KB' || $sites[$i]['hard'] == '0') $sites[$i]['hard'] = -1; - } } } @@ -265,17 +237,8 @@ public function get_mailquota_data($clientid = null, $readable = true) { if($used_ratio >= 0.8) $emails[$i]['display_colour'] = '#fd934f'; if($used_ratio >= 1) $emails[$i]['display_colour'] = '#cc0000'; - if($emails[$i]['quota'] == 0){ - $emails[$i]['quota'] = $app->lng('unlimited_txt'); - } else { - $emails[$i]['quota'] = round($emails[$i]['quota'] / 1048576, 1).' MB'; - } - - - if($emails[$i]['used'] < 1544000) { - $emails[$i]['used'] = round($emails[$i]['used'] / 1024, 1).' KB'; - } else { - $emails[$i]['used'] = round($emails[$i]['used'] / 1048576, 1).' MB'; + if($emails[$i]['quota'] == 0) { + $emails[$i]['quota'] = -1; } } } @@ -309,11 +272,11 @@ public function get_databasequota_data($clientid = null, $readable = true) { for($i=0;$i 0) && ($databases[$i]['used'] > 0)) ? round($databases[$i]['used_raw'] * 100 / $databases[$i]['database_quota']) : 0; + $databases[$i]['database_quota_raw'] = ($databases[$i]['database_quota'] == -1) ? -1 : $databases[$i]['database_quota'] * 1000 * 1000; + $databases[$i]['used_raw'] = $size; // / 1024 / 1024; //* quota is stored as MB - calculated bytes + $databases[$i]['used_percentage'] = (($databases[$i]['database_quota'] > 0) && ($size > 0)) ? round($databases[$i]['used_raw'] * 100 / $databases[$i]['database_quota_raw']) : 0; if ($readable) { // colours @@ -326,18 +289,8 @@ public function get_databasequota_data($clientid = null, $readable = true) { if($used_ratio >= 0.8) $databases[$i]['display_colour'] = '#fd934f'; if($used_ratio >= 1) $databases[$i]['display_colour'] = '#cc0000'; - if($databases[$i]['database_quota'] == -1) { - $databases[$i]['database_quota'] = $app->lng('unlimited_txt'); - } else { - $databases[$i]['database_quota'] = $databases[$i]['database_quota'] . ' MB'; - } - if($databases[$i]['used'] < 1544000) { - $databases[$i]['used'] = round($databases[$i]['used'] / 1024, 1).' KB'; - } else { - $databases[$i]['used'] = round($databases[$i]['used'] / 1048576, 1).' MB'; - } } } } diff --git a/interface/web/dashboard/dashboard.php b/interface/web/dashboard/dashboard.php index d8adccd15e..71edd5c580 100644 --- a/interface/web/dashboard/dashboard.php +++ b/interface/web/dashboard/dashboard.php @@ -219,7 +219,7 @@ $leftcol = array(); foreach($leftcol_dashlets as $name) { if(isset($dashlet_list[$name])) { - $leftcol[]['content'] = $dashlet_list[$name]->show(); + $leftcol[]['content'] = $dashlet_list[$name]->show($_SESSION['s']['user']['client_id']); } } $app->tpl->setloop('leftcol', $leftcol); diff --git a/interface/web/dashboard/dashlets/databasequota.php b/interface/web/dashboard/dashlets/databasequota.php index 5bb38be854..6403032b54 100644 --- a/interface/web/dashboard/dashlets/databasequota.php +++ b/interface/web/dashboard/dashlets/databasequota.php @@ -23,20 +23,18 @@ function show($limit_to_client_id = null) { $lng_file = 'lib/lang/'.$_SESSION['s']['language'].'_dashlet_databasequota.lng'; if(is_file($lng_file)) include $lng_file; $tpl->setVar($wb); - if ($_SESSION["s"]["user"]["typ"] != 'admin') { - $client_id = $_SESSION['s']['user']['client_id']; - } else { - $client_id = $limit_to_client_id; - } - $databases = $app->quota_lib->get_databasequota_data($client_id); + $databases = $app->quota_lib->get_databasequota_data($limit_to_client_id); //print_r($databases); $has_databasequota = false; $total_used = 0; if(is_array($databases) && !empty($databases)){ foreach ($databases as &$db) { - $total_used += $db['used_raw'] * 1000 * 1000; + $db['used'] = $app->functions->formatBytes($db['used_raw'], 0); + $db['database_quota'] = $app->functions->formatBytesOrUnlimited($db['database_quota_raw'], 0); + + $total_used += $db['used_raw']; } $databases = $app->functions->htmlentities($databases); $tpl->setloop('databasequota', $databases); diff --git a/interface/web/dashboard/dashlets/limits.php b/interface/web/dashboard/dashlets/limits.php index f34d8c150a..9befe628ca 100644 --- a/interface/web/dashboard/dashlets/limits.php +++ b/interface/web/dashboard/dashlets/limits.php @@ -146,16 +146,13 @@ public function show($limit_to_client_id = 0) include $lng_file; } $tpl->setVar($wb); - - if ($limit_to_client_id == 0) { - $client_id = $_SESSION['s']['user']['client_id']; - $user_is_admin = true; - } else { + if ($app->auth->is_admin()) { $client_id = $limit_to_client_id; - $user_is_admin = false; + } else { + $client_id = $_SESSION['s']['user']['client_id']; } - $client_group_id = $app->functions->intval($_SESSION["s"]["user"]["default_group"]); +// $client_group_id = $app->functions->intval($_SESSION["s"]["user"]["default_group"]); $client = $app->db->queryOneRecord("SELECT * FROM client WHERE client_id = ?", $client_id); @@ -163,22 +160,23 @@ public function show($limit_to_client_id = 0) foreach ($limits as $limit) { $field = $limit['field']; $value = $client[$field]; - if ($user_is_admin) { - $value = $wb['unlimited_txt']; + if ($app->auth->is_admin() && $limit_to_client_id == 0) { + $value = -1; } else { $value = $client[$field]; } if ($value != 0 || $value == $wb['unlimited_txt']) { - $value_formatted = ($value == '-1')?$wb['unlimited_txt']:$value; + $suffix = ''; if (isset($limit['q_type']) && $limit['q_type'] != '') { - $usage = $this->_get_assigned_quota($limit, $client_id) . " MB"; - $value_formatted = ($value == '-1')?$wb['unlimited_txt']:$value . " MB"; + $usage = $this->_get_assigned_quota($limit, $client_id); + $suffix = ' MB'; } else { $usage = $this->_get_limit_usage($limit, $client_id); } $percentage = ($value == '-1' || intval($value) == 0 || trim($value) == '' ? -1 : round(100 * (int)$usage / (int)$value)); $progressbar = $percentage > 100 ? 100 : $percentage; + $value_formatted = ($value == '-1') ? $wb['unlimited_txt'] : ($value . $suffix); $rows[] = array('field' => $field, 'field_txt' => $wb[$field.'_txt'], 'value' => $value_formatted, @@ -223,7 +221,7 @@ public function _get_assigned_quota($limit, $limit_to_client_id) } $sql .= $app->tform->getAuthSQL('r', '', $limit_to_client_id); $rec = $app->db->queryOneRecord($sql, $limit['q_type'], $limit['db_table']); - if ($limit['db_table']=='mail_user') { + if ($limit['db_table'] == 'mail_user') { $quotaMB = $rec['number'] / 1048576; } // Mail quota is in bytes, must be converted to MB else { diff --git a/interface/web/dashboard/dashlets/mailquota.php b/interface/web/dashboard/dashlets/mailquota.php index f097005d7f..d38fc4431a 100644 --- a/interface/web/dashboard/dashlets/mailquota.php +++ b/interface/web/dashboard/dashlets/mailquota.php @@ -16,13 +16,8 @@ function show($limit_to_client_id = null) { if(is_file($lng_file)) include $lng_file; $tpl->setVar($wb); - if ($_SESSION["s"]["user"]["typ"] != 'admin') { - $client_id = $_SESSION['s']['user']['client_id']; - } else { - $client_id = $limit_to_client_id; - } - $emails = $app->quota_lib->get_mailquota_data($client_id); + $emails = $app->quota_lib->get_mailquota_data($limit_to_client_id); //print_r($emails); $has_mailquota = false; @@ -30,6 +25,8 @@ function show($limit_to_client_id = null) { if(is_array($emails) && !empty($emails)){ foreach($emails as &$email) { $email['email'] = $app->functions->idn_decode($email['email']); + $email['used'] = $app->functions->formatBytes($email['used_raw'], 0); + $email['quota'] = $app->functions->formatBytesOrUnlimited($email['quota_raw'], 0); $total_used += $email['used_raw']; } unset($email); @@ -46,12 +43,3 @@ function show($limit_to_client_id = null) { } } - - - - - - - - -?> diff --git a/interface/web/dashboard/dashlets/quota.php b/interface/web/dashboard/dashlets/quota.php index a70a1bf253..2dc695ae14 100644 --- a/interface/web/dashboard/dashlets/quota.php +++ b/interface/web/dashboard/dashlets/quota.php @@ -24,13 +24,7 @@ function show($limit_to_client_id = null) { if(is_file($lng_file)) include $lng_file; $tpl->setVar($wb); - if ($_SESSION["s"]["user"]["typ"] != 'admin') { - $client_id = $_SESSION['s']['user']['client_id']; - } else { - $client_id = $limit_to_client_id; - } - - $sites = $app->quota_lib->get_quota_data($client_id); + $sites = $app->quota_lib->get_quota_data($limit_to_client_id); //print_r($sites); $has_quota = false; @@ -38,7 +32,10 @@ function show($limit_to_client_id = null) { foreach($sites as &$site) { $site['domain'] = $app->functions->idn_decode($site['domain']); $site['progressbar'] = $site['hd_quota']; - $total_used += $site['used_raw'] * 1000; + $site['used'] = $app->functions->formatBytes($site['used_raw'], 0); + $site['hard'] = $app->functions->formatBytesOrUnlimited($site['hard_raw'], 0); + $site['soft'] = $app->functions->formatBytesOrUnlimited($site['soft_raw'], 0); + $total_used += $site['used_raw']; } unset($site); From 4c2c33910ffb3a4c98a022456d3fbab4a8946787 Mon Sep 17 00:00:00 2001 From: Herman van Rink Date: Sat, 1 Jul 2023 23:54:32 +0200 Subject: [PATCH 203/621] Add an extra utility function is_reseller --- interface/lib/classes/auth.inc.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/interface/lib/classes/auth.inc.php b/interface/lib/classes/auth.inc.php index 3a4cc1603c..a8f1f966a7 100644 --- a/interface/lib/classes/auth.inc.php +++ b/interface/lib/classes/auth.inc.php @@ -53,6 +53,13 @@ public function is_superadmin() { } } + public function is_reseller() { + if($this->has_clients($_SESSION['s']['user']['userid'])) { + return true; + } else { + return false; + } + } public function has_clients($userid) { global $app, $conf; From eee2d2465a58f5132c0b2b483ba6c67cf90d2983 Mon Sep 17 00:00:00 2001 From: Herman van Rink Date: Sun, 2 Jul 2023 00:02:36 +0200 Subject: [PATCH 204/621] Support reseller in dashboard --- interface/lib/classes/quota_lib.inc.php | 19 ++++++++++++++++--- interface/web/dashboard/dashboard.php | 10 ++++++++-- interface/web/dashboard/dashlets/limits.php | 14 ++++++-------- 3 files changed, 30 insertions(+), 13 deletions(-) diff --git a/interface/lib/classes/quota_lib.inc.php b/interface/lib/classes/quota_lib.inc.php index 7f26de8aa7..e38a7e117f 100644 --- a/interface/lib/classes/quota_lib.inc.php +++ b/interface/lib/classes/quota_lib.inc.php @@ -14,7 +14,12 @@ public function get_quota_data($clientid = null, $readable = true) { //print_r($monitor_data); // select all websites or websites belonging to client - $sites = $app->db->queryAllRecords("SELECT * FROM web_domain WHERE active = 'y' AND type = 'vhost'".(($clientid != null)?" AND sys_groupid = (SELECT default_group FROM sys_user WHERE client_id=?)":'') . " ORDER BY domain", $clientid); + $q = " SELECT * FROM web_domain + WHERE active = 'y' AND type = 'vhost'" + . 'AND sys_groupid ' . (($clientid != null) ? "= (SELECT default_group FROM sys_user WHERE client_id=?)" + : " IN (" . $_SESSION["s"]["user"]["groups"] . ")") + . " ORDER BY domain"; + $sites = $app->db->queryAllRecords($q, $clientid); //print_r($sites); if(is_array($sites) && !empty($sites)){ @@ -209,7 +214,11 @@ public function get_mailquota_data($clientid = null, $readable = true) { //print_r($monitor_data); // select all email accounts or email accounts belonging to client - $emails = $app->db->queryAllRecords("SELECT * FROM mail_user".(($clientid != null)? " WHERE sys_groupid = (SELECT default_group FROM sys_user WHERE client_id=?)" : '') . " ORDER BY email", $clientid); + $q = " SELECT * FROM mail_user" + . " WHERE sys_groupid " . (($clientid != null) ? "= (SELECT default_group FROM sys_user WHERE client_id=?)" + : " IN (" . $_SESSION["s"]["user"]["groups"] . ")") + . " ORDER BY email"; + $emails = $app->db->queryAllRecords($q, $clientid); //print_r($emails); if(is_array($emails) && !empty($emails)) { @@ -265,7 +274,11 @@ public function get_databasequota_data($clientid = null, $readable = true) { //print_r($monitor_data); // select all databases belonging to client - $databases = $app->db->queryAllRecords("SELECT * FROM web_database".(($clientid != null)? " WHERE sys_groupid = (SELECT default_group FROM sys_user WHERE client_id=?)" : '') . " ORDER BY database_name", $clientid); + $q = "SELECT * FROM web_database" + . " WHERE sys_groupid " . (($clientid != null) ? "= (SELECT default_group FROM sys_user WHERE client_id=?)" + : " IN (" . $_SESSION["s"]["user"]["groups"] . ")") + . " ORDER BY database_name"; + $databases = $app->db->queryAllRecords($q, $clientid); //print_r($databases); if(is_array($databases) && !empty($databases)){ diff --git a/interface/web/dashboard/dashboard.php b/interface/web/dashboard/dashboard.php index 71edd5c580..a78ade4e7c 100644 --- a/interface/web/dashboard/dashboard.php +++ b/interface/web/dashboard/dashboard.php @@ -214,12 +214,18 @@ } } +if ($app->auth->is_admin() || $app->auth->is_reseller()) { + $limit_to_client_id = null; +} +else { + $limit_to_client_id = $_SESSION['s']['user']['client_id']; +} /* Fill the left column */ $leftcol = array(); foreach($leftcol_dashlets as $name) { if(isset($dashlet_list[$name])) { - $leftcol[]['content'] = $dashlet_list[$name]->show($_SESSION['s']['user']['client_id']); + $leftcol[]['content'] = $dashlet_list[$name]->show($limit_to_client_id); } } $app->tpl->setloop('leftcol', $leftcol); @@ -228,7 +234,7 @@ $rightcol = array(); foreach($rightcol_dashlets as $name) { if(isset($dashlet_list[$name])) { - $rightcol[]['content'] = $dashlet_list[$name]->show(); + $rightcol[]['content'] = $dashlet_list[$name]->show($limit_to_client_id); } } $app->tpl->setloop('rightcol', $rightcol); diff --git a/interface/web/dashboard/dashlets/limits.php b/interface/web/dashboard/dashlets/limits.php index 9befe628ca..e4c2705193 100644 --- a/interface/web/dashboard/dashlets/limits.php +++ b/interface/web/dashboard/dashlets/limits.php @@ -146,15 +146,13 @@ public function show($limit_to_client_id = 0) include $lng_file; } $tpl->setVar($wb); - if ($app->auth->is_admin()) { - $client_id = $limit_to_client_id; - } else { - $client_id = $_SESSION['s']['user']['client_id']; - } - -// $client_group_id = $app->functions->intval($_SESSION["s"]["user"]["default_group"]); - $client = $app->db->queryOneRecord("SELECT * FROM client WHERE client_id = ?", $client_id); + if ($limit_to_client_id != null) { + $client = $app->db->queryOneRecord("SELECT * FROM client WHERE client_id = ?", $limit_to_client_id); + } + elseif ($limit_to_client_id == null && $app->auth->is_reseller()) { + $client = $app->db->queryOneRecord("SELECT * FROM client WHERE client_id = ?", $_SESSION['s']['user']['client_id']); + } $rows = array(); foreach ($limits as $limit) { From 74efda9da4df0e566485106c974ad141e38939ad Mon Sep 17 00:00:00 2001 From: Herman van Rink Date: Sat, 29 Jul 2023 11:55:50 +0200 Subject: [PATCH 205/621] Do not show data from other users when viewing the client dashboard as an admin --- interface/web/dashboard/dashlets/limits.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/interface/web/dashboard/dashlets/limits.php b/interface/web/dashboard/dashlets/limits.php index e4c2705193..2d2becdc25 100644 --- a/interface/web/dashboard/dashlets/limits.php +++ b/interface/web/dashboard/dashlets/limits.php @@ -148,11 +148,12 @@ public function show($limit_to_client_id = 0) $tpl->setVar($wb); if ($limit_to_client_id != null) { - $client = $app->db->queryOneRecord("SELECT * FROM client WHERE client_id = ?", $limit_to_client_id); + $client_id = $limit_to_client_id; } elseif ($limit_to_client_id == null && $app->auth->is_reseller()) { - $client = $app->db->queryOneRecord("SELECT * FROM client WHERE client_id = ?", $_SESSION['s']['user']['client_id']); + $client_id = $_SESSION['s']['user']['client_id']; } + $client = $app->db->queryOneRecord("SELECT * FROM client WHERE client_id = ?", $client_id); $rows = array(); foreach ($limits as $limit) { @@ -201,7 +202,7 @@ public function _get_limit_usage($limit, $limit_to_client_id) if ($limit['db_where'] != '') { $sql .= $limit['db_where']." AND "; } - $sql .= $app->tform->getAuthSQL('r', '', $limit_to_client_id); + $sql .= $app->tform->getAuthSQL('r', '', $limit_to_client_id, array()); // TEST to show reseller data. //$sql .= $app->tform->getAuthSQL('r', '', 0, '3,28,39'); //echo $sql; From 9a27599972bf2ac7f2466178835047b9a1210f7a Mon Sep 17 00:00:00 2001 From: Herman van Rink Date: Sat, 29 Jul 2023 21:35:32 +0200 Subject: [PATCH 206/621] getAuthSQL expects a string, lookup groupid of the client --- interface/web/dashboard/dashlets/limits.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/interface/web/dashboard/dashlets/limits.php b/interface/web/dashboard/dashlets/limits.php index 2d2becdc25..75c8b8e3f4 100644 --- a/interface/web/dashboard/dashlets/limits.php +++ b/interface/web/dashboard/dashlets/limits.php @@ -202,7 +202,8 @@ public function _get_limit_usage($limit, $limit_to_client_id) if ($limit['db_where'] != '') { $sql .= $limit['db_where']." AND "; } - $sql .= $app->tform->getAuthSQL('r', '', $limit_to_client_id, array()); + $group = $app->db->queryOneRecord("SELECT `groupid` FROM `sys_group` WHERE client_id=?", $limit_to_client_id); + $sql .= $app->tform->getAuthSQL('r', '', $limit_to_client_id, $group['groupid']); // TEST to show reseller data. //$sql .= $app->tform->getAuthSQL('r', '', 0, '3,28,39'); //echo $sql; From 1c6fba63f5b598edddf5d90b417edd0bb433ebee Mon Sep 17 00:00:00 2001 From: Herman van Rink Date: Sat, 29 Jul 2023 22:39:28 +0200 Subject: [PATCH 207/621] Lookup a client's group + all groups he is reselling. --- interface/web/dashboard/dashlets/limits.php | 33 +++++++++++++++------ 1 file changed, 24 insertions(+), 9 deletions(-) diff --git a/interface/web/dashboard/dashlets/limits.php b/interface/web/dashboard/dashlets/limits.php index 75c8b8e3f4..16e4436f38 100644 --- a/interface/web/dashboard/dashlets/limits.php +++ b/interface/web/dashboard/dashlets/limits.php @@ -202,15 +202,12 @@ public function _get_limit_usage($limit, $limit_to_client_id) if ($limit['db_where'] != '') { $sql .= $limit['db_where']." AND "; } - $group = $app->db->queryOneRecord("SELECT `groupid` FROM `sys_group` WHERE client_id=?", $limit_to_client_id); - $sql .= $app->tform->getAuthSQL('r', '', $limit_to_client_id, $group['groupid']); - // TEST to show reseller data. - //$sql .= $app->tform->getAuthSQL('r', '', 0, '3,28,39'); - //echo $sql; + $sql .= $app->tform->getAuthSQL('r', '', '', $this->clientid_to_groups_list($limit_to_client_id)); + $rec = $app->db->queryOneRecord($sql, $limit['db_table']); return $rec['number']; } - + public function _get_assigned_quota($limit, $limit_to_client_id) { global $app; @@ -219,14 +216,32 @@ public function _get_assigned_quota($limit, $limit_to_client_id) if ($limit['db_where'] != '') { $sql .= $limit['db_where']." AND "; } - $sql .= $app->tform->getAuthSQL('r', '', $limit_to_client_id); + $sql .= $app->tform->getAuthSQL('r', '', '', $this->clientid_to_groups_list($limit_to_client_id)); $rec = $app->db->queryOneRecord($sql, $limit['q_type'], $limit['db_table']); if ($limit['db_table'] == 'mail_user') { $quotaMB = $rec['number'] / 1048576; } // Mail quota is in bytes, must be converted to MB else { $quotaMB = $app->functions->intval($rec['number']); - } - return $quotaMB; + } + return $quotaMB; + } + + /** + * Lookup a client's group + all groups he is reselling. + * + * @return string Comma separated list of groupid's + */ + function clientid_to_groups_list($client_id) { + global $app; + + if ($client_id != null) { + // Get the clients groupid, and incase it's a reseller the groupid's of it's clients. + $group = $app->db->queryOneRecord("SELECT GROUP_CONCAT(groupid) AS groups FROM `sys_group` WHERE client_id IN (SELECT client_id FROM `client` WHERE client_id=? OR parent_client_id=?)", $client_id, $client_id); + dnl($group); + dnl($client_id); + return $group['groups']; + } + return null; } } From 90b9f4eba643b661a288a79332412cdd32d509e1 Mon Sep 17 00:00:00 2001 From: Herman van Rink Date: Sat, 29 Jul 2023 23:04:24 +0200 Subject: [PATCH 208/621] remove debug code --- interface/web/dashboard/dashlets/limits.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/interface/web/dashboard/dashlets/limits.php b/interface/web/dashboard/dashlets/limits.php index 16e4436f38..6cf7e9608f 100644 --- a/interface/web/dashboard/dashlets/limits.php +++ b/interface/web/dashboard/dashlets/limits.php @@ -238,8 +238,6 @@ function clientid_to_groups_list($client_id) { if ($client_id != null) { // Get the clients groupid, and incase it's a reseller the groupid's of it's clients. $group = $app->db->queryOneRecord("SELECT GROUP_CONCAT(groupid) AS groups FROM `sys_group` WHERE client_id IN (SELECT client_id FROM `client` WHERE client_id=? OR parent_client_id=?)", $client_id, $client_id); - dnl($group); - dnl($client_id); return $group['groups']; } return null; From 139b351dd7a5837818cb590e16aa178c3ef69a03 Mon Sep 17 00:00:00 2001 From: Herman van Rink Date: Sat, 29 Jul 2023 23:13:45 +0200 Subject: [PATCH 209/621] Mail is the exception with 0 == unlimited, instead of -1 --- interface/web/dashboard/dashlets/mailquota.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/interface/web/dashboard/dashlets/mailquota.php b/interface/web/dashboard/dashlets/mailquota.php index d38fc4431a..9817358745 100644 --- a/interface/web/dashboard/dashlets/mailquota.php +++ b/interface/web/dashboard/dashlets/mailquota.php @@ -26,6 +26,11 @@ function show($limit_to_client_id = null) { foreach($emails as &$email) { $email['email'] = $app->functions->idn_decode($email['email']); $email['used'] = $app->functions->formatBytes($email['used_raw'], 0); + // Mail is the exception with 0 == unlimited, instead of -1 + if ($email['quota_raw'] == 0) { + $email['quota_raw'] = -1; + } + $email['quota'] = $app->functions->formatBytesOrUnlimited($email['quota_raw'], 0); $total_used += $email['used_raw']; } From 90f8128af618b4e7d2c57812f0a8a9d56d7e375d Mon Sep 17 00:00:00 2001 From: Herman van Rink Date: Sun, 30 Jul 2023 14:21:20 +0200 Subject: [PATCH 210/621] Do not show percentage bar when db has no quota --- interface/web/dashboard/dashlets/databasequota.php | 4 ---- interface/web/dashboard/dashlets/templates/databasequota.htm | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/interface/web/dashboard/dashlets/databasequota.php b/interface/web/dashboard/dashlets/databasequota.php index 6403032b54..20db5eafb4 100644 --- a/interface/web/dashboard/dashlets/databasequota.php +++ b/interface/web/dashboard/dashlets/databasequota.php @@ -27,7 +27,6 @@ function show($limit_to_client_id = null) { $databases = $app->quota_lib->get_databasequota_data($limit_to_client_id); //print_r($databases); - $has_databasequota = false; $total_used = 0; if(is_array($databases) && !empty($databases)){ foreach ($databases as &$db) { @@ -38,9 +37,6 @@ function show($limit_to_client_id = null) { } $databases = $app->functions->htmlentities($databases); $tpl->setloop('databasequota', $databases); - $has_databasequota = isset($databases[0]['used']); - - $tpl->setVar('has_databasequota', $has_databasequota); $tpl->setVar('total_used', $app->functions->formatBytes($total_used, 0)); return $tpl->grab(); diff --git a/interface/web/dashboard/dashlets/templates/databasequota.htm b/interface/web/dashboard/dashlets/templates/databasequota.htm index 2676b65b35..5874c4b20a 100644 --- a/interface/web/dashboard/dashlets/templates/databasequota.htm +++ b/interface/web/dashboard/dashlets/templates/databasequota.htm @@ -14,7 +14,7 @@ {tmpl_var name='database_name'} {tmpl_var name='used'} {tmpl_var name='database_quota'} - {tmpl_if name="quota_raw" op="!=" value="-1"} + {tmpl_if name="database_quota_raw" op="!=" value="-1"}
{tmpl_var name="used_percentage"}% {tmpl_var name='used'} {tmpl_var name='of_txt'} {tmpl_var name='database_quota'} From c48d0caa572678845088012674b9c059373defb1 Mon Sep 17 00:00:00 2001 From: Herman van Rink Date: Sun, 30 Jul 2023 15:35:12 +0200 Subject: [PATCH 211/621] Move clientid_to_groups_list function to more generic location --- interface/lib/classes/functions.inc.php | 16 ++++++++++++++++ interface/web/dashboard/dashlets/limits.php | 4 ++-- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/interface/lib/classes/functions.inc.php b/interface/lib/classes/functions.inc.php index bca97ed301..f78fb8ad8e 100644 --- a/interface/lib/classes/functions.inc.php +++ b/interface/lib/classes/functions.inc.php @@ -674,6 +674,22 @@ public function func_client_cancel($client_id,$cancel) { return $result; } + /** + * Lookup a client's group + all groups he is reselling. + * + * @return string Comma separated list of groupid's + */ + function clientid_to_groups_list($client_id) { + global $app; + + if ($client_id != null) { + // Get the clients groupid, and incase it's a reseller the groupid's of it's clients. + $group = $app->db->queryOneRecord("SELECT GROUP_CONCAT(groupid) AS groups FROM `sys_group` WHERE client_id IN (SELECT client_id FROM `client` WHERE client_id=? OR parent_client_id=?)", $client_id, $client_id); + return $group['groups']; + } + return null; + } + } ?> diff --git a/interface/web/dashboard/dashlets/limits.php b/interface/web/dashboard/dashlets/limits.php index 6cf7e9608f..80fa632d89 100644 --- a/interface/web/dashboard/dashlets/limits.php +++ b/interface/web/dashboard/dashlets/limits.php @@ -202,7 +202,7 @@ public function _get_limit_usage($limit, $limit_to_client_id) if ($limit['db_where'] != '') { $sql .= $limit['db_where']." AND "; } - $sql .= $app->tform->getAuthSQL('r', '', '', $this->clientid_to_groups_list($limit_to_client_id)); + $sql .= $app->tform->getAuthSQL('r', '', '', $app->functions->clientid_to_groups_list($limit_to_client_id)); $rec = $app->db->queryOneRecord($sql, $limit['db_table']); return $rec['number']; @@ -216,7 +216,7 @@ public function _get_assigned_quota($limit, $limit_to_client_id) if ($limit['db_where'] != '') { $sql .= $limit['db_where']." AND "; } - $sql .= $app->tform->getAuthSQL('r', '', '', $this->clientid_to_groups_list($limit_to_client_id)); + $sql .= $app->tform->getAuthSQL('r', '', '', $app->functions->clientid_to_groups_list($limit_to_client_id)); $rec = $app->db->queryOneRecord($sql, $limit['q_type'], $limit['db_table']); if ($limit['db_table'] == 'mail_user') { $quotaMB = $rec['number'] / 1048576; From a4a0e413018b6e64ea93682a0eae654d047e702d Mon Sep 17 00:00:00 2001 From: Herman van Rink Date: Sun, 30 Jul 2023 15:35:42 +0200 Subject: [PATCH 212/621] Ordering that makes more sence --- interface/web/client/client_edit.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interface/web/client/client_edit.php b/interface/web/client/client_edit.php index 823a9ed3f6..7a510a6873 100644 --- a/interface/web/client/client_edit.php +++ b/interface/web/client/client_edit.php @@ -82,7 +82,7 @@ function onShowEdit() { chdir('../dashboard'); $dashlet_list = array(); - $dashlets = array('databasequota.php', 'limits.php', 'mailquota.php', 'quota.php'); + $dashlets = array('quota.php', 'databasequota.php', 'mailquota.php', 'limits.php'); $current_client_id = $this->id; foreach ($dashlets as $file) { From 4f1a8cc467f16ca72f3dffdbba8b31d7fe07cd20 Mon Sep 17 00:00:00 2001 From: Herman van Rink Date: Sun, 30 Jul 2023 15:38:30 +0200 Subject: [PATCH 213/621] Add the info tab to reseller_edit --- interface/lib/classes/quota_lib.inc.php | 24 ++++++------- interface/web/client/form/reseller.tform.php | 8 ++++- interface/web/client/reseller_edit.php | 35 +++++++++++++++++++ .../client/templates/reseller_edit_info.htm | 24 +++++++++++++ 4 files changed, 76 insertions(+), 15 deletions(-) create mode 100644 interface/web/client/templates/reseller_edit_info.htm diff --git a/interface/lib/classes/quota_lib.inc.php b/interface/lib/classes/quota_lib.inc.php index e38a7e117f..1807a18685 100644 --- a/interface/lib/classes/quota_lib.inc.php +++ b/interface/lib/classes/quota_lib.inc.php @@ -14,11 +14,9 @@ public function get_quota_data($clientid = null, $readable = true) { //print_r($monitor_data); // select all websites or websites belonging to client - $q = " SELECT * FROM web_domain - WHERE active = 'y' AND type = 'vhost'" - . 'AND sys_groupid ' . (($clientid != null) ? "= (SELECT default_group FROM sys_user WHERE client_id=?)" - : " IN (" . $_SESSION["s"]["user"]["groups"] . ")") - . " ORDER BY domain"; + $q = "SELECT * FROM web_domain WHERE type = 'vhost' AND "; + $q .= $app->tform->getAuthSQL('r', '', '', $app->functions->clientid_to_groups_list($clientid)); + $q .= " ORDER BY domain"; $sites = $app->db->queryAllRecords($q, $clientid); //print_r($sites); @@ -214,10 +212,9 @@ public function get_mailquota_data($clientid = null, $readable = true) { //print_r($monitor_data); // select all email accounts or email accounts belonging to client - $q = " SELECT * FROM mail_user" - . " WHERE sys_groupid " . (($clientid != null) ? "= (SELECT default_group FROM sys_user WHERE client_id=?)" - : " IN (" . $_SESSION["s"]["user"]["groups"] . ")") - . " ORDER BY email"; + $q = "SELECT * FROM mail_user WHERE"; + $q .= $app->tform->getAuthSQL('r', '', '', $app->functions->clientid_to_groups_list($clientid)); + $q .= " ORDER BY email"; $emails = $app->db->queryAllRecords($q, $clientid); //print_r($emails); @@ -274,11 +271,10 @@ public function get_databasequota_data($clientid = null, $readable = true) { //print_r($monitor_data); // select all databases belonging to client - $q = "SELECT * FROM web_database" - . " WHERE sys_groupid " . (($clientid != null) ? "= (SELECT default_group FROM sys_user WHERE client_id=?)" - : " IN (" . $_SESSION["s"]["user"]["groups"] . ")") - . " ORDER BY database_name"; - $databases = $app->db->queryAllRecords($q, $clientid); + $q = "SELECT * FROM web_database WHERE"; + $q .= $app->tform->getAuthSQL('r', '', '', $app->functions->clientid_to_groups_list($clientid)); + $q .= " ORDER BY database_name"; + $databases = $app->db->queryAllRecords($q); //print_r($databases); if(is_array($databases) && !empty($databases)){ diff --git a/interface/web/client/form/reseller.tform.php b/interface/web/client/form/reseller.tform.php index d48dea6229..6d5267bd08 100644 --- a/interface/web/client/form/reseller.tform.php +++ b/interface/web/client/form/reseller.tform.php @@ -45,7 +45,7 @@ $form["db_table"] = "client"; $form["db_table_idx"] = "client_id"; $form["db_history"] = "yes"; -$form["tab_default"] = "address"; +$form["tab_default"] = "info"; $form["list_default"] = "reseller_list.php"; $form["auth"] = 'yes'; @@ -80,6 +80,12 @@ } } +$form["tabs"]['info'] = array( + 'title' => "Info", + 'width' => 100, + 'template' => "templates/reseller_edit_info.htm", + 'fields' => array() +); $form["tabs"]['address'] = array ( 'title' => "Address", 'width' => 100, diff --git a/interface/web/client/reseller_edit.php b/interface/web/client/reseller_edit.php index 10da3b78e1..4dc89293f9 100644 --- a/interface/web/client/reseller_edit.php +++ b/interface/web/client/reseller_edit.php @@ -72,10 +72,45 @@ function onShowNew() { } } + // Hide the info tab when creating a new client. + unset($app->tform->formDef["tabs"]['info']); + $app->tform->formDef["tab_default"] = "address"; + parent::onShowNew(); } + function onShowEdit() { + global $app, $conf; + chdir('../dashboard'); + + $dashlet_list = array(); + $dashlets = array('quota.php', 'databasequota.php', 'mailquota.php', 'limits.php'); + $current_client_id = $this->id; + + foreach ($dashlets as $file) { + if ($file != '.' && $file != '..' && !is_dir(ISPC_WEB_PATH.'/dashboard/dashlets/'.$file)) { + $dashlet_name = substr($file, 0, -4); + $dashlet_class = 'dashlet_'.$dashlet_name; + include_once ISPC_WEB_PATH.'/dashboard/dashlets/'.$file; + $dashlet_list[$dashlet_name] = new $dashlet_class; + $dashlets_html .= $dashlet_list[$dashlet_name]->show($current_client_id); + } + } + $app->tpl->setVar('dashlets', $dashlets_html); + + chdir('../client'); + + $tmp = $app->db->queryOneRecord("SELECT company_name, contact_firstname, contact_name, email FROM client WHERE client_id = ?", $current_client_id); + + $app->tpl->setVar('company_name', $tmp['company_name']); + $app->tpl->setVar('contact_name', $tmp['contact_name']); + $app->tpl->setVar('email', $tmp['email']); + + parent::onShowEdit(); + } + + function onSubmit() { global $app, $conf; diff --git a/interface/web/client/templates/reseller_edit_info.htm b/interface/web/client/templates/reseller_edit_info.htm new file mode 100644 index 0000000000..26e9258d6d --- /dev/null +++ b/interface/web/client/templates/reseller_edit_info.htm @@ -0,0 +1,24 @@ + + + + From 87e02a00ae94ffc5e51c230f46066a2d0872d004 Mon Sep 17 00:00:00 2001 From: Herman van Rink Date: Sun, 30 Jul 2023 15:38:45 +0200 Subject: [PATCH 214/621] cleanup --- interface/web/dashboard/dashlets/databasequota.php | 10 ---------- interface/web/dashboard/dashlets/mailquota.php | 1 - interface/web/dashboard/dashlets/quota.php | 11 ----------- 3 files changed, 22 deletions(-) diff --git a/interface/web/dashboard/dashlets/databasequota.php b/interface/web/dashboard/dashlets/databasequota.php index 20db5eafb4..2c488e37a6 100644 --- a/interface/web/dashboard/dashlets/databasequota.php +++ b/interface/web/dashboard/dashlets/databasequota.php @@ -42,14 +42,4 @@ function show($limit_to_client_id = null) { return $tpl->grab(); } } - } - - - - - - - - -?> diff --git a/interface/web/dashboard/dashlets/mailquota.php b/interface/web/dashboard/dashlets/mailquota.php index 9817358745..88cee26e33 100644 --- a/interface/web/dashboard/dashlets/mailquota.php +++ b/interface/web/dashboard/dashlets/mailquota.php @@ -46,5 +46,4 @@ function show($limit_to_client_id = null) { return $tpl->grab(); } } - } diff --git a/interface/web/dashboard/dashlets/quota.php b/interface/web/dashboard/dashlets/quota.php index 2dc695ae14..ce8ee91c75 100644 --- a/interface/web/dashboard/dashlets/quota.php +++ b/interface/web/dashboard/dashlets/quota.php @@ -25,7 +25,6 @@ function show($limit_to_client_id = null) { $tpl->setVar($wb); $sites = $app->quota_lib->get_quota_data($limit_to_client_id); - //print_r($sites); $has_quota = false; if(is_array($sites) && !empty($sites)){ @@ -49,14 +48,4 @@ function show($limit_to_client_id = null) { return $tpl->grab(); } } - } - - - - - - - - -?> From cd17793ecd8f8f4e9b1fe6e16f5540b21540ef37 Mon Sep 17 00:00:00 2001 From: Till Date: Wed, 2 Aug 2023 12:59:29 +0200 Subject: [PATCH 215/621] Add support for Debian 12. --- install/dist/conf/debian120.conf.php | 244 +++++++++++++++++++++++ install/dist/conf/debiantesting.conf.php | 16 +- install/lib/classes/tpl.inc.php | 2 +- install/lib/install.lib.php | 7 + interface/lib/app.inc.php | 2 +- interface/lib/classes/tpl.inc.php | 2 +- server/lib/app.inc.php | 2 +- server/lib/classes/monitor_tools.inc.php | 6 + server/lib/classes/tpl.inc.php | 2 +- 9 files changed, 270 insertions(+), 13 deletions(-) create mode 100644 install/dist/conf/debian120.conf.php diff --git a/install/dist/conf/debian120.conf.php b/install/dist/conf/debian120.conf.php new file mode 100644 index 0000000000..bd6773c623 --- /dev/null +++ b/install/dist/conf/debian120.conf.php @@ -0,0 +1,244 @@ + diff --git a/install/dist/conf/debiantesting.conf.php b/install/dist/conf/debiantesting.conf.php index e2fa04f8ab..145e213d0c 100644 --- a/install/dist/conf/debiantesting.conf.php +++ b/install/dist/conf/debiantesting.conf.php @@ -43,7 +43,7 @@ $conf['runlevel'] = '/etc'; $conf['shells'] = '/etc/shells'; $conf['pam'] = '/etc/pam.d'; -$conf['default_php'] = "8.1"; +$conf['default_php'] = "8.2"; //* Services provided by this server, this selection will be overridden by the expert mode $conf['services']['mail'] = true; @@ -85,8 +85,8 @@ $conf['apache']['vhost_conf_dir'] = '/etc/apache2/sites-available'; $conf['apache']['vhost_conf_enabled_dir'] = '/etc/apache2/sites-enabled'; $conf['apache']['vhost_port'] = '8080'; -$conf['apache']['php_ini_path_apache'] = '/etc/php/7.4/apache2/php.ini'; -$conf['apache']['php_ini_path_cgi'] = '/etc/php/7.4/cgi/php.ini'; +$conf['apache']['php_ini_path_apache'] = '/etc/php/8.2/apache2/php.ini'; +$conf['apache']['php_ini_path_cgi'] = '/etc/php/8.2/cgi/php.ini'; //* Website base settings $conf['web']['website_basedir'] = '/var/www'; @@ -101,7 +101,7 @@ $conf['web']['apps_vhost_group'] = 'ispapps'; //* Fastcgi -$conf['fastcgi']['fastcgi_phpini_path'] = '/etc/php/7.4/cgi/'; +$conf['fastcgi']['fastcgi_phpini_path'] = '/etc/php/8.2/cgi/'; $conf['fastcgi']['fastcgi_starter_path'] = '/var/www/php-fcgi-scripts/[system_user]/'; $conf['fastcgi']['fastcgi_bin'] = '/usr/bin/php-cgi'; @@ -212,11 +212,11 @@ $conf['nginx']['init_script'] = 'nginx'; $conf['nginx']['vhost_port'] = '8080'; $conf['nginx']['cgi_socket'] = '/var/run/fcgiwrap.socket'; -$conf['nginx']['php_fpm_init_script'] = 'php7.4-fpm'; -$conf['nginx']['php_fpm_ini_path'] = '/etc/php/7.4/fpm/php.ini'; -$conf['nginx']['php_fpm_pool_dir'] = '/etc/php/7.4/fpm/pool.d'; +$conf['nginx']['php_fpm_init_script'] = 'php8.2-fpm'; +$conf['nginx']['php_fpm_ini_path'] = '/etc/php/8.2/fpm/php.ini'; +$conf['nginx']['php_fpm_pool_dir'] = '/etc/php/8.2/fpm/pool.d'; $conf['nginx']['php_fpm_start_port'] = 9010; -$conf['nginx']['php_fpm_socket_dir'] = '/var/lib/php7.4-fpm'; +$conf['nginx']['php_fpm_socket_dir'] = '/var/lib/php8.2-fpm'; //* OpenVZ $conf['openvz']['installed'] = false; diff --git a/install/lib/classes/tpl.inc.php b/install/lib/classes/tpl.inc.php index 2bea1e1fd5..12f2523a36 100644 --- a/install/lib/classes/tpl.inc.php +++ b/install/lib/classes/tpl.inc.php @@ -30,7 +30,7 @@ include_once ISPC_INSTALL_ROOT.'/install/lib/classes/tpl_error.inc.php'; include_once ISPC_INSTALL_ROOT.'/install/lib/classes/tpl_ini.inc.php'; - class tpl{ + class tpl extends stdClass{ /*-----------------------------------------------------------------------------\ | ATTENTION | diff --git a/install/lib/install.lib.php b/install/lib/install.lib.php index 5a0b0ceaf5..885432f7ef 100644 --- a/install/lib/install.lib.php +++ b/install/lib/install.lib.php @@ -252,6 +252,13 @@ function get_distname() { $distid = 'debian60'; $distbaseid = 'debian'; swriteln("Operating System: Debian 11.0 (Bullseye) or compatible\n"); + } elseif(substr(trim(file_get_contents('/etc/debian_version')),0,2) == '12') { + $distname = 'Debian'; + $distver = 'Bookworm'; + $distconfid = 'debian120'; + $distid = 'debian60'; + $distbaseid = 'debian'; + swriteln("Operating System: Debian 12.0 (Bookworm) or compatible\n"); } elseif(strstr(trim(file_get_contents('/etc/debian_version')), '/sid')) { $distname = 'Debian'; $distver = 'Testing'; diff --git a/interface/lib/app.inc.php b/interface/lib/app.inc.php index 0350e28051..17c88b837a 100644 --- a/interface/lib/app.inc.php +++ b/interface/lib/app.inc.php @@ -46,7 +46,7 @@ /* Application Class */ -class app { +class app extends stdClass { private $_language_inc = 0; private $_wb; diff --git a/interface/lib/classes/tpl.inc.php b/interface/lib/classes/tpl.inc.php index 977ed0901d..e999ba5bfe 100644 --- a/interface/lib/classes/tpl.inc.php +++ b/interface/lib/classes/tpl.inc.php @@ -30,7 +30,7 @@ include_once ISPC_CLASS_PATH.'/tpl_error.inc.php'; include_once ISPC_CLASS_PATH.'/tpl_ini.inc.php'; - class tpl{ + class tpl extends stdClass{ /*-----------------------------------------------------------------------------\ | ATTENTION | diff --git a/server/lib/app.inc.php b/server/lib/app.inc.php index 940e0cae81..4bd7360218 100644 --- a/server/lib/app.inc.php +++ b/server/lib/app.inc.php @@ -50,7 +50,7 @@ * @license bsd-3-clause * @link empty **/ -class app { +class app extends stdClass { /** @var array List of modules that have been loaded. */ var $loaded_modules = []; /** @var array List of plugins that have been loaded. */ diff --git a/server/lib/classes/monitor_tools.inc.php b/server/lib/classes/monitor_tools.inc.php index fa1ea26bab..86fe3e672d 100644 --- a/server/lib/classes/monitor_tools.inc.php +++ b/server/lib/classes/monitor_tools.inc.php @@ -231,6 +231,12 @@ function get_distname() { $distconfid = 'debian110'; $distid = 'debian60'; $distbaseid = 'debian'; + } elseif(substr(trim(file_get_contents('/etc/debian_version')),0,2) == '12') { + $distname = 'Debian'; + $distver = 'Bookworm'; + $distconfid = 'debian120'; + $distid = 'debian60'; + $distbaseid = 'debian'; } elseif(strstr(trim(file_get_contents('/etc/debian_version')), '/sid')) { $distname = 'Debian'; $distver = 'Testing'; diff --git a/server/lib/classes/tpl.inc.php b/server/lib/classes/tpl.inc.php index a4ba160252..b1f2cb8b35 100644 --- a/server/lib/classes/tpl.inc.php +++ b/server/lib/classes/tpl.inc.php @@ -30,7 +30,7 @@ include_once ISPC_CLASS_PATH.'/tpl_error.inc.php'; include_once ISPC_CLASS_PATH.'/tpl_ini.inc.php'; - class tpl{ + class tpl extends stdClass { /*-----------------------------------------------------------------------------\ | ATTENTION | From 841e96d4cd78a8cb58b4a39dd160b8e4c5c1f3f1 Mon Sep 17 00:00:00 2001 From: Till Date: Wed, 2 Aug 2023 14:25:37 +0200 Subject: [PATCH 216/621] Fixed some php 8.2 warnings --- install/lib/installer_base.lib.php | 2 +- server/plugins-available/rspamd_plugin.inc.php | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php index 43d312b0e6..92b2c0177e 100644 --- a/install/lib/installer_base.lib.php +++ b/install/lib/installer_base.lib.php @@ -28,7 +28,7 @@ EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -class installer_base { +class installer_base extends stdClass { var $wb = array(); var $language = 'en'; diff --git a/server/plugins-available/rspamd_plugin.inc.php b/server/plugins-available/rspamd_plugin.inc.php index 53500ef069..57663c8d43 100644 --- a/server/plugins-available/rspamd_plugin.inc.php +++ b/server/plugins-available/rspamd_plugin.inc.php @@ -528,10 +528,10 @@ function server_update($event_name, $data) { ); foreach ($local_d as $f) { $tpl = new tpl(); - if (file_exists($conf['rootpath']."/conf-custom/install/rspamd_${f}.master")) { - $tpl->newTemplate($conf['rootpath']."/conf-custom/install/rspamd_${f}.master"); + if (file_exists($conf['rootpath']."/conf-custom/install/rspamd_{$f}.master")) { + $tpl->newTemplate($conf['rootpath']."/conf-custom/install/rspamd_{$f}.master"); } else { - $tpl->newTemplate("rspamd_${f}.master"); + $tpl->newTemplate("rspamd_{$f}.master"); } $tpl->setVar('dkim_path', $mail_config['dkim_path']); @@ -543,7 +543,7 @@ function server_update($event_name, $data) { $tpl->setLoop('local_addrs', $local_addrs); } - $app->system->file_put_contents("/etc/rspamd/local.d/${f}", $tpl->grab()); + $app->system->file_put_contents("/etc/rspamd/local.d/{$f}", $tpl->grab()); if($mail_config['content_filter'] == 'rspamd'){ $app->services->restartServiceDelayed('rspamd', 'reload'); From b98377900b2353daed589f74b296bd00400b8dd8 Mon Sep 17 00:00:00 2001 From: Till Date: Wed, 2 Aug 2023 14:40:56 +0200 Subject: [PATCH 217/621] PHP 8.2 fix --- server/plugins-available/postfix_server_plugin.inc.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/server/plugins-available/postfix_server_plugin.inc.php b/server/plugins-available/postfix_server_plugin.inc.php index be81fb62a4..02455c1eb2 100644 --- a/server/plugins-available/postfix_server_plugin.inc.php +++ b/server/plugins-available/postfix_server_plugin.inc.php @@ -340,7 +340,7 @@ function update($event_name, $data) { foreach ($options as $key => $value) { $value = trim($value); if ($value == '') continue; - if (preg_match("|check_recipient_access\s+proxy:mysql:${quoted_postfix_config_dir}/mysql-verify_recipients.cf|", $value)) { + if (preg_match("|check_recipient_access\s+proxy:mysql:{$quoted_postfix_config_dir}/mysql-verify_recipients.cf|", $value)) { continue; } $new_options[] = $value; @@ -348,7 +348,7 @@ function update($event_name, $data) { if (isset($configure_lmtp) && $configure_lmtp && $mail_config['content_filter'] == 'amavisd') { for ($i = 0; isset($new_options[$i]); $i++) { if ($new_options[$i] == 'reject_unlisted_recipient') { - array_splice($new_options, $i+1, 0, array("check_recipient_access proxy:mysql:${quoted_postfix_config_dir}/mysql-verify_recipients.cf")); + array_splice($new_options, $i+1, 0, array("check_recipient_access proxy:mysql:{$quoted_postfix_config_dir}/mysql-verify_recipients.cf")); $app->system->exec_safe("postconf -e ?", 'address_verify_virtual_transport = smtp:[127.0.0.1]:10025'); $app->system->exec_safe("postconf -e ?", 'address_verify_transport_maps = static:smtp:[127.0.0.1]:10025'); @@ -378,7 +378,7 @@ function update($event_name, $data) { exec("postconf -e 'milter_mail_macros = i {mail_addr} {client_addr} {client_name} {auth_authen}'"); exec("postconf -e 'milter_default_action = accept'"); - exec("postconf -e 'smtpd_sender_restrictions = ${raslm} permit_mynetworks, check_sender_access proxy:mysql:/etc/postfix/mysql-virtual_sender.cf, ${rslm} permit_sasl_authenticated, reject_non_fqdn_sender, reject_unlisted_sender'"); + exec("postconf -e 'smtpd_sender_restrictions = {$raslm} permit_mynetworks, check_sender_access proxy:mysql:/etc/postfix/mysql-virtual_sender.cf, {$rslm} permit_sasl_authenticated, reject_non_fqdn_sender, reject_unlisted_sender'"); $new_options = array(); $options = preg_split("/,\s*/", exec("postconf -h smtpd_recipient_restrictions")); @@ -388,7 +388,7 @@ function update($event_name, $data) { if (preg_match('/check_policy_service\s+inet:127.0.0.1:10023/', $value)) { continue; } - if (preg_match("|check_recipient_access\s+proxy:mysql:${quoted_postfix_config_dir}/mysql-verify_recipients.cf|", $value)) { + if (preg_match("|check_recipient_access\s+proxy:mysql:{$quoted_postfix_config_dir}/mysql-verify_recipients.cf|", $value)) { continue; } $new_options[] = $value; @@ -420,7 +420,7 @@ function update($event_name, $data) { exec("postconf -e 'content_filter = " . ($configure_lmtp ? "lmtp" : "amavis" ) . ":[127.0.0.1]:10024'"); // fixme: should read this from conf templates - exec("postconf -e 'smtpd_sender_restrictions = ${raslm} check_sender_access regexp:/etc/postfix/tag_as_originating.re, permit_mynetworks, check_sender_access proxy:mysql:/etc/postfix/mysql-virtual_sender.cf, ${rslm} permit_sasl_authenticated, reject_non_fqdn_sender, reject_unlisted_sender, check_sender_access regexp:/etc/postfix/tag_as_foreign.re'"); + exec("postconf -e 'smtpd_sender_restrictions = {$raslm} check_sender_access regexp:/etc/postfix/tag_as_originating.re, permit_mynetworks, check_sender_access proxy:mysql:/etc/postfix/mysql-virtual_sender.cf, {$rslm} permit_sasl_authenticated, reject_non_fqdn_sender, reject_unlisted_sender, check_sender_access regexp:/etc/postfix/tag_as_foreign.re'"); } if($mail_config['content_filter'] == 'rspamd' && ($mail_config['rspamd_password'] != $old_ini_data['mail']['rspamd_password'] || $mail_config['content_filter'] != $old_ini_data['mail']['content_filter'])) { From d675db609bd2e528c7cce30412d005f772995c11 Mon Sep 17 00:00:00 2001 From: dachris1 Date: Thu, 3 Aug 2023 16:27:23 +0200 Subject: [PATCH 218/621] dovecot2.conf.master for gentoo --- install/dist/tpl/gentoo/dovecot2.conf.master | 115 +++++++++++++++++++ 1 file changed, 115 insertions(+) create mode 100644 install/dist/tpl/gentoo/dovecot2.conf.master diff --git a/install/dist/tpl/gentoo/dovecot2.conf.master b/install/dist/tpl/gentoo/dovecot2.conf.master new file mode 100644 index 0000000000..12288e2cde --- /dev/null +++ b/install/dist/tpl/gentoo/dovecot2.conf.master @@ -0,0 +1,115 @@ +# Do not change this file, as changes will be overwritten by any ISPConfig update. +# Put your custom settings in /usr/local/ispconfig/server/conf-custom/install/dovecot_custom.conf.master. +# To start using those changes, do a force upgrade and let it reconfigure your services. (ispconfig_update.sh --force) +listen = *,[::] +protocols = imap pop3 +auth_mechanisms = plain login +disable_plaintext_auth = no +log_timestamp = "%Y-%m-%d %H:%M:%S " +mail_privileged_group = vmail +postmaster_address = postmaster@example.com +ssl_cert = Date: Fri, 4 Aug 2023 17:39:16 +0200 Subject: [PATCH 219/621] Fixed various PHP 8.2 related warnings. --- install/tpl/system.ini.master | 2 +- server/lib/classes/system.inc.php | 1 + server/plugins-available/apache2_plugin.inc.php | 8 ++++---- server/plugins-available/cron_jailkit_plugin.inc.php | 1 + server/plugins-available/cron_plugin.inc.php | 3 ++- server/plugins-available/mail_plugin.inc.php | 4 ++-- server/plugins-available/maildeliver_plugin.inc.php | 7 +++++-- server/plugins-available/nginx_plugin.inc.php | 12 ++++++------ .../plugins-available/postfix_server_plugin.inc.php | 10 +++++----- server/plugins-available/rspamd_plugin.inc.php | 8 +++++++- .../plugins-available/shelluser_base_plugin.inc.php | 7 ++++--- .../shelluser_jailkit_plugin.inc.php | 10 ++++++---- server/plugins-available/webserver_plugin.inc.php | 8 ++++---- 13 files changed, 48 insertions(+), 33 deletions(-) diff --git a/install/tpl/system.ini.master b/install/tpl/system.ini.master index 07110c736f..0c4254f87b 100644 --- a/install/tpl/system.ini.master +++ b/install/tpl/system.ini.master @@ -35,7 +35,7 @@ vhost_aliasdomains=n client_username_web_check_disabled=n backups_include_into_web_quota=n reseller_can_use_options=n -web_php_options=no,fast-cgi,mod,php-fpm +web_php_options=no,fast-cgi,php-fpm show_aps_menu=n client_protection=y ssh_authentication= diff --git a/server/lib/classes/system.inc.php b/server/lib/classes/system.inc.php index 087efa48a6..6a8b418ffe 100644 --- a/server/lib/classes/system.inc.php +++ b/server/lib/classes/system.inc.php @@ -1151,6 +1151,7 @@ function add_user_to_group($group, $user = 'admispconfig'){ $group_file = $app->file->rf($this->server_conf['group_datei']); $group_file_lines = explode("\n", $group_file); foreach($group_file_lines as $group_file_line){ + if(empty($group_file_line)) continue; list($group_name, $group_x, $group_id, $group_users) = explode(':', $group_file_line); if($group_name == $group){ $group_users = explode(',', str_replace(' ', '', $group_users)); diff --git a/server/plugins-available/apache2_plugin.inc.php b/server/plugins-available/apache2_plugin.inc.php index 42b0e128e3..5f97ce6454 100644 --- a/server/plugins-available/apache2_plugin.inc.php +++ b/server/plugins-available/apache2_plugin.inc.php @@ -2189,7 +2189,7 @@ function delete($event_name, $data) { } if($data['old']['type'] == 'vhost' || $data['old']['type'] == 'vhostsubdomain' || $data['old']['type'] == 'vhostalias'){ - if(is_array($log_folders) && !empty($log_folders)){ + if(isset($log_folders) && is_array($log_folders) && !empty($log_folders)){ foreach($log_folders as $log_folder){ $app->system->exec_safe('umount -l ? 2>/dev/null', $data['old']['document_root'].'/'.$log_folder); } @@ -2209,7 +2209,7 @@ function delete($event_name, $data) { } //* remove mountpoint from fstab - if(is_array($log_folders) && !empty($log_folders)){ + if(isset($log_folders) && is_array($log_folders) && !empty($log_folders)){ foreach($log_folders as $log_folder){ $fstab_line = '/var/log/ispconfig/httpd/'.$data['old']['domain'].' '.$data['old']['document_root'].'/'.$log_folder.' none bind'; $app->system->removeLine('/etc/fstab', $fstab_line); @@ -2365,7 +2365,7 @@ function delete($event_name, $data) { // Delete the symlinks for the sites $client = $app->db->queryOneRecord('SELECT client_id FROM sys_group WHERE sys_group.groupid = ?', $data['old']['sys_groupid']); - $client_id = intval($client['client_id']); + $client_id = (is_array($client) && isset($client['client_id']))?intval($client['client_id']):0; unset($client); $tmp_symlinks_array = explode(':', $web_config['website_symlinks']); if(is_array($tmp_symlinks_array)) { @@ -3391,7 +3391,7 @@ private function php_fpm_pool_update ($data, $web_config, $pool_dir, $pool_name, // Custom php.ini settings $final_php_ini_settings = array(); - $custom_php_ini_settings = trim($data['new']['custom_php_ini']); + $custom_php_ini_settings = (isset($data['new']['custom_php_ini']) && !is_null($data['new']['custom_php_ini']))?trim($data['new']['custom_php_ini']):''; if(intval($data['new']['directive_snippets_id']) > 0){ $snippet = $app->db->queryOneRecord("SELECT * FROM directive_snippets WHERE directive_snippets_id = ? AND type = 'apache' AND active = 'y' AND customer_viewable = 'y'", intval($data['new']['directive_snippets_id'])); diff --git a/server/plugins-available/cron_jailkit_plugin.inc.php b/server/plugins-available/cron_jailkit_plugin.inc.php index 8bd33b3de0..08f039b371 100644 --- a/server/plugins-available/cron_jailkit_plugin.inc.php +++ b/server/plugins-available/cron_jailkit_plugin.inc.php @@ -34,6 +34,7 @@ class cron_jailkit_plugin { //* $plugin_name and $class_name have to be the same then the name of this class var $plugin_name = 'cron_jailkit_plugin'; var $class_name = 'cron_jailkit_plugin'; + var $parent_domain = array(); //* This function is called during ispconfig installation to determine // if a symlink shall be created for this plugin. diff --git a/server/plugins-available/cron_plugin.inc.php b/server/plugins-available/cron_plugin.inc.php index 331e85f919..f8b16b96cb 100644 --- a/server/plugins-available/cron_plugin.inc.php +++ b/server/plugins-available/cron_plugin.inc.php @@ -33,6 +33,7 @@ class cron_plugin { var $plugin_name = 'cron_plugin'; var $class_name = 'cron_plugin'; + var $parent_domain = array(); // private variables var $action = ''; @@ -106,7 +107,7 @@ function update($event_name, $data) { // Get the client ID $client = $app->dbmaster->queryOneRecord("SELECT client_id FROM sys_group WHERE sys_group.groupid = ?", $data["new"]["sys_groupid"]); - $client_id = intval($client["client_id"]); + $client_id = (is_array($client) && isset($client["client_id"]))?intval($client["client_id"]):0; unset($client); // Create group and user, if not exist diff --git a/server/plugins-available/mail_plugin.inc.php b/server/plugins-available/mail_plugin.inc.php index b8ffd40fbf..dd8b0ac5c0 100644 --- a/server/plugins-available/mail_plugin.inc.php +++ b/server/plugins-available/mail_plugin.inc.php @@ -222,8 +222,8 @@ function user_insert($event_name, $data) { $placeholders = array( '{domain}' => "$domain", '{email}' => $data["new"]["email"], - '{admin_mail}' => ($global_mail_config['admin_mail'] != '' ? $global_mail_config['admin_mail'] : 'root'), - '{admin_name}' => ($global_mail_config['admin_name'] != '' ? $global_mail_config['admin_name'] : ''), + '{admin_mail}' => (isset($global_mail_config['admin_mail']) && $global_mail_config['admin_mail'] != '' ? $global_mail_config['admin_mail'] : 'root'), + '{admin_name}' => (isset($global_mail_config['admin_name']) && $global_mail_config['admin_name'] != '' ? $global_mail_config['admin_name'] : ''), ); //* Get from address diff --git a/server/plugins-available/maildeliver_plugin.inc.php b/server/plugins-available/maildeliver_plugin.inc.php index 4a7a46fa89..15cf20c25f 100644 --- a/server/plugins-available/maildeliver_plugin.inc.php +++ b/server/plugins-available/maildeliver_plugin.inc.php @@ -134,7 +134,7 @@ function update($event_name, $data) { } // Custom filters - if($data["new"]["custom_mailfilter"] == 'NULL') $data["new"]["custom_mailfilter"] = ''; + if(is_null($data["new"]["custom_mailfilter"])) $data["new"]["custom_mailfilter"] = ''; $tpl->setVar('custom_mailfilter', str_replace("\r\n","\n",$data["new"]["custom_mailfilter"])); // Move junk @@ -142,10 +142,12 @@ function update($event_name, $data) { $tpl->setVar('imap_prefix', $data["new"]["imap_prefix"]); // Set autoresponder start date + if(is_null($data["new"]["autoresponder_start_date"])) $data["new"]["autoresponder_start_date"] = ''; $data["new"]["autoresponder_start_date"] = str_replace(" ", "T", $data["new"]["autoresponder_start_date"]); $tpl->setVar('start_date', $data["new"]["autoresponder_start_date"]); // Set autoresponder end date + if(is_null($data["new"]["autoresponder_end_date"])) $data["new"]["autoresponder_end_date"] = ''; $data["new"]["autoresponder_end_date"] = str_replace(" ", "T", $data["new"]["autoresponder_end_date"]); $tpl->setVar('end_date', $data["new"]["autoresponder_end_date"]); @@ -157,10 +159,11 @@ function update($event_name, $data) { $tpl->setVar('autoresponder_subject', $data["new"]["autoresponder_subject"]); // Autoresponder Text + if(is_null($data["new"]["autoresponder_text"])) $data["new"]["autoresponder_text"] = ''; $data["new"]["autoresponder_text"] = str_replace("\"", "'", $data["new"]["autoresponder_text"]); $tpl->setVar('autoresponder_text', $data["new"]["autoresponder_text"]); - if (! defined($address_str)) { + if (!isset($address_str)) { //* Set alias addresses for autoresponder $sql = "SELECT * FROM mail_forwarding WHERE type = 'alias' AND destination = ?"; $records = $app->db->queryAllRecords($sql, $data["new"]["email"]); diff --git a/server/plugins-available/nginx_plugin.inc.php b/server/plugins-available/nginx_plugin.inc.php index dc75cf6a19..f46257e661 100644 --- a/server/plugins-available/nginx_plugin.inc.php +++ b/server/plugins-available/nginx_plugin.inc.php @@ -101,7 +101,7 @@ function ssl($event_name, $data) { // load the server configuration options $app->uses('getconf'); $web_config = $app->getconf->get_server_config($conf['server_id'], 'web'); - if ($web_config['CA_path']!='' && !file_exists($web_config['CA_path'].'/openssl.cnf')) + if (isset($web_config['CA_path']) && $web_config['CA_path'] != '' && !file_exists($web_config['CA_path'].'/openssl.cnf')) $app->log("CA path error, file does not exist:".$web_config['CA_path'].'/openssl.cnf', LOGLEVEL_ERROR); //* Only vhosts can have a ssl cert @@ -693,7 +693,7 @@ function update($event_name, $data) { // Get the client ID $client = $app->dbmaster->queryOneRecord('SELECT client_id FROM sys_group WHERE sys_group.groupid = ?', $data['new']['sys_groupid']); - $client_id = intval($client['client_id']); + $client_id = (is_array($client)) ? intval($client['client_id']) : 0; unset($client); // Remove old symlinks, if site is renamed @@ -1277,7 +1277,7 @@ function update($event_name, $data) { } // folder_directive_snippets - if(trim($data['new']['folder_directive_snippets']) != ''){ + if(isset($data['new']['folder_directive_snippets']) && !is_null($data['new']['folder_directive_snippets']) && trim($data['new']['folder_directive_snippets']) != ''){ $data['new']['folder_directive_snippets'] = trim($data['new']['folder_directive_snippets']); $data['new']['folder_directive_snippets'] = str_replace("\r\n", "\n", $data['new']['folder_directive_snippets']); $data['new']['folder_directive_snippets'] = str_replace("\r", "\n", $data['new']['folder_directive_snippets']); @@ -1627,7 +1627,7 @@ function update($event_name, $data) { $server_alias = array(); // get autoalias - $auto_alias = $web_config['website_autoalias']; + $auto_alias = (isset($web_config['website_autoalias']))?$web_config['website_autoalias']:''; if($auto_alias != '') { // get the client username $client = $app->db->queryOneRecord("SELECT `username` FROM `client` WHERE `client_id` = ?", $client_id); @@ -1968,7 +1968,7 @@ function update($event_name, $data) { // create password file for stats directory if(!is_file($data['new']['document_root'].'/' . $stats_web_folder . '/stats/.htpasswd_stats') || $data['new']['stats_password'] != $data['old']['stats_password']) { - if(trim($data['new']['stats_password']) != '') { + if(isset($data['new']['stats_password']) && !is_null($data['new']['stats_password']) && trim($data['new']['stats_password']) != '') { $htp_file = 'admin:'.trim($data['new']['stats_password']); $app->system->file_put_contents($data['new']['document_root'].'/' . $stats_web_folder . '/stats/.htpasswd_stats', $htp_file); $app->system->chmod($data['new']['document_root'].'/' . $stats_web_folder . '/stats/.htpasswd_stats', 0755); @@ -2961,7 +2961,7 @@ private function php_fpm_pool_update ($data, $web_config, $pool_dir, $pool_name, // Custom php.ini settings $final_php_ini_settings = array(); - $custom_php_ini_settings = trim($data['new']['custom_php_ini']); + $custom_php_ini_settings = (isset($data['new']['custom_php_ini']) && !is_null($data['new']['custom_php_ini'])) ? trim($data['new']['custom_php_ini']) : ''; if(intval($data['new']['directive_snippets_id']) > 0){ $snippet = $app->db->queryOneRecord("SELECT * FROM directive_snippets WHERE directive_snippets_id = ? AND type = 'nginx' AND active = 'y' AND customer_viewable = 'y'", intval($data['new']['directive_snippets_id'])); diff --git a/server/plugins-available/postfix_server_plugin.inc.php b/server/plugins-available/postfix_server_plugin.inc.php index 02455c1eb2..8a5fc4f003 100644 --- a/server/plugins-available/postfix_server_plugin.inc.php +++ b/server/plugins-available/postfix_server_plugin.inc.php @@ -152,7 +152,7 @@ function update($event_name, $data) { $app->system->exec_safe("postconf -e ?", 'smtpd_client_restrictions = '.implode(", ", $new_options)); } - if ($mail_config['reject_sender_login_mismatch'] != $old_ini_data['mail']['reject_sender_login_mismatch']) { + if (isset($mail_config['reject_sender_login_mismatch']) && $mail_config['reject_sender_login_mismatch'] != $old_ini_data['mail']['reject_sender_login_mismatch']) { $options = preg_split("/,\s*/", exec("postconf -h smtpd_sender_restrictions")); $new_options = array(); foreach ($options as $key => $value) { @@ -185,7 +185,7 @@ function update($event_name, $data) { $app->system->exec_safe("postconf -e ?", 'smtpd_sender_restrictions = '.implode(", ", $new_options)); } - if ($mail_config['reject_unknown']) { + if (isset($mail_config['reject_unknown'])) { if (($mail_config['reject_unknown'] === 'client') || ($mail_config['reject_unknown'] === 'client_helo')) { $options = preg_split("/,\s*/", exec("postconf -h smtpd_client_restrictions")); $new_options = array(); @@ -263,7 +263,7 @@ function update($event_name, $data) { } } - if ($mail_config['stress_adaptive']) { + if (isset($mail_config['stress_adaptive'])) { if ($mail_config['stress_adaptive'] == 'y') { if (version_compare($postfix_version , '3.0', '>=')) { $app->system->exec_safe("postconf -e ?", 'in_flow_delay = ${stress?{3}:{1}}s'); @@ -363,8 +363,8 @@ function update($event_name, $data) { } exec("postconf -e 'smtpd_recipient_restrictions = ".implode(", ", $new_options)."'"); - $rslm = ($mail_config['reject_sender_login_mismatch'] == 'y') ? "reject_sender_login_mismatch," : ""; - $raslm = ($mail_config['reject_sender_login_mismatch'] == 'y') ? "reject_authenticated_sender_login_mismatch," : ""; + $rslm = (isset($mail_config['reject_sender_login_mismatch']) && $mail_config['reject_sender_login_mismatch'] == 'y') ? "reject_sender_login_mismatch," : ""; + $raslm = (isset($mail_config['reject_sender_login_mismatch']) && $mail_config['reject_sender_login_mismatch'] == 'y') ? "reject_authenticated_sender_login_mismatch," : ""; if($mail_config['content_filter'] == 'rspamd'){ exec("postconf -X 'receive_override_options'"); diff --git a/server/plugins-available/rspamd_plugin.inc.php b/server/plugins-available/rspamd_plugin.inc.php index 57663c8d43..c3a60d0bb9 100644 --- a/server/plugins-available/rspamd_plugin.inc.php +++ b/server/plugins-available/rspamd_plugin.inc.php @@ -33,6 +33,7 @@ class rspamd_plugin { var $plugin_name = 'rspamd_plugin'; var $class_name = 'rspamd_plugin'; var $users_config_dir = '/etc/rspamd/local.d/users/'; + var $action = ''; //* This function is called during ispconfig installation to determine // if a symlink shall be created for this plugin. @@ -281,7 +282,7 @@ function user_settings_update($event_name, $data, $internal = false) { $app->system->mkdirpath($this->users_config_dir); } - if((!$this->isValidEmail($app->functions->idn_encode($email_address))) || intval($data['new']['policy_id']) == 0 && $type == 'spamfilter_user') { + if((!$this->isValidEmail($app->functions->idn_encode($email_address))) || !isset($data['new']['policy_id']) || intval($data['new']['policy_id']) == 0 && $type == 'spamfilter_user') { if(is_file($settings_file)) { unlink($settings_file); } @@ -534,6 +535,11 @@ function server_update($event_name, $data) { $tpl->newTemplate("rspamd_{$f}.master"); } + if(!isset($mail_config['rspamd_redis_servers'])) $mail_config['rspamd_redis_servers'] = ''; + if(!isset($mail_config['rspamd_redis_password'])) $mail_config['rspamd_redis_password'] = ''; + if(!isset($mail_config['rspamd_redis_bayes_servers'])) $mail_config['rspamd_redis_bayes_servers'] = ''; + if(!isset($mail_config['rspamd_redis_bayes_password'])) $mail_config['rspamd_redis_bayes_password'] = ''; + $tpl->setVar('dkim_path', $mail_config['dkim_path']); $tpl->setVar('rspamd_redis_servers', $mail_config['rspamd_redis_servers']); $tpl->setVar('rspamd_redis_password', $mail_config['rspamd_redis_password']); diff --git a/server/plugins-available/shelluser_base_plugin.inc.php b/server/plugins-available/shelluser_base_plugin.inc.php index 3e512caa56..5bbda0e13d 100755 --- a/server/plugins-available/shelluser_base_plugin.inc.php +++ b/server/plugins-available/shelluser_base_plugin.inc.php @@ -33,6 +33,7 @@ class shelluser_base_plugin { var $plugin_name = 'shelluser_base_plugin'; var $class_name = 'shelluser_base_plugin'; var $min_uid = 499; + var $data = array(); //* This function is called during ispconfig installation to determine // if a symlink shall be created for this plugin. @@ -430,10 +431,10 @@ private function _setup_ssh_rsa() { // Get the client ID, username, and the key $domain_data = $app->db->queryOneRecord('SELECT sys_groupid FROM web_domain WHERE web_domain.domain_id = ?', $this->data['new']['parent_domain_id']); $sys_group_data = $app->db->queryOneRecord('SELECT * FROM sys_group WHERE sys_group.groupid = ?', $domain_data['sys_groupid']); - $id = intval($sys_group_data['client_id']); - $username= $sys_group_data['name']; + $id = (is_array($sys_group_data) && isset($sys_group_data['client_id']))?intval($sys_group_data['client_id']):0; + $username= (is_array($sys_group_data) && isset($sys_group_data['name']))?$sys_group_data['name']:''; $client_data = $app->db->queryOneRecord('SELECT * FROM client WHERE client.client_id = ?', $id); - $userkey = $client_data['ssh_rsa']; + $userkey = (is_array($client_data) && isset($client_data['ssh_rsa']))?$client_data['ssh_rsa']:''; unset($domain_data); unset($client_data); diff --git a/server/plugins-available/shelluser_jailkit_plugin.inc.php b/server/plugins-available/shelluser_jailkit_plugin.inc.php index 1b2ff74db9..fc37727ad7 100755 --- a/server/plugins-available/shelluser_jailkit_plugin.inc.php +++ b/server/plugins-available/shelluser_jailkit_plugin.inc.php @@ -34,6 +34,8 @@ class shelluser_jailkit_plugin { var $plugin_name = 'shelluser_jailkit_plugin'; var $class_name = 'shelluser_jailkit_plugin'; var $min_uid = 499; + var $data = array(); + var $jailkit_config = array(); //* This function is called during ispconfig installation to determine // if a symlink shall be created for this plugin. @@ -494,10 +496,10 @@ private function _setup_ssh_rsa() { // Get the client ID, username, and the key $domain_data = $app->db->queryOneRecord('SELECT sys_groupid FROM web_domain WHERE web_domain.domain_id = ?', $this->data['new']['parent_domain_id']); $sys_group_data = $app->db->queryOneRecord('SELECT * FROM sys_group WHERE sys_group.groupid = ?', $domain_data['sys_groupid']); - $id = intval($sys_group_data['client_id']); - $username= $sys_group_data['name']; + $id = (is_array($sys_group_data) && isset($sys_group_data['client_id']))?intval($sys_group_data['client_id']):0; + $username= (is_array($sys_group_data) && isset($sys_group_data['name']))?$sys_group_data['name']:''; $client_data = $app->db->queryOneRecord('SELECT * FROM client WHERE client.client_id = ?', $id); - $userkey = $client_data['ssh_rsa']; + $userkey = (is_array($client_data) && isset($client_data['ssh_rsa']))?$client_data['ssh_rsa']:''; unset($domain_data); unset($client_data); @@ -528,7 +530,7 @@ private function _setup_ssh_rsa() { // Remove duplicate keys $existing_keys = @file($sshkeys, FILE_IGNORE_NEW_LINES); - $new_keys = explode("\n", $userkey); + $new_keys = (!is_null($userkey))?explode("\n", $userkey):''; if(is_array($existing_keys)) { $final_keys_arr = @array_merge($existing_keys, $new_keys); } else { diff --git a/server/plugins-available/webserver_plugin.inc.php b/server/plugins-available/webserver_plugin.inc.php index bb884a6e2b..306cbf9f28 100644 --- a/server/plugins-available/webserver_plugin.inc.php +++ b/server/plugins-available/webserver_plugin.inc.php @@ -324,23 +324,23 @@ function server_update($event_name, $data) { } $check_files = array(); - if ($old['php_ini_path_apache'] != $new['php_ini_path_apache']) { + if (isset($new['php_ini_path_apache']) && $old['php_ini_path_apache'] != $new['php_ini_path_apache']) { $check_files[] = array('file' => $new['php_ini_path_apache'], 'mode' => 'mod', 'php_version' => 0); } - if ($old['fastcgi_phpini_path'] != $new['fastcgi_phpini_path']) { + if (isset($new['fastcgi_phpini_path']) && $old['fastcgi_phpini_path'] != $new['fastcgi_phpini_path']) { $check_files[] = array('file' => $new['fastcgi_phpini_path'], 'mode' => 'fast-cgi', 'php_version' => 0); } - if ($old['php_ini_path_cgi'] != $new['php_ini_path_cgi']) { + if (isset($new['php_ini_path_cgi']) && $old['php_ini_path_cgi'] != $new['php_ini_path_cgi']) { $check_files[] = array('file' => $new['php_ini_path_cgi'], 'mode' => 'fast-cgi', 'php_version' => 0); } - if ($old['php_fpm_ini_path'] != $new['php_fpm_ini_path']) { + if (isset($new['php_fpm_ini_path']) && $old['php_fpm_ini_path'] != $new['php_fpm_ini_path']) { $check_files[] = array('file' => $web_config['php_fpm_ini_path'], 'mode' => 'php-fpm', 'php_version' => 0); From ab8dc77ab18dea47071fbb03d5d0800bbcc4a080 Mon Sep 17 00:00:00 2001 From: Till Brehm Date: Fri, 4 Aug 2023 16:08:37 +0000 Subject: [PATCH 220/621] Fixed issue #1782 --- interface/lib/classes/db_mysql.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interface/lib/classes/db_mysql.inc.php b/interface/lib/classes/db_mysql.inc.php index 9ae929136b..9a7cf7129f 100644 --- a/interface/lib/classes/db_mysql.inc.php +++ b/interface/lib/classes/db_mysql.inc.php @@ -847,7 +847,7 @@ public function datalogStatus($login = '') { $result = $this->queryAllRecords("SELECT COUNT( * ) AS cnt, sys_datalog.action, sys_datalog.dbtable FROM sys_datalog, server - WHERE server.server_id = sys_datalog.server_id AND sys_datalog.user = ? AND sys_datalog.datalog_id > server.updated + WHERE (server.server_id = sys_datalog.server_id or sys_datalog.server_id = 0) AND sys_datalog.user = ? AND sys_datalog.datalog_id > server.updated GROUP BY sys_datalog.dbtable, sys_datalog.action", $login); foreach($result as $row) { From 85fa5d55ab7b3af9beb2cf1e09f073871b34c6fe Mon Sep 17 00:00:00 2001 From: Till Brehm Date: Fri, 4 Aug 2023 16:14:59 +0000 Subject: [PATCH 221/621] Fixes #6549 --- interface/web/sites/web_vhost_domain_edit.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/interface/web/sites/web_vhost_domain_edit.php b/interface/web/sites/web_vhost_domain_edit.php index e9e1ef602e..be9f0911c7 100644 --- a/interface/web/sites/web_vhost_domain_edit.php +++ b/interface/web/sites/web_vhost_domain_edit.php @@ -843,6 +843,8 @@ function onShowEnd() { $app->tpl->setVar('is_pagespeed_enabled', ($web_config['nginx_enable_pagespeed'])); } + $app->tpl->setVar('app_module', 'sites'); + parent::onShowEnd(); } From 63e55482a9586fea401630d22d32f94da1636700 Mon Sep 17 00:00:00 2001 From: Adam Date: Fri, 4 Aug 2023 16:20:41 +0000 Subject: [PATCH 222/621] Setting the language as a required field when creating a client --- interface/web/client/form/client.tform.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/interface/web/client/form/client.tform.php b/interface/web/client/form/client.tform.php index c6d05f9eb3..3f320e4e7e 100644 --- a/interface/web/client/form/client.tform.php +++ b/interface/web/client/form/client.tform.php @@ -224,6 +224,9 @@ 'language' => array ( 'datatype' => 'VARCHAR', 'formtype' => 'SELECT', + 'validators' => array ( 0 => array ( 'type' => 'NOTEMPTY', + 'errmsg'=> 'language_error_empty'), + ), 'default' => $conf["language"], 'value' => $language_list, 'separator' => '', From 3ce8e22dcf2d01f6076df87df4a8144bb861d966 Mon Sep 17 00:00:00 2001 From: Herman van Rink Date: Sat, 5 Aug 2023 23:14:38 +0200 Subject: [PATCH 223/621] Show use mail quota on mail user edit form --- interface/lib/classes/quota_lib.inc.php | 5 ++++- interface/web/mail/lib/lang/en_mail_user.lng | 1 + interface/web/mail/lib/lang/nl_mail_user.lng | 1 + interface/web/mail/mail_user_edit.php | 7 +++++++ .../web/mail/templates/mail_user_mailbox_edit.htm | 11 ++++++++++- 5 files changed, 23 insertions(+), 2 deletions(-) diff --git a/interface/lib/classes/quota_lib.inc.php b/interface/lib/classes/quota_lib.inc.php index 7c5b388536..dfa25a5816 100644 --- a/interface/lib/classes/quota_lib.inc.php +++ b/interface/lib/classes/quota_lib.inc.php @@ -218,7 +218,7 @@ public function get_ftptrafficquota_data($clientid = null, $lastdays = 0) { return $traffic_data; } - public function get_mailquota_data($clientid = null, $readable = true) { + public function get_mailquota_data($clientid = null, $readable = true, $email = null) { global $app; $tmp_rec = $app->db->queryAllRecords("SELECT data from monitor_data WHERE type = 'email_quota' ORDER BY created DESC"); @@ -236,6 +236,9 @@ public function get_mailquota_data($clientid = null, $readable = true) { } //print_r($monitor_data); + if ($email) { + return $monitor_data[$email]; + } // select all email accounts or email accounts belonging to client $emails = $app->db->queryAllRecords("SELECT * FROM mail_user".(($clientid != null)? " WHERE sys_groupid = (SELECT default_group FROM sys_user WHERE client_id=?)" : '') . " ORDER BY email", $clientid); diff --git a/interface/web/mail/lib/lang/en_mail_user.lng b/interface/web/mail/lib/lang/en_mail_user.lng index 96975a1a70..82dbd9bc9d 100644 --- a/interface/web/mail/lib/lang/en_mail_user.lng +++ b/interface/web/mail/lib/lang/en_mail_user.lng @@ -76,4 +76,5 @@ $wb['purge_junk_days_txt'] = 'Purge Junk automatically after X days'; $wb['tooltip_purge_junk_days_txt'] = '0 = disabled'; $wb['imap_prefix_txt'] = 'IMAP prefix'; $wb['tooltip_imap_prefix_txt'] = 'In most cases this should be left empty. To allow seamless per-mailbox migration of legacy systems you can specify a prefix followed by the hierarchy separator. e.g.: \'INBOX.\''; +$wb['used_txt'] = 'Used'; ?> diff --git a/interface/web/mail/lib/lang/nl_mail_user.lng b/interface/web/mail/lib/lang/nl_mail_user.lng index bf57cd61a9..6cc4132303 100644 --- a/interface/web/mail/lib/lang/nl_mail_user.lng +++ b/interface/web/mail/lib/lang/nl_mail_user.lng @@ -76,4 +76,5 @@ $wb['purge_junk_days_txt'] = 'Purge Junk automatically after X days'; $wb['tooltip_purge_junk_days_txt'] = '0 = disabled'; $wb['imap_prefix_txt'] = 'IMAP prefix'; $wb['tooltip_imap_prefix_txt'] = 'In most cases this should be left empty. To allow seamless per-mailbox migration of legacy systems you can specify a prefix followed by the hierarchy separator. e.g.: \'INBOX.\''; +$wb['used_txt'] = 'Gebruikt'; ?> diff --git a/interface/web/mail/mail_user_edit.php b/interface/web/mail/mail_user_edit.php index 975133fdc4..9652347fcc 100644 --- a/interface/web/mail/mail_user_edit.php +++ b/interface/web/mail/mail_user_edit.php @@ -143,6 +143,13 @@ function onShowEnd() { $global_config = $app->getconf->get_global_config(); $app->tpl->setVar('show_delete_on_forms', $global_config['misc']['show_delete_on_forms']); + # Fetch current disk usage. + $app->uses('quota_lib'); + $clientid = $app->db->queryOneRecord('SELECT `client_id` FROM `sys_group` WHERE `groupid` = ?', $this->dataRecord['sys_groupid']); + $monitor_data = $app->quota_lib->get_mailquota_data($clientid, FALSE, $this->dataRecord['email']); + $app->tpl->setVar("used_percentage", round($monitor_data['used'] * 100 / $this->dataRecord['quota'])); + $app->tpl->setVar('used', $app->functions->formatBytes($monitor_data['used'], 0)); + parent::onShowEnd(); } diff --git a/interface/web/mail/templates/mail_user_mailbox_edit.htm b/interface/web/mail/templates/mail_user_mailbox_edit.htm index 5dd5e50a90..6ef113cfb0 100644 --- a/interface/web/mail/templates/mail_user_mailbox_edit.htm +++ b/interface/web/mail/templates/mail_user_mailbox_edit.htm @@ -53,7 +53,16 @@
-
MB
+
MB
+ + {tmpl_if name="quota" op="!=" value="0"} +
+
{tmpl_var name='used_txt'}: {tmpl_var name='used'} / {tmpl_var name="used_percentage"}% + {tmpl_var name='used'} {tmpl_var name='of_txt'} {tmpl_var name='quota'} +
+
+ {tmpl_else}{tmpl_var name='used_txt'}: {tmpl_var name='used'}{/tmpl_if} +
From 15c73e92d602fc2c5a1b47dbd2a381327064e29c Mon Sep 17 00:00:00 2001 From: Herman van Rink Date: Sun, 6 Aug 2023 00:07:36 +0200 Subject: [PATCH 224/621] Show aliases in mail user edit form, #6553 --- interface/web/mail/lib/lang/en_mail_user.lng | 1 + interface/web/mail/mail_user_edit.php | 4 ++++ interface/web/mail/templates/mail_user_mailbox_edit.htm | 3 ++- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/interface/web/mail/lib/lang/en_mail_user.lng b/interface/web/mail/lib/lang/en_mail_user.lng index 96975a1a70..e0a79f7295 100644 --- a/interface/web/mail/lib/lang/en_mail_user.lng +++ b/interface/web/mail/lib/lang/en_mail_user.lng @@ -76,4 +76,5 @@ $wb['purge_junk_days_txt'] = 'Purge Junk automatically after X days'; $wb['tooltip_purge_junk_days_txt'] = '0 = disabled'; $wb['imap_prefix_txt'] = 'IMAP prefix'; $wb['tooltip_imap_prefix_txt'] = 'In most cases this should be left empty. To allow seamless per-mailbox migration of legacy systems you can specify a prefix followed by the hierarchy separator. e.g.: \'INBOX.\''; +$wb['mail_addresses_txt'] = 'Receives also mail for'; ?> diff --git a/interface/web/mail/mail_user_edit.php b/interface/web/mail/mail_user_edit.php index 975133fdc4..a4fe274dad 100644 --- a/interface/web/mail/mail_user_edit.php +++ b/interface/web/mail/mail_user_edit.php @@ -143,6 +143,10 @@ function onShowEnd() { $global_config = $app->getconf->get_global_config(); $app->tpl->setVar('show_delete_on_forms', $global_config['misc']['show_delete_on_forms']); + # Get addresses for this account. + $addresses = $app->db->queryAllRecords("SELECT source, type FROM mail_forwarding WHERE destination = ? AND ".$app->tform->getAuthSQL('r'), $email); + $app->tpl->setLoop("mail_addresses", $addresses); + parent::onShowEnd(); } diff --git a/interface/web/mail/templates/mail_user_mailbox_edit.htm b/interface/web/mail/templates/mail_user_mailbox_edit.htm index 5dd5e50a90..6abb7583d4 100644 --- a/interface/web/mail/templates/mail_user_mailbox_edit.htm +++ b/interface/web/mail/templates/mail_user_mailbox_edit.htm @@ -17,7 +17,8 @@
-
+ {tmpl_var name='mail_addresses_txt'}: {tmpl_var name='source'}({tmpl_var name='type'}), +
From 0d933fccf1742cd2f8dd62a1a38d0aef217edfe0 Mon Sep 17 00:00:00 2001 From: Herman van Rink Date: Sun, 6 Aug 2023 00:10:22 +0200 Subject: [PATCH 225/621] Translations --- interface/web/mail/lib/lang/ar_mail_user.lng | 1 + interface/web/mail/lib/lang/bg_mail_user.lng | 1 + interface/web/mail/lib/lang/br_mail_user.lng | 1 + interface/web/mail/lib/lang/ca_mail_user.lng | 1 + interface/web/mail/lib/lang/cn_mail_user.lng | 1 + interface/web/mail/lib/lang/cz_mail_user.lng | 1 + interface/web/mail/lib/lang/de_mail_user.lng | 1 + interface/web/mail/lib/lang/dk_mail_user.lng | 1 + interface/web/mail/lib/lang/el_mail_user.lng | 1 + interface/web/mail/lib/lang/es_mail_user.lng | 1 + interface/web/mail/lib/lang/fi_mail_user.lng | 1 + interface/web/mail/lib/lang/fr_mail_user.lng | 1 + interface/web/mail/lib/lang/hr_mail_user.lng | 1 + interface/web/mail/lib/lang/hu_mail_user.lng | 1 + interface/web/mail/lib/lang/id_mail_user.lng | 1 + interface/web/mail/lib/lang/it_mail_user.lng | 1 + interface/web/mail/lib/lang/ja_mail_user.lng | 1 + interface/web/mail/lib/lang/nl_mail_user.lng | 1 + interface/web/mail/lib/lang/pl_mail_user.lng | 1 + interface/web/mail/lib/lang/pt_mail_user.lng | 1 + interface/web/mail/lib/lang/ro_mail_user.lng | 1 + interface/web/mail/lib/lang/ru_mail_user.lng | 1 + interface/web/mail/lib/lang/se_mail_user.lng | 1 + interface/web/mail/lib/lang/sk_mail_user.lng | 1 + interface/web/mail/lib/lang/tr_mail_user.lng | 1 + 25 files changed, 25 insertions(+) diff --git a/interface/web/mail/lib/lang/ar_mail_user.lng b/interface/web/mail/lib/lang/ar_mail_user.lng index a879201cb0..7322ac4d3e 100644 --- a/interface/web/mail/lib/lang/ar_mail_user.lng +++ b/interface/web/mail/lib/lang/ar_mail_user.lng @@ -77,4 +77,5 @@ $wb['purge_junk_days_txt'] = 'Purge Junk automatically after X days'; $wb['tooltip_purge_junk_days_txt'] = '0 = disabled'; $wb['imap_prefix_txt'] = 'IMAP prefix'; $wb['tooltip_imap_prefix_txt'] = 'In most cases this should be left empty. To allow seamless per-mailbox migration of legacy systems you can specify a prefix followed by the hierarchy separator. e.g.: \'INBOX.\''; +$wb['mail_addresses_txt'] = 'Receives also mail for'; ?> diff --git a/interface/web/mail/lib/lang/bg_mail_user.lng b/interface/web/mail/lib/lang/bg_mail_user.lng index 3084b0d050..65d11cd247 100644 --- a/interface/web/mail/lib/lang/bg_mail_user.lng +++ b/interface/web/mail/lib/lang/bg_mail_user.lng @@ -77,4 +77,5 @@ $wb['purge_junk_days_txt'] = 'Purge Junk automatically after X days'; $wb['tooltip_purge_junk_days_txt'] = '0 = disabled'; $wb['imap_prefix_txt'] = 'IMAP prefix'; $wb['tooltip_imap_prefix_txt'] = 'In most cases this should be left empty. To allow seamless per-mailbox migration of legacy systems you can specify a prefix followed by the hierarchy separator. e.g.: \'INBOX.\''; +$wb['mail_addresses_txt'] = 'Receives also mail for'; ?> diff --git a/interface/web/mail/lib/lang/br_mail_user.lng b/interface/web/mail/lib/lang/br_mail_user.lng index 578b606cda..c11afd08f0 100644 --- a/interface/web/mail/lib/lang/br_mail_user.lng +++ b/interface/web/mail/lib/lang/br_mail_user.lng @@ -74,3 +74,4 @@ $wb['purge_trash_days_txt'] = 'Esvazia lixeira automaticamente após N dias'; $wb['tooltip_purge_trash_days_txt'] = '0 = desabilitado'; $wb['purge_junk_days_txt'] = 'Esvazia pasta Junk automaticamente após N dias'; $wb['tooltip_purge_junk_days_txt'] = '0 = desabilitado'; +$wb['mail_addresses_txt'] = 'Receives also mail for'; diff --git a/interface/web/mail/lib/lang/ca_mail_user.lng b/interface/web/mail/lib/lang/ca_mail_user.lng index 9489390a7e..f7bdd491fd 100644 --- a/interface/web/mail/lib/lang/ca_mail_user.lng +++ b/interface/web/mail/lib/lang/ca_mail_user.lng @@ -76,4 +76,5 @@ $wb['purge_junk_days_txt'] = 'Purge Junk automatically after X days'; $wb['tooltip_purge_junk_days_txt'] = '0 = disabled'; $wb['imap_prefix_txt'] = 'IMAP prefix'; $wb['tooltip_imap_prefix_txt'] = 'In most cases this should be left empty. To allow seamless per-mailbox migration of legacy systems you can specify a prefix followed by the hierarchy separator. e.g.: \'INBOX.\''; +$wb['mail_addresses_txt'] = 'Receives also mail for'; ?> diff --git a/interface/web/mail/lib/lang/cn_mail_user.lng b/interface/web/mail/lib/lang/cn_mail_user.lng index 9461e25228..8dbf0c553f 100644 --- a/interface/web/mail/lib/lang/cn_mail_user.lng +++ b/interface/web/mail/lib/lang/cn_mail_user.lng @@ -74,4 +74,5 @@ $wb['purge_trash_days_txt'] = '自动在 X 天后清空垃圾箱'; $wb['tooltip_purge_trash_days_txt'] = '0 = 禁用'; $wb['purge_junk_days_txt'] = '自动在 X 天后清空垃圾邮件'; $wb['tooltip_purge_junk_days_txt'] = '0 = 禁用'; +$wb['mail_addresses_txt'] = 'Receives also mail for'; ?> diff --git a/interface/web/mail/lib/lang/cz_mail_user.lng b/interface/web/mail/lib/lang/cz_mail_user.lng index 022e672387..25a4ba2f9a 100644 --- a/interface/web/mail/lib/lang/cz_mail_user.lng +++ b/interface/web/mail/lib/lang/cz_mail_user.lng @@ -75,3 +75,4 @@ $wb['tooltip_purge_trash_days_txt'] = '0 = neaktivní'; $wb['purge_junk_days_txt'] = 'Vyčistit nevyžádanou poštu \"Junk\" automaticky po X dnech.'; $wb['tooltip_purge_junk_days_txt'] = '0 = neaktivní'; $wb['disablesmtp_txt'] = 'Zakázat SMTP (pouze odesílání)'; +$wb['mail_addresses_txt'] = 'Receives also mail for'; diff --git a/interface/web/mail/lib/lang/de_mail_user.lng b/interface/web/mail/lib/lang/de_mail_user.lng index db8c85a2da..a06f5ef95c 100644 --- a/interface/web/mail/lib/lang/de_mail_user.lng +++ b/interface/web/mail/lib/lang/de_mail_user.lng @@ -78,3 +78,4 @@ $wb['imap_prefix_txt'] = 'IMAP prefix'; $wb['tooltip_imap_prefix_txt'] = 'In most cases this should be left empty. To allow seamless per-mailbox migration of legacy systems you can specify a prefix followed by the hierarchy separator. e.g.: \'INBOX.\''; ?> +$wb['mail_addresses_txt'] = 'Receives also mail for'; diff --git a/interface/web/mail/lib/lang/dk_mail_user.lng b/interface/web/mail/lib/lang/dk_mail_user.lng index d2e7cfd008..136a202746 100644 --- a/interface/web/mail/lib/lang/dk_mail_user.lng +++ b/interface/web/mail/lib/lang/dk_mail_user.lng @@ -76,4 +76,5 @@ $wb['purge_junk_days_txt'] = 'Purge Junk automatically after X days'; $wb['tooltip_purge_junk_days_txt'] = '0 = disabled'; $wb['imap_prefix_txt'] = 'IMAP prefix'; $wb['tooltip_imap_prefix_txt'] = 'In most cases this should be left empty. To allow seamless per-mailbox migration of legacy systems you can specify a prefix followed by the hierarchy separator. e.g.: \'INBOX.\''; +$wb['mail_addresses_txt'] = 'Receives also mail for'; ?> diff --git a/interface/web/mail/lib/lang/el_mail_user.lng b/interface/web/mail/lib/lang/el_mail_user.lng index 52b42874dd..9b01db0525 100644 --- a/interface/web/mail/lib/lang/el_mail_user.lng +++ b/interface/web/mail/lib/lang/el_mail_user.lng @@ -76,4 +76,5 @@ $wb['purge_junk_days_txt'] = 'Purge Junk automatically after X days'; $wb['tooltip_purge_junk_days_txt'] = '0 = disabled'; $wb['imap_prefix_txt'] = 'IMAP prefix'; $wb['tooltip_imap_prefix_txt'] = 'In most cases this should be left empty. To allow seamless per-mailbox migration of legacy systems you can specify a prefix followed by the hierarchy separator. e.g.: \'INBOX.\''; +$wb['mail_addresses_txt'] = 'Receives also mail for'; ?> diff --git a/interface/web/mail/lib/lang/es_mail_user.lng b/interface/web/mail/lib/lang/es_mail_user.lng index 43e1c3c550..7f331c50ad 100644 --- a/interface/web/mail/lib/lang/es_mail_user.lng +++ b/interface/web/mail/lib/lang/es_mail_user.lng @@ -76,4 +76,5 @@ $wb['purge_junk_days_txt'] = 'Purge Junk automatically after X days'; $wb['tooltip_purge_junk_days_txt'] = '0 = disabled'; $wb['imap_prefix_txt'] = 'IMAP prefix'; $wb['tooltip_imap_prefix_txt'] = 'In most cases this should be left empty. To allow seamless per-mailbox migration of legacy systems you can specify a prefix followed by the hierarchy separator. e.g.: \'INBOX.\''; +$wb['mail_addresses_txt'] = 'Receives also mail for'; ?> diff --git a/interface/web/mail/lib/lang/fi_mail_user.lng b/interface/web/mail/lib/lang/fi_mail_user.lng index bbb479d463..941aa37090 100644 --- a/interface/web/mail/lib/lang/fi_mail_user.lng +++ b/interface/web/mail/lib/lang/fi_mail_user.lng @@ -77,4 +77,5 @@ $wb['purge_junk_days_txt'] = 'Purge Junk automatically after X days'; $wb['tooltip_purge_junk_days_txt'] = '0 = disabled'; $wb['imap_prefix_txt'] = 'IMAP prefix'; $wb['tooltip_imap_prefix_txt'] = 'In most cases this should be left empty. To allow seamless per-mailbox migration of legacy systems you can specify a prefix followed by the hierarchy separator. e.g.: \'INBOX.\''; +$wb['mail_addresses_txt'] = 'Receives also mail for'; ?> diff --git a/interface/web/mail/lib/lang/fr_mail_user.lng b/interface/web/mail/lib/lang/fr_mail_user.lng index 74abb9de7f..9b19cab534 100644 --- a/interface/web/mail/lib/lang/fr_mail_user.lng +++ b/interface/web/mail/lib/lang/fr_mail_user.lng @@ -76,4 +76,5 @@ $wb['purge_junk_days_txt'] = 'Purge Junk automatically after X days'; $wb['tooltip_purge_junk_days_txt'] = '0 = disabled'; $wb['imap_prefix_txt'] = 'IMAP prefix'; $wb['tooltip_imap_prefix_txt'] = 'In most cases this should be left empty. To allow seamless per-mailbox migration of legacy systems you can specify a prefix followed by the hierarchy separator. e.g.: \'INBOX.\''; +$wb['mail_addresses_txt'] = 'Receives also mail for'; ?> diff --git a/interface/web/mail/lib/lang/hr_mail_user.lng b/interface/web/mail/lib/lang/hr_mail_user.lng index 0fa0370ceb..846a282f33 100644 --- a/interface/web/mail/lib/lang/hr_mail_user.lng +++ b/interface/web/mail/lib/lang/hr_mail_user.lng @@ -77,4 +77,5 @@ $wb['purge_junk_days_txt'] = 'Purge Junk automatically after X days'; $wb['tooltip_purge_junk_days_txt'] = '0 = disabled'; $wb['imap_prefix_txt'] = 'IMAP prefix'; $wb['tooltip_imap_prefix_txt'] = 'In most cases this should be left empty. To allow seamless per-mailbox migration of legacy systems you can specify a prefix followed by the hierarchy separator. e.g.: \'INBOX.\''; +$wb['mail_addresses_txt'] = 'Receives also mail for'; ?> diff --git a/interface/web/mail/lib/lang/hu_mail_user.lng b/interface/web/mail/lib/lang/hu_mail_user.lng index 1661f5b669..3347adefa5 100644 --- a/interface/web/mail/lib/lang/hu_mail_user.lng +++ b/interface/web/mail/lib/lang/hu_mail_user.lng @@ -77,4 +77,5 @@ $wb['purge_junk_days_txt'] = 'Purge Junk automatically after X days'; $wb['tooltip_purge_junk_days_txt'] = '0 = disabled'; $wb['imap_prefix_txt'] = 'IMAP prefix'; $wb['tooltip_imap_prefix_txt'] = 'In most cases this should be left empty. To allow seamless per-mailbox migration of legacy systems you can specify a prefix followed by the hierarchy separator. e.g.: \'INBOX.\''; +$wb['mail_addresses_txt'] = 'Receives also mail for'; ?> diff --git a/interface/web/mail/lib/lang/id_mail_user.lng b/interface/web/mail/lib/lang/id_mail_user.lng index fa5b74e8ea..a90350368e 100644 --- a/interface/web/mail/lib/lang/id_mail_user.lng +++ b/interface/web/mail/lib/lang/id_mail_user.lng @@ -77,4 +77,5 @@ $wb['purge_junk_days_txt'] = 'Purge Junk automatically after X days'; $wb['tooltip_purge_junk_days_txt'] = '0 = disabled'; $wb['imap_prefix_txt'] = 'IMAP prefix'; $wb['tooltip_imap_prefix_txt'] = 'In most cases this should be left empty. To allow seamless per-mailbox migration of legacy systems you can specify a prefix followed by the hierarchy separator. e.g.: \'INBOX.\''; +$wb['mail_addresses_txt'] = 'Receives also mail for'; ?> diff --git a/interface/web/mail/lib/lang/it_mail_user.lng b/interface/web/mail/lib/lang/it_mail_user.lng index dba7214e90..5f4071d55e 100644 --- a/interface/web/mail/lib/lang/it_mail_user.lng +++ b/interface/web/mail/lib/lang/it_mail_user.lng @@ -77,4 +77,5 @@ $wb['purge_junk_days_txt'] = 'Svuota cartella Indesiderati automaticamente dopo $wb['tooltip_purge_junk_days_txt'] = '0 = Disabilitato'; $wb['imap_prefix_txt'] = 'IMAP prefix'; $wb['tooltip_imap_prefix_txt'] = 'In most cases this should be left empty. To allow seamless per-mailbox migration of legacy systems you can specify a prefix followed by the hierarchy separator. e.g.: \'INBOX.\''; +$wb['mail_addresses_txt'] = 'Receives also mail for'; ?> diff --git a/interface/web/mail/lib/lang/ja_mail_user.lng b/interface/web/mail/lib/lang/ja_mail_user.lng index fc094c352a..ba2bf63b81 100644 --- a/interface/web/mail/lib/lang/ja_mail_user.lng +++ b/interface/web/mail/lib/lang/ja_mail_user.lng @@ -77,4 +77,5 @@ $wb['purge_junk_days_txt'] = 'Purge Junk automatically after X days'; $wb['tooltip_purge_junk_days_txt'] = '0 = disabled'; $wb['imap_prefix_txt'] = 'IMAP prefix'; $wb['tooltip_imap_prefix_txt'] = 'In most cases this should be left empty. To allow seamless per-mailbox migration of legacy systems you can specify a prefix followed by the hierarchy separator. e.g.: \'INBOX.\''; +$wb['mail_addresses_txt'] = 'Receives also mail for'; ?> diff --git a/interface/web/mail/lib/lang/nl_mail_user.lng b/interface/web/mail/lib/lang/nl_mail_user.lng index bf57cd61a9..0f09255f55 100644 --- a/interface/web/mail/lib/lang/nl_mail_user.lng +++ b/interface/web/mail/lib/lang/nl_mail_user.lng @@ -76,4 +76,5 @@ $wb['purge_junk_days_txt'] = 'Purge Junk automatically after X days'; $wb['tooltip_purge_junk_days_txt'] = '0 = disabled'; $wb['imap_prefix_txt'] = 'IMAP prefix'; $wb['tooltip_imap_prefix_txt'] = 'In most cases this should be left empty. To allow seamless per-mailbox migration of legacy systems you can specify a prefix followed by the hierarchy separator. e.g.: \'INBOX.\''; +$wb['mail_addresses_txt'] = 'Receives also mail for'; ?> diff --git a/interface/web/mail/lib/lang/pl_mail_user.lng b/interface/web/mail/lib/lang/pl_mail_user.lng index 7ed80ace95..5803cfffd8 100644 --- a/interface/web/mail/lib/lang/pl_mail_user.lng +++ b/interface/web/mail/lib/lang/pl_mail_user.lng @@ -77,4 +77,5 @@ $wb['purge_junk_days_txt'] = 'Purge Junk automatically after X days'; $wb['tooltip_purge_junk_days_txt'] = '0 = disabled'; $wb['imap_prefix_txt'] = 'IMAP prefix'; $wb['tooltip_imap_prefix_txt'] = 'In most cases this should be left empty. To allow seamless per-mailbox migration of legacy systems you can specify a prefix followed by the hierarchy separator. e.g.: \'INBOX.\''; +$wb['mail_addresses_txt'] = 'Receives also mail for'; ?> diff --git a/interface/web/mail/lib/lang/pt_mail_user.lng b/interface/web/mail/lib/lang/pt_mail_user.lng index 3bc325a52e..caea11c2c2 100644 --- a/interface/web/mail/lib/lang/pt_mail_user.lng +++ b/interface/web/mail/lib/lang/pt_mail_user.lng @@ -77,4 +77,5 @@ $wb['purge_junk_days_txt'] = 'Purge Junk automatically after X days'; $wb['tooltip_purge_junk_days_txt'] = '0 = disabled'; $wb['imap_prefix_txt'] = 'IMAP prefix'; $wb['tooltip_imap_prefix_txt'] = 'In most cases this should be left empty. To allow seamless per-mailbox migration of legacy systems you can specify a prefix followed by the hierarchy separator. e.g.: \'INBOX.\''; +$wb['mail_addresses_txt'] = 'Receives also mail for'; ?> diff --git a/interface/web/mail/lib/lang/ro_mail_user.lng b/interface/web/mail/lib/lang/ro_mail_user.lng index a7f2c4164d..d80cf78cc0 100644 --- a/interface/web/mail/lib/lang/ro_mail_user.lng +++ b/interface/web/mail/lib/lang/ro_mail_user.lng @@ -77,4 +77,5 @@ $wb['purge_junk_days_txt'] = 'Purge Junk automatically after X days'; $wb['tooltip_purge_junk_days_txt'] = '0 = disabled'; $wb['imap_prefix_txt'] = 'IMAP prefix'; $wb['tooltip_imap_prefix_txt'] = 'In most cases this should be left empty. To allow seamless per-mailbox migration of legacy systems you can specify a prefix followed by the hierarchy separator. e.g.: \'INBOX.\''; +$wb['mail_addresses_txt'] = 'Receives also mail for'; ?> diff --git a/interface/web/mail/lib/lang/ru_mail_user.lng b/interface/web/mail/lib/lang/ru_mail_user.lng index f0ab8c0bba..58fd39b2e4 100644 --- a/interface/web/mail/lib/lang/ru_mail_user.lng +++ b/interface/web/mail/lib/lang/ru_mail_user.lng @@ -77,4 +77,5 @@ $wb['purge_junk_days_txt'] = 'Purge Junk automatically after X days'; $wb['tooltip_purge_junk_days_txt'] = '0 = disabled'; $wb['imap_prefix_txt'] = 'IMAP prefix'; $wb['tooltip_imap_prefix_txt'] = 'In most cases this should be left empty. To allow seamless per-mailbox migration of legacy systems you can specify a prefix followed by the hierarchy separator. e.g.: \'INBOX.\''; +$wb['mail_addresses_txt'] = 'Receives also mail for'; ?> diff --git a/interface/web/mail/lib/lang/se_mail_user.lng b/interface/web/mail/lib/lang/se_mail_user.lng index 40c91caaa8..7fdbfca67c 100644 --- a/interface/web/mail/lib/lang/se_mail_user.lng +++ b/interface/web/mail/lib/lang/se_mail_user.lng @@ -77,4 +77,5 @@ $wb['purge_junk_days_txt'] = 'Purge Junk automatically after X days'; $wb['tooltip_purge_junk_days_txt'] = '0 = disabled'; $wb['imap_prefix_txt'] = 'IMAP prefix'; $wb['tooltip_imap_prefix_txt'] = 'In most cases this should be left empty. To allow seamless per-mailbox migration of legacy systems you can specify a prefix followed by the hierarchy separator. e.g.: \'INBOX.\''; +$wb['mail_addresses_txt'] = 'Receives also mail for'; ?> diff --git a/interface/web/mail/lib/lang/sk_mail_user.lng b/interface/web/mail/lib/lang/sk_mail_user.lng index 6af4528543..d997a32d27 100644 --- a/interface/web/mail/lib/lang/sk_mail_user.lng +++ b/interface/web/mail/lib/lang/sk_mail_user.lng @@ -77,4 +77,5 @@ $wb['purge_junk_days_txt'] = 'Purge Junk automatically after X days'; $wb['tooltip_purge_junk_days_txt'] = '0 = disabled'; $wb['imap_prefix_txt'] = 'IMAP prefix'; $wb['tooltip_imap_prefix_txt'] = 'In most cases this should be left empty. To allow seamless per-mailbox migration of legacy systems you can specify a prefix followed by the hierarchy separator. e.g.: \'INBOX.\''; +$wb['mail_addresses_txt'] = 'Receives also mail for'; ?> diff --git a/interface/web/mail/lib/lang/tr_mail_user.lng b/interface/web/mail/lib/lang/tr_mail_user.lng index c3dfbf1ecf..751f02a164 100644 --- a/interface/web/mail/lib/lang/tr_mail_user.lng +++ b/interface/web/mail/lib/lang/tr_mail_user.lng @@ -76,4 +76,5 @@ $wb['purge_junk_days_txt'] = 'Purge Junk automatically after X days'; $wb['tooltip_purge_junk_days_txt'] = '0 = disabled'; $wb['imap_prefix_txt'] = 'IMAP prefix'; $wb['tooltip_imap_prefix_txt'] = 'In most cases this should be left empty. To allow seamless per-mailbox migration of legacy systems you can specify a prefix followed by the hierarchy separator. e.g.: \'INBOX.\''; +$wb['mail_addresses_txt'] = 'Receives also mail for'; ?> From 7ca2f4d1ffec1d4d5a67af10ba9ba7e200cf4649 Mon Sep 17 00:00:00 2001 From: dachris1 Date: Mon, 7 Aug 2023 16:06:43 +0200 Subject: [PATCH 226/621] install/dist/lib/gentoo.lib.php there are some parts where a user is added to a group with "adduser" command. changed "adduser" to "usermod -a -G" since there is no "adduser" in gentoo. --- install/dist/lib/gentoo.lib.php | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/install/dist/lib/gentoo.lib.php b/install/dist/lib/gentoo.lib.php index 8c942f2491..ef660d950d 100644 --- a/install/dist/lib/gentoo.lib.php +++ b/install/dist/lib/gentoo.lib.php @@ -942,7 +942,8 @@ public function configure_apps_vhost() caselog($command.' &> /dev/null 2> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command"); } - $command = 'adduser '.$conf['apache']['user'].' '.$apps_vhost_group; + //$command = 'adduser '.$conf['apache']['user'].' '.$apps_vhost_group; + $command = 'usermod -a -G '.$apps_vhost_group.' '.$conf['apache']['user']; caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command"); if(!@is_dir($install_dir)){ @@ -1002,7 +1003,8 @@ public function configure_apps_vhost() if(!is_user($apps_vhost_user)) caselog($command.' &> /dev/null 2> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command"); - $command = 'adduser '.$conf['nginx']['user'].' '.$apps_vhost_group; + //$command = 'adduser '.$conf['nginx']['user'].' '.$apps_vhost_group; + $command = 'usermod -a -G '.$apps_vhost_group.' '.$conf['nginx']['user']; caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command"); if(!@is_dir($install_dir)){ @@ -1362,18 +1364,18 @@ public function install_ispconfig() { // and must be fixed as this will allow the apache user to read the ispconfig files. // Later this must run as own apache server or via suexec! if($conf['apache']['installed'] == true){ - $command = 'adduser '.$conf['apache']['user'].' ispconfig'; + $command = 'usermod -a -G ispconfig '.$conf['apache']['user']; caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command"); if(is_group('ispapps')){ - $command = 'adduser '.$conf['apache']['user'].' ispapps'; + $command = 'usermod -a -G ispapps '.$conf['apache']['user']; caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command"); } } if($conf['nginx']['installed'] == true){ - $command = 'adduser '.$conf['nginx']['user'].' ispconfig'; + $command = 'usermod -a -G ispconfig '.$conf['nginx']['user']; caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command"); if(is_group('ispapps')){ - $command = 'adduser '.$conf['nginx']['user'].' ispapps'; + $command = 'usermod -a -G ispapps '.$conf['nginx']['user']; caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command"); } } @@ -1597,3 +1599,4 @@ public function install_ispconfig() { } ?> + From 7c9ecfff33b4fa5c65ebbdcbbee64c6a2b741b10 Mon Sep 17 00:00:00 2001 From: Till Date: Mon, 7 Aug 2023 16:13:23 +0200 Subject: [PATCH 227/621] Fixes adduser warnings during update. --- install/lib/installer_base.lib.php | 38 ++++++++++++++++++++---------- 1 file changed, 26 insertions(+), 12 deletions(-) diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php index 92b2c0177e..0041670225 100644 --- a/install/lib/installer_base.lib.php +++ b/install/lib/installer_base.lib.php @@ -2060,8 +2060,10 @@ public function configure_rspamd() { } # unneccesary, since this was done above? - $command = 'usermod -a -G amavis _rspamd'; - caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command"); + if(is_user('_rspamd') && is_group('amavis')) { + $command = 'usermod -a -G amavis _rspamd'; + caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command"); + } if(strpos(rf('/etc/rspamd/rspamd.conf'), '.include "$LOCAL_CONFDIR/local.d/users.conf"') === false){ af('/etc/rspamd/rspamd.conf', '.include "$LOCAL_CONFDIR/local.d/users.conf"'); @@ -2682,7 +2684,7 @@ public function configure_apps_vhost() { //$command = 'adduser '.$conf['apache']['user'].' '.$apps_vhost_group; $command = 'usermod -a -G '.$apps_vhost_group.' '.$conf['apache']['user']; - caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command"); + caselog($command.' &> /dev/null 2>&1', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command"); if(!@is_dir($install_dir)){ mkdir($install_dir, 0755, true); @@ -2774,7 +2776,7 @@ public function configure_apps_vhost() { //$command = 'adduser '.$conf['nginx']['user'].' '.$apps_vhost_group; $command = 'usermod -a -G '.$apps_vhost_group.' '.$conf['nginx']['user']; - caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command"); + caselog($command.' &> /dev/null 2>&1', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command"); if(!@is_dir($install_dir)){ mkdir($install_dir, 0755, true); @@ -3654,20 +3656,32 @@ public function install_ispconfig() { // and must be fixed as this will allow the apache user to read the ispconfig files. // Later this must run as own apache server or via suexec! if($conf['apache']['installed'] == true){ - $command = 'adduser '.$conf['apache']['user'].' ispconfig'; - caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command"); - if(is_group('ispapps')){ - $command = 'adduser '.$conf['apache']['user'].' ispapps'; + $ispc_groupinfo = posix_getgrnam('ispconfig'); + if(!in_array($conf['apache']['user'],$ispc_groupinfo['members'])) { + $command = 'adduser '.$conf['apache']['user'].' ispconfig'; caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command"); } + if(is_group('ispapps')){ + $ispapps_groupinfo = posix_getgrnam('ispapps'); + if(!in_array($conf['apache']['user'],$ispapps_groupinfo['members'])) { + $command = 'adduser '.$conf['apache']['user'].' ispapps'; + caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command"); + } + } } if($conf['nginx']['installed'] == true){ - $command = 'adduser '.$conf['nginx']['user'].' ispconfig'; - caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command"); - if(is_group('ispapps')){ - $command = 'adduser '.$conf['nginx']['user'].' ispapps'; + $ispc_groupinfo = posix_getgrnam('ispconfig'); + if(!in_array($conf['nginx']['user'],$ispc_groupinfo['members'])) { + $command = 'adduser '.$conf['nginx']['user'].' ispconfig'; caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command"); } + if(is_group('ispapps')){ + $ispapps_groupinfo = posix_getgrnam('ispapps'); + if(!in_array($conf['nginx']['user'],$ispapps_groupinfo['members'])) { + $command = 'adduser '.$conf['nginx']['user'].' ispapps'; + caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command"); + } + } } //* Make the shell scripts executable From 3ba072a2a1481487450fa082cdf7a2fb588231d2 Mon Sep 17 00:00:00 2001 From: Herman van Rink Date: Wed, 9 Aug 2023 00:26:51 +0200 Subject: [PATCH 228/621] Add condition for new form, and unlimited quota --- interface/web/mail/mail_user_edit.php | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/interface/web/mail/mail_user_edit.php b/interface/web/mail/mail_user_edit.php index 9652347fcc..8fed360a0e 100644 --- a/interface/web/mail/mail_user_edit.php +++ b/interface/web/mail/mail_user_edit.php @@ -143,13 +143,16 @@ function onShowEnd() { $global_config = $app->getconf->get_global_config(); $app->tpl->setVar('show_delete_on_forms', $global_config['misc']['show_delete_on_forms']); - # Fetch current disk usage. - $app->uses('quota_lib'); - $clientid = $app->db->queryOneRecord('SELECT `client_id` FROM `sys_group` WHERE `groupid` = ?', $this->dataRecord['sys_groupid']); - $monitor_data = $app->quota_lib->get_mailquota_data($clientid, FALSE, $this->dataRecord['email']); - $app->tpl->setVar("used_percentage", round($monitor_data['used'] * 100 / $this->dataRecord['quota'])); - $app->tpl->setVar('used', $app->functions->formatBytes($monitor_data['used'], 0)); - + if($this->id > 0) { + # Fetch current disk usage. + $app->uses('quota_lib'); + $clientid = $app->db->queryOneRecord('SELECT `client_id` FROM `sys_group` WHERE `groupid` = ?', $this->dataRecord['sys_groupid']); + $monitor_data = $app->quota_lib->get_mailquota_data($clientid, FALSE, $this->dataRecord['email']); + if ($this->dataRecord['quota'] != 0) { + $app->tpl->setVar("used_percentage", round($monitor_data['used'] * 100 / $this->dataRecord['quota'])); + } + $app->tpl->setVar('used', $app->functions->formatBytes($monitor_data['used'], 0)); + } parent::onShowEnd(); } From e24a5449ecdd0c6be71e72fc0e29dae6524c6f87 Mon Sep 17 00:00:00 2001 From: Herman van Rink Date: Wed, 9 Aug 2023 00:42:24 +0200 Subject: [PATCH 229/621] Only in edit mode --- interface/web/mail/mail_user_edit.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/interface/web/mail/mail_user_edit.php b/interface/web/mail/mail_user_edit.php index a4fe274dad..341ec3e321 100644 --- a/interface/web/mail/mail_user_edit.php +++ b/interface/web/mail/mail_user_edit.php @@ -143,9 +143,11 @@ function onShowEnd() { $global_config = $app->getconf->get_global_config(); $app->tpl->setVar('show_delete_on_forms', $global_config['misc']['show_delete_on_forms']); - # Get addresses for this account. - $addresses = $app->db->queryAllRecords("SELECT source, type FROM mail_forwarding WHERE destination = ? AND ".$app->tform->getAuthSQL('r'), $email); - $app->tpl->setLoop("mail_addresses", $addresses); + if($this->id > 0) { + # Get addresses for this account. + $addresses = $app->db->queryAllRecords("SELECT source, type FROM mail_forwarding WHERE destination = ? AND ".$app->tform->getAuthSQL('r'), $email); + $app->tpl->setLoop("mail_addresses", $addresses); + } parent::onShowEnd(); } From 2a5d2f6b1620da9fa1eeb18bec6237a55f759cf4 Mon Sep 17 00:00:00 2001 From: Herman van Rink Date: Fri, 18 Aug 2023 15:22:35 +0200 Subject: [PATCH 230/621] Frontend part from 5374-mail-last-accessed branch --- install/sql/incremental/upd_dev_collection.sql | 2 ++ install/sql/ispconfig3.sql | 1 + interface/lib/classes/quota_lib.inc.php | 7 +++++++ interface/lib/lang/en.lng | 2 ++ interface/lib/lang/nl.lng | 2 ++ interface/web/dashboard/dashlets/mailquota.php | 2 ++ interface/web/dashboard/dashlets/templates/mailquota.htm | 2 ++ interface/web/mail/list/mail_user.list.php | 8 ++++++++ interface/web/mail/mail_user_edit.php | 7 +++++++ interface/web/mail/templates/mail_user_list.htm | 2 +- interface/web/mail/templates/mail_user_mailbox_edit.htm | 5 ++++- 11 files changed, 38 insertions(+), 2 deletions(-) diff --git a/install/sql/incremental/upd_dev_collection.sql b/install/sql/incremental/upd_dev_collection.sql index e69de29bb2..95217d2da4 100644 --- a/install/sql/incremental/upd_dev_collection.sql +++ b/install/sql/incremental/upd_dev_collection.sql @@ -0,0 +1,2 @@ + +ALTER TABLE `mail_user` ADD `last_access` timestamp NULL DEFAULT NULL after `disabledoveadm`; diff --git a/install/sql/ispconfig3.sql b/install/sql/ispconfig3.sql index 75529ab82b..c9fc8d6144 100644 --- a/install/sql/ispconfig3.sql +++ b/install/sql/ispconfig3.sql @@ -1096,6 +1096,7 @@ CREATE TABLE `mail_user` ( `disablelda` enum('n','y') NOT NULL default 'n', `disablelmtp` enum('n','y') NOT NULL default 'n', `disabledoveadm` enum('n','y') NOT NULL default 'n', + `last_access` itimestamp NULL DEFAULT NULL, `disablequota-status` enum('n','y') NOT NULL default 'n', `disableindexer-worker` enum('n','y') NOT NULL default 'n', `last_quota_notification` date NULL default NULL, diff --git a/interface/lib/classes/quota_lib.inc.php b/interface/lib/classes/quota_lib.inc.php index 7c5b388536..bef6c15130 100644 --- a/interface/lib/classes/quota_lib.inc.php +++ b/interface/lib/classes/quota_lib.inc.php @@ -244,6 +244,13 @@ public function get_mailquota_data($clientid = null, $readable = true) { for($i=0;$ilng('never_accessed_txt'); + } + else { + $emails[$i]['last_access'] = date($app->lng('conf_format_datetime'), $emails[$i]['last_access']); + } + $emails[$i]['name'] = $app->functions->htmlentities($emails[$i]['name']); $emails[$i]['used'] = isset($monitor_data[$email]['used']) ? $monitor_data[$email]['used'] : array(1 => 0); diff --git a/interface/lib/lang/en.lng b/interface/lib/lang/en.lng index 6024cc69a7..73aea8652a 100644 --- a/interface/lib/lang/en.lng +++ b/interface/lib/lang/en.lng @@ -175,4 +175,6 @@ $wb['server_id_0_error_txt'] = 'Please select a valid Server. Server ID must be $wb['datalog_changes_close_txt'] = 'Close'; $wb['non_admin_error'] = 'Requires administrator level permissions'; $wb['copy_to_clipboard_txt'] = 'Copy to clipboard'; +$wb['last_accessed_txt'] = 'Last accessed'; +$wb['never_accessed_txt'] = 'Never or unknown'; ?> diff --git a/interface/lib/lang/nl.lng b/interface/lib/lang/nl.lng index 582c5ffe53..27a7e6cd01 100644 --- a/interface/lib/lang/nl.lng +++ b/interface/lib/lang/nl.lng @@ -174,4 +174,6 @@ $wb['server_id_0_error_txt'] = 'Please select a valid Server. Server ID must be $wb['datalog_changes_close_txt'] = 'Sluiten'; $wb['non_admin_error'] = 'Requires administrator level permissions'; $wb['copy_to_clipboard_txt'] = 'Kopieer naar klembord'; +$wb['last_accessed_txt'] = 'Laatst gebruikt'; +$wb['never_accessed_txt'] = 'Niet of onbekend'; ?> diff --git a/interface/web/dashboard/dashlets/mailquota.php b/interface/web/dashboard/dashlets/mailquota.php index a9434e58ea..337d066459 100644 --- a/interface/web/dashboard/dashlets/mailquota.php +++ b/interface/web/dashboard/dashlets/mailquota.php @@ -14,6 +14,7 @@ function show() { $wb = array(); $lng_file = 'lib/lang/'.$_SESSION['s']['language'].'_dashlet_mailquota.lng'; if(is_file($lng_file)) include $lng_file; + $wb['last_accessed_txt'] = $app->lng('last_accessed_txt'); $tpl->setVar($wb); $emails = $app->quota_lib->get_mailquota_data( ($_SESSION["s"]["user"]["typ"] != 'admin') ? $_SESSION['s']['user']['client_id'] : null); @@ -27,6 +28,7 @@ function show() { unset($email); // email username is quoted in quota.lib already, so no htmlentities here to prevent double encoding //$emails = $app->functions->htmlentities($emails); + $email['last_access'] = date($app->lng('conf_format_datetime'), $email['last_access']); $tpl->setloop('mailquota', $emails); $has_mailquota = isset($emails[0]['used']); } diff --git a/interface/web/dashboard/dashlets/templates/mailquota.htm b/interface/web/dashboard/dashlets/templates/mailquota.htm index b30815456d..a01fd41910 100644 --- a/interface/web/dashboard/dashlets/templates/mailquota.htm +++ b/interface/web/dashboard/dashlets/templates/mailquota.htm @@ -6,6 +6,7 @@ {tmpl_var name='email_txt'} {tmpl_var name='name_txt'} {tmpl_var name='used_txt'} + {tmpl_var name='last_accessed_txt'} {tmpl_var name='quota_txt'} @@ -15,6 +16,7 @@ {tmpl_var name='email'} {tmpl_var name='name'} {tmpl_var name='used'} + {tmpl_var name='last_access'} {tmpl_var name='quota'} {tmpl_if name="quota_raw" op="!=" value="-1"}
diff --git a/interface/web/mail/list/mail_user.list.php b/interface/web/mail/list/mail_user.list.php index 3e020ea603..0ca521c270 100644 --- a/interface/web/mail/list/mail_user.list.php +++ b/interface/web/mail/list/mail_user.list.php @@ -133,5 +133,13 @@ 'suffix' => "", 'width' => "", 'value' => array('n' => $app->lng('yes_txt'), 'y' => $app->lng('no_txt'))); +$liste["item"][] = array( 'field' => "last_access", + 'datatype' => "DATE", + 'formtype' => "TEXT", + 'op' => "=", + 'prefix' => "", + 'suffix' => "", + 'width' => "", + 'value' => ""); ?> diff --git a/interface/web/mail/mail_user_edit.php b/interface/web/mail/mail_user_edit.php index 975133fdc4..560cc7408a 100644 --- a/interface/web/mail/mail_user_edit.php +++ b/interface/web/mail/mail_user_edit.php @@ -136,6 +136,13 @@ function onShowEnd() { $app->tpl->setVar("enable_custom_login", 0); } + if (!empty($this->dataRecord['last_access'])) { + $app->tpl->setVar("last_access", date($app->lng('conf_format_datetime'), $this->dataRecord['last_access'])); + } + else { + $app->tpl->setVar("last_access", $app->lng('never_accessed_txt')); + } + $csrf_token = $app->auth->csrf_token_get('mail_user_del'); $app->tpl->setVar('_csrf_id', $csrf_token['csrf_id']); $app->tpl->setVar('_csrf_key', $csrf_token['csrf_key']); diff --git a/interface/web/mail/templates/mail_user_list.htm b/interface/web/mail/templates/mail_user_list.htm index 12659260ac..e2ff3614a0 100644 --- a/interface/web/mail/templates/mail_user_list.htm +++ b/interface/web/mail/templates/mail_user_list.htm @@ -61,7 +61,7 @@

- {tmpl_var name="email"} + {tmpl_var name='last_accessed_txt'}: {tmpl_var name='last_access'}">{tmpl_var name="email"} {tmpl_var name="login"} {tmpl_var name="name"} {tmpl_var name="autoresponder"} diff --git a/interface/web/mail/templates/mail_user_mailbox_edit.htm b/interface/web/mail/templates/mail_user_mailbox_edit.htm index 5dd5e50a90..b22beda49c 100644 --- a/interface/web/mail/templates/mail_user_mailbox_edit.htm +++ b/interface/web/mail/templates/mail_user_mailbox_edit.htm @@ -44,7 +44,10 @@
-
+ + {tmpl_var name='last_accessed_txt'}: {tmpl_var name='last_access'} +
+
From 85bcf5c6f44e9935c2f898bf18560017526dd17c Mon Sep 17 00:00:00 2001 From: Herman van Rink Date: Fri, 18 Aug 2023 21:46:51 +0200 Subject: [PATCH 231/621] Convert back to a timestamp works better with date() --- install/sql/incremental/upd_dev_collection.sql | 2 +- install/sql/ispconfig3.sql | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/install/sql/incremental/upd_dev_collection.sql b/install/sql/incremental/upd_dev_collection.sql index 95217d2da4..37cf2312fe 100644 --- a/install/sql/incremental/upd_dev_collection.sql +++ b/install/sql/incremental/upd_dev_collection.sql @@ -1,2 +1,2 @@ -ALTER TABLE `mail_user` ADD `last_access` timestamp NULL DEFAULT NULL after `disabledoveadm`; +ALTER TABLE `mail_user` ADD `last_access` int(11) NULL DEFAULT NULL after `disabledoveadm`; diff --git a/install/sql/ispconfig3.sql b/install/sql/ispconfig3.sql index c9fc8d6144..b391ff05be 100644 --- a/install/sql/ispconfig3.sql +++ b/install/sql/ispconfig3.sql @@ -1096,7 +1096,7 @@ CREATE TABLE `mail_user` ( `disablelda` enum('n','y') NOT NULL default 'n', `disablelmtp` enum('n','y') NOT NULL default 'n', `disabledoveadm` enum('n','y') NOT NULL default 'n', - `last_access` itimestamp NULL DEFAULT NULL, + `last_access` int(11) NULL DEFAULT NULL, `disablequota-status` enum('n','y') NOT NULL default 'n', `disableindexer-worker` enum('n','y') NOT NULL default 'n', `last_quota_notification` date NULL default NULL, From 2a9aff08fec58e462c4d6568a6816819f15fd815 Mon Sep 17 00:00:00 2001 From: Herman van Rink Date: Sat, 19 Aug 2023 17:48:34 +0200 Subject: [PATCH 232/621] Add mailbox_show_last_access config option --- interface/web/admin/form/system_config.tform.php | 6 ++++++ interface/web/admin/lib/lang/ar_system_config.lng | 1 + interface/web/admin/lib/lang/bg_system_config.lng | 1 + interface/web/admin/lib/lang/br_system_config.lng | 1 + interface/web/admin/lib/lang/ca_system_config.lng | 1 + interface/web/admin/lib/lang/cn_system_config.lng | 1 + interface/web/admin/lib/lang/cz_system_config.lng | 1 + interface/web/admin/lib/lang/de_system_config.lng | 1 + interface/web/admin/lib/lang/dk_system_config.lng | 1 + interface/web/admin/lib/lang/el_system_config.lng | 1 + interface/web/admin/lib/lang/en_system_config.lng | 1 + interface/web/admin/lib/lang/es_system_config.lng | 1 + interface/web/admin/lib/lang/fi_system_config.lng | 1 + interface/web/admin/lib/lang/fr_system_config.lng | 1 + interface/web/admin/lib/lang/hr_system_config.lng | 1 + interface/web/admin/lib/lang/hu_system_config.lng | 1 + interface/web/admin/lib/lang/id_system_config.lng | 1 + interface/web/admin/lib/lang/it_system_config.lng | 1 + interface/web/admin/lib/lang/ja_system_config.lng | 1 + interface/web/admin/lib/lang/nl_system_config.lng | 1 + interface/web/admin/lib/lang/pl_system_config.lng | 1 + interface/web/admin/lib/lang/pt_system_config.lng | 1 + interface/web/admin/lib/lang/ro_system_config.lng | 1 + interface/web/admin/lib/lang/ru_system_config.lng | 1 + interface/web/admin/lib/lang/se_system_config.lng | 1 + interface/web/admin/lib/lang/sk_system_config.lng | 1 + interface/web/admin/lib/lang/tr_system_config.lng | 1 + interface/web/admin/templates/system_config_mail_edit.htm | 6 ++++++ interface/web/dashboard/dashlets/templates/mailquota.htm | 5 +++-- interface/web/mail/mail_user_edit.php | 1 + interface/web/mail/templates/mail_user_list.htm | 2 +- interface/web/mail/templates/mail_user_mailbox_edit.htm | 2 +- 32 files changed, 44 insertions(+), 4 deletions(-) diff --git a/interface/web/admin/form/system_config.tform.php b/interface/web/admin/form/system_config.tform.php index fb93fcaf47..fd7f49006b 100644 --- a/interface/web/admin/form/system_config.tform.php +++ b/interface/web/admin/form/system_config.tform.php @@ -303,6 +303,12 @@ 'default' => 'y', 'value' => array(0 => 'n', 1 => 'y') ), + 'mailbox_show_last_access' => array ( + 'datatype' => 'VARCHAR', + 'formtype' => 'CHECKBOX', + 'default' => 'y', + 'value' => array(0 => 'n', 1 => 'y') + ), 'mailboxlist_webmail_link' => array ( 'datatype' => 'VARCHAR', 'formtype' => 'CHECKBOX', diff --git a/interface/web/admin/lib/lang/ar_system_config.lng b/interface/web/admin/lib/lang/ar_system_config.lng index f8a3284170..263dffaf78 100644 --- a/interface/web/admin/lib/lang/ar_system_config.lng +++ b/interface/web/admin/lib/lang/ar_system_config.lng @@ -108,4 +108,5 @@ $wb['show_aps_menu_note_url_txt'] = 'Click here for more information.'; $wb['dns_show_zoneexport_txt'] = 'Show zone export.'; $wb['le_caa_autocreate_options_txt'] = 'Enable automatic creation of CAA record on issuing LE'; $wb['show_delete_on_forms_txt'] = 'Show delete button on edit forms'; +$wb['mailbox_show_last_access_txt'] = 'Show last access time for mail accounts'; ?> diff --git a/interface/web/admin/lib/lang/bg_system_config.lng b/interface/web/admin/lib/lang/bg_system_config.lng index 46c3a37c82..ac325ed0df 100644 --- a/interface/web/admin/lib/lang/bg_system_config.lng +++ b/interface/web/admin/lib/lang/bg_system_config.lng @@ -108,4 +108,5 @@ $wb['show_aps_menu_note_url_txt'] = 'Click here for more information.'; $wb['dns_show_zoneexport_txt'] = 'Show zone export.'; $wb['le_caa_autocreate_options_txt'] = 'Enable automatic creation of CAA record on issuing LE'; $wb['show_delete_on_forms_txt'] = 'Show delete button on edit forms'; +$wb['mailbox_show_last_access_txt'] = 'Show last access time for mail accounts'; ?> diff --git a/interface/web/admin/lib/lang/br_system_config.lng b/interface/web/admin/lib/lang/br_system_config.lng index 7de2802512..cb45b12a0c 100644 --- a/interface/web/admin/lib/lang/br_system_config.lng +++ b/interface/web/admin/lib/lang/br_system_config.lng @@ -109,3 +109,4 @@ $wb['monitor_key_txt'] = 'Senha do Monitor'; $wb['dns_show_zoneexport_txt'] = 'Show zone export.'; $wb['le_caa_autocreate_options_txt'] = 'Enable automatic creation of CAA record on issuing LE'; $wb['show_delete_on_forms_txt'] = 'Show delete button on edit forms'; +$wb['mailbox_show_last_access_txt'] = 'Show last access time for mail accounts'; diff --git a/interface/web/admin/lib/lang/ca_system_config.lng b/interface/web/admin/lib/lang/ca_system_config.lng index 2ad762e232..db1fd2bf3e 100644 --- a/interface/web/admin/lib/lang/ca_system_config.lng +++ b/interface/web/admin/lib/lang/ca_system_config.lng @@ -108,4 +108,5 @@ $wb['show_aps_menu_note_url_txt'] = 'Click here for more information.'; $wb['dns_show_zoneexport_txt'] = 'Show zone export.'; $wb['le_caa_autocreate_options_txt'] = 'Enable automatic creation of CAA record on issuing LE'; $wb['show_delete_on_forms_txt'] = 'Show delete button on edit forms'; +$wb['mailbox_show_last_access_txt'] = 'Show last access time for mail accounts'; ?> diff --git a/interface/web/admin/lib/lang/cn_system_config.lng b/interface/web/admin/lib/lang/cn_system_config.lng index 694472161f..1cc90bbcb6 100644 --- a/interface/web/admin/lib/lang/cn_system_config.lng +++ b/interface/web/admin/lib/lang/cn_system_config.lng @@ -107,4 +107,5 @@ $wb['show_aps_menu_note_txt'] = 'APS 将在不久的将来从面板中移除。' $wb['show_aps_menu_note_url_txt'] = '点击这里了解更多信息。'; $wb['dns_show_zoneexport_txt'] = '显示区域导出。'; $wb['le_caa_autocreate_options_txt'] = '在颁发 LE 时启用 CAA 记录的自动创建'; +$wb['mailbox_show_last_access_txt'] = 'Show last access time for mail accounts'; ?> diff --git a/interface/web/admin/lib/lang/cz_system_config.lng b/interface/web/admin/lib/lang/cz_system_config.lng index 5b93f9e724..c9e38544d6 100644 --- a/interface/web/admin/lib/lang/cz_system_config.lng +++ b/interface/web/admin/lib/lang/cz_system_config.lng @@ -109,3 +109,4 @@ $wb['monitor_key_txt'] = 'Monitor keyword'; $wb['dns_show_zoneexport_txt'] = 'Show zone export.'; $wb['le_caa_autocreate_options_txt'] = 'Enable automatic creation of CAA record on issuing LE'; $wb['show_delete_on_forms_txt'] = 'Show delete button on edit forms'; +$wb['mailbox_show_last_access_txt'] = 'Show last access time for mail accounts'; diff --git a/interface/web/admin/lib/lang/de_system_config.lng b/interface/web/admin/lib/lang/de_system_config.lng index 2c80ba6553..be813f37e9 100644 --- a/interface/web/admin/lib/lang/de_system_config.lng +++ b/interface/web/admin/lib/lang/de_system_config.lng @@ -108,4 +108,5 @@ $wb['show_aps_menu_note_url_txt'] = 'Click here for more information.'; $wb['dns_show_zoneexport_txt'] = 'Show zone export.'; $wb['le_caa_autocreate_options_txt'] = 'Automatische Erstellung des CAA-Records bei LE Ausstellung aktivieren'; $wb['show_delete_on_forms_txt'] = 'Show delete button on edit forms'; +$wb['mailbox_show_last_access_txt'] = 'Show last access time for mail accounts'; ?> diff --git a/interface/web/admin/lib/lang/dk_system_config.lng b/interface/web/admin/lib/lang/dk_system_config.lng index 7deb9e9974..8bab928479 100644 --- a/interface/web/admin/lib/lang/dk_system_config.lng +++ b/interface/web/admin/lib/lang/dk_system_config.lng @@ -108,4 +108,5 @@ $wb['show_aps_menu_note_url_txt'] = 'Click here for more information.'; $wb['dns_show_zoneexport_txt'] = 'Show zone export.'; $wb['le_caa_autocreate_options_txt'] = 'Enable automatic creation of CAA record on issuing LE'; $wb['show_delete_on_forms_txt'] = 'Show delete button on edit forms'; +$wb['mailbox_show_last_access_txt'] = 'Show last access time for mail accounts'; ?> diff --git a/interface/web/admin/lib/lang/el_system_config.lng b/interface/web/admin/lib/lang/el_system_config.lng index 5061cccec7..60466af811 100644 --- a/interface/web/admin/lib/lang/el_system_config.lng +++ b/interface/web/admin/lib/lang/el_system_config.lng @@ -108,4 +108,5 @@ $wb['show_aps_menu_note_url_txt'] = 'Click here for more information.'; $wb['dns_show_zoneexport_txt'] = 'Show zone export.'; $wb['le_caa_autocreate_options_txt'] = 'Enable automatic creation of CAA record on issuing LE'; $wb['show_delete_on_forms_txt'] = 'Show delete button on edit forms'; +$wb['mailbox_show_last_access_txt'] = 'Show last access time for mail accounts'; ?> diff --git a/interface/web/admin/lib/lang/en_system_config.lng b/interface/web/admin/lib/lang/en_system_config.lng index 375aade367..72876c505a 100644 --- a/interface/web/admin/lib/lang/en_system_config.lng +++ b/interface/web/admin/lib/lang/en_system_config.lng @@ -109,4 +109,5 @@ $wb['show_aps_menu_note_url_txt'] = 'Click here for more information.'; $wb['dns_show_zoneexport_txt'] = 'Show zone export.'; $wb['le_caa_autocreate_options_txt'] = 'Enable automatic creation of CAA record on issuing LE'; $wb['show_delete_on_forms_txt'] = 'Show delete button on edit forms'; +$wb['mailbox_show_last_access_txt'] = 'Show last access time for mail accounts'; ?> diff --git a/interface/web/admin/lib/lang/es_system_config.lng b/interface/web/admin/lib/lang/es_system_config.lng index b1dec51d66..18f44ff3d1 100644 --- a/interface/web/admin/lib/lang/es_system_config.lng +++ b/interface/web/admin/lib/lang/es_system_config.lng @@ -108,4 +108,5 @@ $wb['show_aps_menu_note_url_txt'] = 'Click here for more information.'; $wb['dns_show_zoneexport_txt'] = 'Show zone export.'; $wb['le_caa_autocreate_options_txt'] = 'Enable automatic creation of CAA record on issuing LE'; $wb['show_delete_on_forms_txt'] = 'Show delete button on edit forms'; +$wb['mailbox_show_last_access_txt'] = 'Show last access time for mail accounts'; ?> diff --git a/interface/web/admin/lib/lang/fi_system_config.lng b/interface/web/admin/lib/lang/fi_system_config.lng index 277d3e0cfc..e6da55a025 100644 --- a/interface/web/admin/lib/lang/fi_system_config.lng +++ b/interface/web/admin/lib/lang/fi_system_config.lng @@ -108,4 +108,5 @@ $wb['show_aps_menu_note_url_txt'] = 'Click here for more information.'; $wb['dns_show_zoneexport_txt'] = 'Show zone export.'; $wb['le_caa_autocreate_options_txt'] = 'Enable automatic creation of CAA record on issuing LE'; $wb['show_delete_on_forms_txt'] = 'Show delete button on edit forms'; +$wb['mailbox_show_last_access_txt'] = 'Show last access time for mail accounts'; ?> diff --git a/interface/web/admin/lib/lang/fr_system_config.lng b/interface/web/admin/lib/lang/fr_system_config.lng index e895ff571f..e58466d449 100644 --- a/interface/web/admin/lib/lang/fr_system_config.lng +++ b/interface/web/admin/lib/lang/fr_system_config.lng @@ -108,4 +108,5 @@ $wb['show_aps_menu_note_url_txt'] = 'Click here for more information.'; $wb['dns_show_zoneexport_txt'] = 'Show zone export.'; $wb['le_caa_autocreate_options_txt'] = 'Enable automatic creation of CAA record on issuing LE'; $wb['show_delete_on_forms_txt'] = 'Show delete button on edit forms'; +$wb['mailbox_show_last_access_txt'] = 'Show last access time for mail accounts'; ?> diff --git a/interface/web/admin/lib/lang/hr_system_config.lng b/interface/web/admin/lib/lang/hr_system_config.lng index 0acdcbc95e..632a987038 100644 --- a/interface/web/admin/lib/lang/hr_system_config.lng +++ b/interface/web/admin/lib/lang/hr_system_config.lng @@ -108,4 +108,5 @@ $wb['show_aps_menu_note_url_txt'] = 'Click here for more information.'; $wb['dns_show_zoneexport_txt'] = 'Show zone export.'; $wb['le_caa_autocreate_options_txt'] = 'Enable automatic creation of CAA record on issuing LE'; $wb['show_delete_on_forms_txt'] = 'Show delete button on edit forms'; +$wb['mailbox_show_last_access_txt'] = 'Show last access time for mail accounts'; ?> diff --git a/interface/web/admin/lib/lang/hu_system_config.lng b/interface/web/admin/lib/lang/hu_system_config.lng index 3afd60e8fe..ab2b097d5d 100644 --- a/interface/web/admin/lib/lang/hu_system_config.lng +++ b/interface/web/admin/lib/lang/hu_system_config.lng @@ -108,4 +108,5 @@ $wb['show_aps_menu_note_url_txt'] = 'Click here for more information.'; $wb['dns_show_zoneexport_txt'] = 'Show zone export.'; $wb['le_caa_autocreate_options_txt'] = 'Enable automatic creation of CAA record on issuing LE'; $wb['show_delete_on_forms_txt'] = 'Show delete button on edit forms'; +$wb['mailbox_show_last_access_txt'] = 'Show last access time for mail accounts'; ?> diff --git a/interface/web/admin/lib/lang/id_system_config.lng b/interface/web/admin/lib/lang/id_system_config.lng index a2bd40eea3..ca5e7e3c35 100644 --- a/interface/web/admin/lib/lang/id_system_config.lng +++ b/interface/web/admin/lib/lang/id_system_config.lng @@ -108,4 +108,5 @@ $wb['show_aps_menu_note_url_txt'] = 'Click here for more information.'; $wb['dns_show_zoneexport_txt'] = 'Show zone export.'; $wb['le_caa_autocreate_options_txt'] = 'Enable automatic creation of CAA record on issuing LE'; $wb['show_delete_on_forms_txt'] = 'Show delete button on edit forms'; +$wb['mailbox_show_last_access_txt'] = 'Show last access time for mail accounts'; ?> diff --git a/interface/web/admin/lib/lang/it_system_config.lng b/interface/web/admin/lib/lang/it_system_config.lng index bdff687eb5..359acd9107 100644 --- a/interface/web/admin/lib/lang/it_system_config.lng +++ b/interface/web/admin/lib/lang/it_system_config.lng @@ -108,4 +108,5 @@ $wb['show_aps_menu_note_url_txt'] = 'Clicca qui per maggiori informazioni.'; $wb['dns_show_zoneexport_txt'] = 'Show zone export.'; $wb['le_caa_autocreate_options_txt'] = 'Enable automatic creation of CAA record on issuing LE'; $wb['show_delete_on_forms_txt'] = 'Show delete button on edit forms'; +$wb['mailbox_show_last_access_txt'] = 'Show last access time for mail accounts'; ?> diff --git a/interface/web/admin/lib/lang/ja_system_config.lng b/interface/web/admin/lib/lang/ja_system_config.lng index c2d507d61a..a55ac96522 100644 --- a/interface/web/admin/lib/lang/ja_system_config.lng +++ b/interface/web/admin/lib/lang/ja_system_config.lng @@ -108,4 +108,5 @@ $wb['show_aps_menu_note_url_txt'] = 'Click here for more information.'; $wb['dns_show_zoneexport_txt'] = 'Show zone export.'; $wb['le_caa_autocreate_options_txt'] = 'Enable automatic creation of CAA record on issuing LE'; $wb['show_delete_on_forms_txt'] = 'Show delete button on edit forms'; +$wb['mailbox_show_last_access_txt'] = 'Show last access time for mail accounts'; ?> diff --git a/interface/web/admin/lib/lang/nl_system_config.lng b/interface/web/admin/lib/lang/nl_system_config.lng index e56855de5f..1fcd9db0ec 100644 --- a/interface/web/admin/lib/lang/nl_system_config.lng +++ b/interface/web/admin/lib/lang/nl_system_config.lng @@ -108,4 +108,5 @@ $wb['show_aps_menu_note_url_txt'] = 'Click here for more information.'; $wb['dns_show_zoneexport_txt'] = 'Show zone export.'; $wb['le_caa_autocreate_options_txt'] = 'Enable automatic creation of CAA record on issuing LE'; $wb['show_delete_on_forms_txt'] = 'Show delete button on edit forms'; +$wb['mailbox_show_last_access_txt'] = 'Show last access time for mail accounts'; ?> diff --git a/interface/web/admin/lib/lang/pl_system_config.lng b/interface/web/admin/lib/lang/pl_system_config.lng index c99434e5ef..d52177150e 100644 --- a/interface/web/admin/lib/lang/pl_system_config.lng +++ b/interface/web/admin/lib/lang/pl_system_config.lng @@ -108,4 +108,5 @@ $wb['show_aps_menu_note_url_txt'] = 'Click here for more information.'; $wb['dns_show_zoneexport_txt'] = 'Show zone export.'; $wb['le_caa_autocreate_options_txt'] = 'Enable automatic creation of CAA record on issuing LE'; $wb['show_delete_on_forms_txt'] = 'Show delete button on edit forms'; +$wb['mailbox_show_last_access_txt'] = 'Show last access time for mail accounts'; ?> diff --git a/interface/web/admin/lib/lang/pt_system_config.lng b/interface/web/admin/lib/lang/pt_system_config.lng index 7513759047..bf3691b618 100644 --- a/interface/web/admin/lib/lang/pt_system_config.lng +++ b/interface/web/admin/lib/lang/pt_system_config.lng @@ -108,4 +108,5 @@ $wb['show_aps_menu_note_url_txt'] = 'Click here for more information.'; $wb['dns_show_zoneexport_txt'] = 'Show zone export.'; $wb['le_caa_autocreate_options_txt'] = 'Enable automatic creation of CAA record on issuing LE'; $wb['show_delete_on_forms_txt'] = 'Show delete button on edit forms'; +$wb['mailbox_show_last_access_txt'] = 'Show last access time for mail accounts'; ?> diff --git a/interface/web/admin/lib/lang/ro_system_config.lng b/interface/web/admin/lib/lang/ro_system_config.lng index 0c9b600028..59010122e2 100644 --- a/interface/web/admin/lib/lang/ro_system_config.lng +++ b/interface/web/admin/lib/lang/ro_system_config.lng @@ -108,4 +108,5 @@ $wb['show_aps_menu_note_url_txt'] = 'Click here for more information.'; $wb['dns_show_zoneexport_txt'] = 'Show zone export.'; $wb['le_caa_autocreate_options_txt'] = 'Enable automatic creation of CAA record on issuing LE'; $wb['show_delete_on_forms_txt'] = 'Show delete button on edit forms'; +$wb['mailbox_show_last_access_txt'] = 'Show last access time for mail accounts'; ?> diff --git a/interface/web/admin/lib/lang/ru_system_config.lng b/interface/web/admin/lib/lang/ru_system_config.lng index 31e475bb00..89917c95ed 100644 --- a/interface/web/admin/lib/lang/ru_system_config.lng +++ b/interface/web/admin/lib/lang/ru_system_config.lng @@ -108,4 +108,5 @@ $wb['show_aps_menu_note_url_txt'] = 'Click here for more information.'; $wb['dns_show_zoneexport_txt'] = 'Show zone export.'; $wb['le_caa_autocreate_options_txt'] = 'Enable automatic creation of CAA record on issuing LE'; $wb['show_delete_on_forms_txt'] = 'Show delete button on edit forms'; +$wb['mailbox_show_last_access_txt'] = 'Show last access time for mail accounts'; ?> diff --git a/interface/web/admin/lib/lang/se_system_config.lng b/interface/web/admin/lib/lang/se_system_config.lng index e4748e9463..11bae20933 100644 --- a/interface/web/admin/lib/lang/se_system_config.lng +++ b/interface/web/admin/lib/lang/se_system_config.lng @@ -108,4 +108,5 @@ $wb['show_aps_menu_note_url_txt'] = 'Click here for more information.'; $wb['dns_show_zoneexport_txt'] = 'Show zone export.'; $wb['le_caa_autocreate_options_txt'] = 'Enable automatic creation of CAA record on issuing LE'; $wb['show_delete_on_forms_txt'] = 'Show delete button on edit forms'; +$wb['mailbox_show_last_access_txt'] = 'Show last access time for mail accounts'; ?> diff --git a/interface/web/admin/lib/lang/sk_system_config.lng b/interface/web/admin/lib/lang/sk_system_config.lng index dcef81a303..a965f9b83f 100644 --- a/interface/web/admin/lib/lang/sk_system_config.lng +++ b/interface/web/admin/lib/lang/sk_system_config.lng @@ -108,4 +108,5 @@ $wb['show_aps_menu_note_url_txt'] = 'Click here for more information.'; $wb['dns_show_zoneexport_txt'] = 'Show zone export.'; $wb['le_caa_autocreate_options_txt'] = 'Enable automatic creation of CAA record on issuing LE'; $wb['show_delete_on_forms_txt'] = 'Show delete button on edit forms'; +$wb['mailbox_show_last_access_txt'] = 'Show last access time for mail accounts'; ?> diff --git a/interface/web/admin/lib/lang/tr_system_config.lng b/interface/web/admin/lib/lang/tr_system_config.lng index 17cf1884f5..40d6108c72 100644 --- a/interface/web/admin/lib/lang/tr_system_config.lng +++ b/interface/web/admin/lib/lang/tr_system_config.lng @@ -108,4 +108,5 @@ $wb['show_aps_menu_note_url_txt'] = 'Click here for more information.'; $wb['dns_show_zoneexport_txt'] = 'Show zone export.'; $wb['le_caa_autocreate_options_txt'] = 'Enable automatic creation of CAA record on issuing LE'; $wb['show_delete_on_forms_txt'] = 'Show delete button on edit forms'; +$wb['mailbox_show_last_access_txt'] = 'Show last access time for mail accounts'; ?> diff --git a/interface/web/admin/templates/system_config_mail_edit.htm b/interface/web/admin/templates/system_config_mail_edit.htm index ac9271a9cf..4731240bd2 100644 --- a/interface/web/admin/templates/system_config_mail_edit.htm +++ b/interface/web/admin/templates/system_config_mail_edit.htm @@ -34,6 +34,12 @@ {tmpl_var name='mailbox_show_custom_rules_tab'}
+
+ +
+ {tmpl_var name='mailbox_show_last_access'} +
+
diff --git a/interface/web/dashboard/dashlets/templates/mailquota.htm b/interface/web/dashboard/dashlets/templates/mailquota.htm index a01fd41910..c24b2e608a 100644 --- a/interface/web/dashboard/dashlets/templates/mailquota.htm +++ b/interface/web/dashboard/dashlets/templates/mailquota.htm @@ -6,7 +6,7 @@ {tmpl_var name='email_txt'} {tmpl_var name='name_txt'} {tmpl_var name='used_txt'} - {tmpl_var name='last_accessed_txt'} + {tmpl_var name='last_accessed_txt'} {tmpl_var name='quota_txt'} @@ -16,7 +16,7 @@ {tmpl_var name='email'} {tmpl_var name='name'} {tmpl_var name='used'} - {tmpl_var name='last_access'} + {tmpl_var name='last_access'} {tmpl_var name='quota'} {tmpl_if name="quota_raw" op="!=" value="-1"}
@@ -33,6 +33,7 @@ {tmpl_var name='total_txt'} {tmpl_var name='total_used'} + diff --git a/interface/web/mail/mail_user_edit.php b/interface/web/mail/mail_user_edit.php index 560cc7408a..8cd01bf181 100644 --- a/interface/web/mail/mail_user_edit.php +++ b/interface/web/mail/mail_user_edit.php @@ -136,6 +136,7 @@ function onShowEnd() { $app->tpl->setVar("enable_custom_login", 0); } + $app->tpl->setVar('mailbox_show_last_access', $global_config['mail']['mailbox_show_last_access']); if (!empty($this->dataRecord['last_access'])) { $app->tpl->setVar("last_access", date($app->lng('conf_format_datetime'), $this->dataRecord['last_access'])); } diff --git a/interface/web/mail/templates/mail_user_list.htm b/interface/web/mail/templates/mail_user_list.htm index e2ff3614a0..be29643173 100644 --- a/interface/web/mail/templates/mail_user_list.htm +++ b/interface/web/mail/templates/mail_user_list.htm @@ -61,7 +61,7 @@

- {tmpl_var name='last_accessed_txt'}: {tmpl_var name='last_access'}">{tmpl_var name="email"} + {tmpl_var name='last_accessed_txt'}: {tmpl_var name='last_access'} {tmpl_var name="email"} {tmpl_var name="login"} {tmpl_var name="name"} {tmpl_var name="autoresponder"} diff --git a/interface/web/mail/templates/mail_user_mailbox_edit.htm b/interface/web/mail/templates/mail_user_mailbox_edit.htm index b22beda49c..58e2bac9ab 100644 --- a/interface/web/mail/templates/mail_user_mailbox_edit.htm +++ b/interface/web/mail/templates/mail_user_mailbox_edit.htm @@ -45,7 +45,7 @@
- {tmpl_var name='last_accessed_txt'}: {tmpl_var name='last_access'} + {tmpl_var name='last_accessed_txt'}: {tmpl_var name='last_access'}
From eea78ec0be8fe085b5e41c4b321ceebdf2502b31 Mon Sep 17 00:00:00 2001 From: Herman van Rink Date: Sun, 20 Aug 2023 22:47:59 +0200 Subject: [PATCH 233/621] Add missing translation strings datalog_status_(c|u|d)_client --- interface/lib/lang/ar.lng | 3 +++ interface/lib/lang/bg.lng | 3 +++ interface/lib/lang/br.lng | 3 +++ interface/lib/lang/ca.lng | 3 +++ interface/lib/lang/cn.lng | 3 +++ interface/lib/lang/cz.lng | 3 +++ interface/lib/lang/de.lng | 3 +++ interface/lib/lang/dk.lng | 3 +++ interface/lib/lang/el.lng | 3 +++ interface/lib/lang/en.lng | 3 +++ interface/lib/lang/es.lng | 3 +++ interface/lib/lang/fi.lng | 3 +++ interface/lib/lang/fr.lng | 3 +++ interface/lib/lang/hr.lng | 3 +++ interface/lib/lang/hu.lng | 3 +++ interface/lib/lang/id.lng | 3 +++ interface/lib/lang/it.lng | 3 +++ interface/lib/lang/ja.lng | 3 +++ interface/lib/lang/nl.lng | 15 +++++++++------ interface/lib/lang/pl.lng | 3 +++ interface/lib/lang/pt.lng | 3 +++ interface/lib/lang/ro.lng | 3 +++ interface/lib/lang/ru.lng | 3 +++ interface/lib/lang/se.lng | 3 +++ interface/lib/lang/sk.lng | 3 +++ interface/lib/lang/tr.lng | 3 +++ 26 files changed, 84 insertions(+), 6 deletions(-) diff --git a/interface/lib/lang/ar.lng b/interface/lib/lang/ar.lng index 4aa87ee5aa..e763490f14 100644 --- a/interface/lib/lang/ar.lng +++ b/interface/lib/lang/ar.lng @@ -174,4 +174,7 @@ $wb['server_id_0_error_txt'] = 'Please select a valid Server. Server ID must be $wb['datalog_changes_close_txt'] = 'Close'; $wb['non_admin_error'] = 'Requires administrator level permissions'; $wb['copy_to_clipboard_txt'] = 'Copy to clipboard'; +$wb['datalog_status_i_client'] = 'Create new client'; +$wb['datalog_status_u_client'] = 'Update client'; +$wb['datalog_status_d_client'] = 'Delete client'; ?> diff --git a/interface/lib/lang/bg.lng b/interface/lib/lang/bg.lng index 67c2b67b6f..eb8bad0384 100644 --- a/interface/lib/lang/bg.lng +++ b/interface/lib/lang/bg.lng @@ -174,4 +174,7 @@ $wb['server_id_0_error_txt'] = 'Please select a valid Server. Server ID must be $wb['datalog_changes_close_txt'] = 'Close'; $wb['non_admin_error'] = 'Requires administrator level permissions'; $wb['copy_to_clipboard_txt'] = 'Copy to clipboard'; +$wb['datalog_status_i_client'] = 'Create new client'; +$wb['datalog_status_u_client'] = 'Update client'; +$wb['datalog_status_d_client'] = 'Delete client'; ?> diff --git a/interface/lib/lang/br.lng b/interface/lib/lang/br.lng index 02f4697dee..c533dac92d 100644 --- a/interface/lib/lang/br.lng +++ b/interface/lib/lang/br.lng @@ -174,4 +174,7 @@ $wb['server_id_0_error_txt'] = 'Por favor, selecione um servidor válido. O ID d $wb['datalog_changes_close_txt'] = 'Fechar'; $wb['non_admin_error'] = 'Requires administrator level permissions'; $wb['copy_to_clipboard_txt'] = 'Copy to clipboard'; +$wb['datalog_status_i_client'] = 'Create new client'; +$wb['datalog_status_u_client'] = 'Update client'; +$wb['datalog_status_d_client'] = 'Delete client'; ?> diff --git a/interface/lib/lang/ca.lng b/interface/lib/lang/ca.lng index 0aa69997e5..eb3f3841ce 100644 --- a/interface/lib/lang/ca.lng +++ b/interface/lib/lang/ca.lng @@ -174,4 +174,7 @@ $wb['server_id_0_error_txt'] = 'Please select a valid Server. Server ID must be $wb['datalog_changes_close_txt'] = 'Close'; $wb['non_admin_error'] = 'Requires administrator level permissions'; $wb['copy_to_clipboard_txt'] = 'Copy to clipboard'; +$wb['datalog_status_i_client'] = 'Create new client'; +$wb['datalog_status_u_client'] = 'Update client'; +$wb['datalog_status_d_client'] = 'Delete client'; ?> diff --git a/interface/lib/lang/cn.lng b/interface/lib/lang/cn.lng index 72fcb8b737..939a1c07e4 100644 --- a/interface/lib/lang/cn.lng +++ b/interface/lib/lang/cn.lng @@ -175,4 +175,7 @@ $wb['server_id_0_error_txt'] = '请选择一个有效的服务器。服务器ID $wb['datalog_changes_close_txt'] = '关闭'; $wb['non_admin_error'] = '需要管理员级别的权限'; $wb['copy_to_clipboard_txt'] = '复制到剪贴板'; +$wb['datalog_status_i_client'] = 'Create new client'; +$wb['datalog_status_u_client'] = 'Update client'; +$wb['datalog_status_d_client'] = 'Delete client'; ?> diff --git a/interface/lib/lang/cz.lng b/interface/lib/lang/cz.lng index 1eccd3c8e5..24ce9743c4 100644 --- a/interface/lib/lang/cz.lng +++ b/interface/lib/lang/cz.lng @@ -174,4 +174,7 @@ $wb['server_id_0_error_txt'] = 'Please select a valid Server. Server ID must be $wb['datalog_changes_close_txt'] = 'Close'; $wb['non_admin_error'] = 'Requires administrator level permissions'; $wb['copy_to_clipboard_txt'] = 'Copy to clipboard'; +$wb['datalog_status_i_client'] = 'Create new client'; +$wb['datalog_status_u_client'] = 'Update client'; +$wb['datalog_status_d_client'] = 'Delete client'; ?> diff --git a/interface/lib/lang/de.lng b/interface/lib/lang/de.lng index d6cef498d3..572a8f7191 100644 --- a/interface/lib/lang/de.lng +++ b/interface/lib/lang/de.lng @@ -174,4 +174,7 @@ $wb['server_id_0_error_txt'] = 'Bitte Server auswählen. Server ID muss > als 0 $wb['datalog_changes_close_txt'] = 'Close'; $wb['non_admin_error'] = 'Requires administrator level permissions'; $wb['copy_to_clipboard_txt'] = 'Copy to clipboard'; +$wb['datalog_status_i_client'] = 'Create new client'; +$wb['datalog_status_u_client'] = 'Update client'; +$wb['datalog_status_d_client'] = 'Delete client'; ?> diff --git a/interface/lib/lang/dk.lng b/interface/lib/lang/dk.lng index 85cee58659..44a5db840b 100644 --- a/interface/lib/lang/dk.lng +++ b/interface/lib/lang/dk.lng @@ -174,4 +174,7 @@ $wb['server_id_0_error_txt'] = 'Please select a valid Server. Server ID must be $wb['datalog_changes_close_txt'] = 'Close'; $wb['non_admin_error'] = 'Requires administrator level permissions'; $wb['copy_to_clipboard_txt'] = 'Copy to clipboard'; +$wb['datalog_status_i_client'] = 'Create new client'; +$wb['datalog_status_u_client'] = 'Update client'; +$wb['datalog_status_d_client'] = 'Delete client'; ?> diff --git a/interface/lib/lang/el.lng b/interface/lib/lang/el.lng index d5b980722a..8055ae2b15 100644 --- a/interface/lib/lang/el.lng +++ b/interface/lib/lang/el.lng @@ -174,4 +174,7 @@ $wb['server_id_0_error_txt'] = 'Please select a valid Server. Server ID must be $wb['datalog_changes_close_txt'] = 'Close'; $wb['non_admin_error'] = 'Requires administrator level permissions'; $wb['copy_to_clipboard_txt'] = 'Copy to clipboard'; +$wb['datalog_status_i_client'] = 'Create new client'; +$wb['datalog_status_u_client'] = 'Update client'; +$wb['datalog_status_d_client'] = 'Delete client'; ?> diff --git a/interface/lib/lang/en.lng b/interface/lib/lang/en.lng index 6024cc69a7..fc93dc075b 100644 --- a/interface/lib/lang/en.lng +++ b/interface/lib/lang/en.lng @@ -83,6 +83,9 @@ $wb['global_tabchange_discard_txt'] = 'You have unsaved changes in this tab. Cha $wb['datalog_changes_txt'] = 'The following changes are not yet populated to all servers:'; $wb['datalog_changes_end_txt'] = 'Storing updates can take up to one minute. Please be patient.'; +$wb['datalog_status_i_client'] = 'Create new client'; +$wb['datalog_status_u_client'] = 'Update client'; +$wb['datalog_status_d_client'] = 'Delete client'; $wb['datalog_status_i_web_database'] = 'Create new database'; $wb['datalog_status_u_web_database'] = 'Update database'; $wb['datalog_status_d_web_database'] = 'Delete database'; diff --git a/interface/lib/lang/es.lng b/interface/lib/lang/es.lng index e3ba1d41e0..34e1b697ca 100644 --- a/interface/lib/lang/es.lng +++ b/interface/lib/lang/es.lng @@ -174,4 +174,7 @@ $wb['server_id_0_error_txt'] = 'Please select a valid Server. Server ID must be $wb['datalog_changes_close_txt'] = 'Cerrar'; $wb['non_admin_error'] = 'Requires administrator level permissions'; $wb['copy_to_clipboard_txt'] = 'Copy to clipboard'; +$wb['datalog_status_i_client'] = 'Create new client'; +$wb['datalog_status_u_client'] = 'Update client'; +$wb['datalog_status_d_client'] = 'Delete client'; ?> diff --git a/interface/lib/lang/fi.lng b/interface/lib/lang/fi.lng index 87f2dc24ed..53c267e505 100644 --- a/interface/lib/lang/fi.lng +++ b/interface/lib/lang/fi.lng @@ -174,4 +174,7 @@ $wb['server_id_0_error_txt'] = 'Please select a valid Server. Server ID must be $wb['datalog_changes_close_txt'] = 'Close'; $wb['non_admin_error'] = 'Requires administrator level permissions'; $wb['copy_to_clipboard_txt'] = 'Copy to clipboard'; +$wb['datalog_status_i_client'] = 'Create new client'; +$wb['datalog_status_u_client'] = 'Update client'; +$wb['datalog_status_d_client'] = 'Delete client'; ?> diff --git a/interface/lib/lang/fr.lng b/interface/lib/lang/fr.lng index 7f8413d11c..fbf834036b 100644 --- a/interface/lib/lang/fr.lng +++ b/interface/lib/lang/fr.lng @@ -174,4 +174,7 @@ $wb['server_id_0_error_txt'] = 'Please select a valid Server. Server ID must be $wb['datalog_changes_close_txt'] = 'Close'; $wb['non_admin_error'] = 'Requires administrator level permissions'; $wb['copy_to_clipboard_txt'] = 'Copy to clipboard'; +$wb['datalog_status_i_client'] = 'Create new client'; +$wb['datalog_status_u_client'] = 'Update client'; +$wb['datalog_status_d_client'] = 'Delete client'; ?> diff --git a/interface/lib/lang/hr.lng b/interface/lib/lang/hr.lng index 167073f837..78292d2844 100644 --- a/interface/lib/lang/hr.lng +++ b/interface/lib/lang/hr.lng @@ -174,4 +174,7 @@ $wb['server_id_0_error_txt'] = 'Please select a valid Server. Server ID must be $wb['datalog_changes_close_txt'] = 'Close'; $wb['non_admin_error'] = 'Requires administrator level permissions'; $wb['copy_to_clipboard_txt'] = 'Copy to clipboard'; +$wb['datalog_status_i_client'] = 'Create new client'; +$wb['datalog_status_u_client'] = 'Update client'; +$wb['datalog_status_d_client'] = 'Delete client'; ?> diff --git a/interface/lib/lang/hu.lng b/interface/lib/lang/hu.lng index a07c6810ce..ee4ffda4eb 100644 --- a/interface/lib/lang/hu.lng +++ b/interface/lib/lang/hu.lng @@ -174,4 +174,7 @@ $wb['server_id_0_error_txt'] = 'Please select a valid Server. Server ID must be $wb['datalog_changes_close_txt'] = 'Close'; $wb['non_admin_error'] = 'Requires administrator level permissions'; $wb['copy_to_clipboard_txt'] = 'Copy to clipboard'; +$wb['datalog_status_i_client'] = 'Create new client'; +$wb['datalog_status_u_client'] = 'Update client'; +$wb['datalog_status_d_client'] = 'Delete client'; ?> diff --git a/interface/lib/lang/id.lng b/interface/lib/lang/id.lng index 51e1fd6aef..95d9d76250 100644 --- a/interface/lib/lang/id.lng +++ b/interface/lib/lang/id.lng @@ -174,4 +174,7 @@ $wb['server_id_0_error_txt'] = 'Please select a valid Server. Server ID must be $wb['datalog_changes_close_txt'] = 'Close'; $wb['non_admin_error'] = 'Requires administrator level permissions'; $wb['copy_to_clipboard_txt'] = 'Copy to clipboard'; +$wb['datalog_status_i_client'] = 'Create new client'; +$wb['datalog_status_u_client'] = 'Update client'; +$wb['datalog_status_d_client'] = 'Delete client'; ?> diff --git a/interface/lib/lang/it.lng b/interface/lib/lang/it.lng index a56224e6d5..96435edf21 100644 --- a/interface/lib/lang/it.lng +++ b/interface/lib/lang/it.lng @@ -174,4 +174,7 @@ $wb['server_id_0_error_txt'] = 'Please select a valid Server. Server ID must be $wb['datalog_changes_close_txt'] = 'Chiudi'; $wb['non_admin_error'] = 'Requires administrator level permissions'; $wb['copy_to_clipboard_txt'] = 'Copy to clipboard'; +$wb['datalog_status_i_client'] = 'Create new client'; +$wb['datalog_status_u_client'] = 'Update client'; +$wb['datalog_status_d_client'] = 'Delete client'; ?> diff --git a/interface/lib/lang/ja.lng b/interface/lib/lang/ja.lng index 00db303170..268cc0219f 100644 --- a/interface/lib/lang/ja.lng +++ b/interface/lib/lang/ja.lng @@ -174,4 +174,7 @@ $wb['server_id_0_error_txt'] = 'Please select a valid Server. Server ID must be $wb['datalog_changes_close_txt'] = 'Close'; $wb['non_admin_error'] = 'Requires administrator level permissions'; $wb['copy_to_clipboard_txt'] = 'Copy to clipboard'; +$wb['datalog_status_i_client'] = 'Create new client'; +$wb['datalog_status_u_client'] = 'Update client'; +$wb['datalog_status_d_client'] = 'Delete client'; ?> diff --git a/interface/lib/lang/nl.lng b/interface/lib/lang/nl.lng index 582c5ffe53..ee9f02b479 100644 --- a/interface/lib/lang/nl.lng +++ b/interface/lib/lang/nl.lng @@ -163,12 +163,15 @@ $wb['security_check2_txt'] = 'failed.'; $wb['err_csrf_attempt_blocked'] = 'CSRF attempt blocked.'; $wb['select_directive_snippet_txt'] = 'Directive Snippets'; $wb['select_master_directive_snippet_txt'] = 'Master Directive Snippets'; -$wb['datalog_status_i_xmpp_domain'] = 'Create XMPP domain'; -$wb['datalog_status_u_xmpp_domain'] = 'Update XMPP domain'; -$wb['datalog_status_d_xmpp_domain'] = 'Delete XMPP domain'; -$wb['datalog_status_i_xmpp_user'] = 'Create XMPP user'; -$wb['datalog_status_u_xmpp_user'] = 'Update XMPP user'; -$wb['datalog_status_d_xmpp_user'] = 'Delete XMPP user'; +$wb['datalog_status_i_xmpp_domain'] = 'Aanmaken XMPP domain'; +$wb['datalog_status_u_xmpp_domain'] = 'Bijwerken XMPP domain'; +$wb['datalog_status_d_xmpp_domain'] = 'Verwijderen XMPP domain'; +$wb['datalog_status_i_xmpp_user'] = 'Aanmaken XMPP user'; +$wb['datalog_status_u_xmpp_user'] = 'Bijwerken XMPP user'; +$wb['datalog_status_d_xmpp_user'] = 'Verwijderen XMPP user'; +$wb['datalog_status_i_client'] = 'Aanmaken client'; +$wb['datalog_status_u_client'] = 'Bijwerken client'; +$wb['datalog_status_d_client'] = 'Verwijderen client'; $wb['unlimited_txt'] = 'Ongelimiteerd'; $wb['server_id_0_error_txt'] = 'Please select a valid Server. Server ID must be > 0.'; $wb['datalog_changes_close_txt'] = 'Sluiten'; diff --git a/interface/lib/lang/pl.lng b/interface/lib/lang/pl.lng index d22b0d4850..7777fba9d0 100644 --- a/interface/lib/lang/pl.lng +++ b/interface/lib/lang/pl.lng @@ -174,4 +174,7 @@ $wb['server_id_0_error_txt'] = 'Please select a valid Server. Server ID must be $wb['datalog_changes_close_txt'] = 'Close'; $wb['non_admin_error'] = 'Requires administrator level permissions'; $wb['copy_to_clipboard_txt'] = 'Copy to clipboard'; +$wb['datalog_status_i_client'] = 'Create new client'; +$wb['datalog_status_u_client'] = 'Update client'; +$wb['datalog_status_d_client'] = 'Delete client'; ?> diff --git a/interface/lib/lang/pt.lng b/interface/lib/lang/pt.lng index 23b1cd2079..7b22fc5246 100644 --- a/interface/lib/lang/pt.lng +++ b/interface/lib/lang/pt.lng @@ -174,4 +174,7 @@ $wb['server_id_0_error_txt'] = 'Please select a valid Server. Server ID must be $wb['datalog_changes_close_txt'] = 'Close'; $wb['non_admin_error'] = 'Requires administrator level permissions'; $wb['copy_to_clipboard_txt'] = 'Copy to clipboard'; +$wb['datalog_status_i_client'] = 'Create new client'; +$wb['datalog_status_u_client'] = 'Update client'; +$wb['datalog_status_d_client'] = 'Delete client'; ?> diff --git a/interface/lib/lang/ro.lng b/interface/lib/lang/ro.lng index b4da89bc12..47c82b3812 100644 --- a/interface/lib/lang/ro.lng +++ b/interface/lib/lang/ro.lng @@ -174,4 +174,7 @@ $wb['server_id_0_error_txt'] = 'Please select a valid Server. Server ID must be $wb['datalog_changes_close_txt'] = 'Close'; $wb['non_admin_error'] = 'Requires administrator level permissions'; $wb['copy_to_clipboard_txt'] = 'Copy to clipboard'; +$wb['datalog_status_i_client'] = 'Create new client'; +$wb['datalog_status_u_client'] = 'Update client'; +$wb['datalog_status_d_client'] = 'Delete client'; ?> diff --git a/interface/lib/lang/ru.lng b/interface/lib/lang/ru.lng index cfd805010b..9da2408fb5 100644 --- a/interface/lib/lang/ru.lng +++ b/interface/lib/lang/ru.lng @@ -174,4 +174,7 @@ $wb['server_id_0_error_txt'] = 'Please select a valid Server. Server ID must be $wb['datalog_changes_close_txt'] = 'Close'; $wb['non_admin_error'] = 'Requires administrator level permissions'; $wb['copy_to_clipboard_txt'] = 'Copy to clipboard'; +$wb['datalog_status_i_client'] = 'Create new client'; +$wb['datalog_status_u_client'] = 'Update client'; +$wb['datalog_status_d_client'] = 'Delete client'; ?> diff --git a/interface/lib/lang/se.lng b/interface/lib/lang/se.lng index 03d818ec56..ee7e6b3ebe 100644 --- a/interface/lib/lang/se.lng +++ b/interface/lib/lang/se.lng @@ -174,4 +174,7 @@ $wb['server_id_0_error_txt'] = 'Please select a valid Server. Server ID must be $wb['datalog_changes_close_txt'] = 'Close'; $wb['non_admin_error'] = 'Requires administrator level permissions'; $wb['copy_to_clipboard_txt'] = 'Copy to clipboard'; +$wb['datalog_status_i_client'] = 'Create new client'; +$wb['datalog_status_u_client'] = 'Update client'; +$wb['datalog_status_d_client'] = 'Delete client'; ?> diff --git a/interface/lib/lang/sk.lng b/interface/lib/lang/sk.lng index dfad74552b..e3049ceb03 100644 --- a/interface/lib/lang/sk.lng +++ b/interface/lib/lang/sk.lng @@ -174,4 +174,7 @@ $wb['server_id_0_error_txt'] = 'Please select a valid Server. Server ID must be $wb['datalog_changes_close_txt'] = 'Close'; $wb['non_admin_error'] = 'Requires administrator level permissions'; $wb['copy_to_clipboard_txt'] = 'Copy to clipboard'; +$wb['datalog_status_i_client'] = 'Create new client'; +$wb['datalog_status_u_client'] = 'Update client'; +$wb['datalog_status_d_client'] = 'Delete client'; ?> diff --git a/interface/lib/lang/tr.lng b/interface/lib/lang/tr.lng index 5b7afc3afa..990a9155ec 100644 --- a/interface/lib/lang/tr.lng +++ b/interface/lib/lang/tr.lng @@ -175,4 +175,7 @@ $wb['server_id_0_error_txt'] = 'Please select a valid Server. Server ID must be $wb['datalog_changes_close_txt'] = 'Close'; $wb['non_admin_error'] = 'Requires administrator level permissions'; $wb['copy_to_clipboard_txt'] = 'Copy to clipboard'; +$wb['datalog_status_i_client'] = 'Create new client'; +$wb['datalog_status_u_client'] = 'Update client'; +$wb['datalog_status_d_client'] = 'Delete client'; ?> From c36a5e5d196a9e2f2bca95e016feda13a8957bbc Mon Sep 17 00:00:00 2001 From: Herman van Rink Date: Sun, 20 Aug 2023 22:52:55 +0200 Subject: [PATCH 234/621] Add missing translation strings datalog_status_(i|u|d)_domain --- interface/lib/lang/ar.lng | 3 +++ interface/lib/lang/bg.lng | 3 +++ interface/lib/lang/br.lng | 3 +++ interface/lib/lang/ca.lng | 3 +++ interface/lib/lang/cn.lng | 3 +++ interface/lib/lang/cz.lng | 3 +++ interface/lib/lang/de.lng | 3 +++ interface/lib/lang/dk.lng | 3 +++ interface/lib/lang/el.lng | 3 +++ interface/lib/lang/en.lng | 3 +++ interface/lib/lang/es.lng | 3 +++ interface/lib/lang/fi.lng | 3 +++ interface/lib/lang/fr.lng | 3 +++ interface/lib/lang/hr.lng | 3 +++ interface/lib/lang/hu.lng | 3 +++ interface/lib/lang/id.lng | 3 +++ interface/lib/lang/it.lng | 3 +++ interface/lib/lang/ja.lng | 3 +++ interface/lib/lang/nl.lng | 3 +++ interface/lib/lang/pl.lng | 3 +++ interface/lib/lang/pt.lng | 3 +++ interface/lib/lang/ro.lng | 3 +++ interface/lib/lang/ru.lng | 3 +++ interface/lib/lang/se.lng | 3 +++ interface/lib/lang/sk.lng | 3 +++ interface/lib/lang/tr.lng | 3 +++ 26 files changed, 78 insertions(+) diff --git a/interface/lib/lang/ar.lng b/interface/lib/lang/ar.lng index e763490f14..3f14a97cf4 100644 --- a/interface/lib/lang/ar.lng +++ b/interface/lib/lang/ar.lng @@ -177,4 +177,7 @@ $wb['copy_to_clipboard_txt'] = 'Copy to clipboard'; $wb['datalog_status_i_client'] = 'Create new client'; $wb['datalog_status_u_client'] = 'Update client'; $wb['datalog_status_d_client'] = 'Delete client'; +$wb['datalog_status_i_domain'] = 'Create new domain'; +$wb['datalog_status_u_domain'] = 'Update domain'; +$wb['datalog_status_d_domain'] = 'Delete domain'; ?> diff --git a/interface/lib/lang/bg.lng b/interface/lib/lang/bg.lng index eb8bad0384..4b38633661 100644 --- a/interface/lib/lang/bg.lng +++ b/interface/lib/lang/bg.lng @@ -177,4 +177,7 @@ $wb['copy_to_clipboard_txt'] = 'Copy to clipboard'; $wb['datalog_status_i_client'] = 'Create new client'; $wb['datalog_status_u_client'] = 'Update client'; $wb['datalog_status_d_client'] = 'Delete client'; +$wb['datalog_status_i_domain'] = 'Create new domain'; +$wb['datalog_status_u_domain'] = 'Update domain'; +$wb['datalog_status_d_domain'] = 'Delete domain'; ?> diff --git a/interface/lib/lang/br.lng b/interface/lib/lang/br.lng index c533dac92d..2ab5ee3c0c 100644 --- a/interface/lib/lang/br.lng +++ b/interface/lib/lang/br.lng @@ -177,4 +177,7 @@ $wb['copy_to_clipboard_txt'] = 'Copy to clipboard'; $wb['datalog_status_i_client'] = 'Create new client'; $wb['datalog_status_u_client'] = 'Update client'; $wb['datalog_status_d_client'] = 'Delete client'; +$wb['datalog_status_i_domain'] = 'Create new domain'; +$wb['datalog_status_u_domain'] = 'Update domain'; +$wb['datalog_status_d_domain'] = 'Delete domain'; ?> diff --git a/interface/lib/lang/ca.lng b/interface/lib/lang/ca.lng index eb3f3841ce..4a5fa7c252 100644 --- a/interface/lib/lang/ca.lng +++ b/interface/lib/lang/ca.lng @@ -177,4 +177,7 @@ $wb['copy_to_clipboard_txt'] = 'Copy to clipboard'; $wb['datalog_status_i_client'] = 'Create new client'; $wb['datalog_status_u_client'] = 'Update client'; $wb['datalog_status_d_client'] = 'Delete client'; +$wb['datalog_status_i_domain'] = 'Create new domain'; +$wb['datalog_status_u_domain'] = 'Update domain'; +$wb['datalog_status_d_domain'] = 'Delete domain'; ?> diff --git a/interface/lib/lang/cn.lng b/interface/lib/lang/cn.lng index 939a1c07e4..7f0da4e44e 100644 --- a/interface/lib/lang/cn.lng +++ b/interface/lib/lang/cn.lng @@ -178,4 +178,7 @@ $wb['copy_to_clipboard_txt'] = '复制到剪贴板'; $wb['datalog_status_i_client'] = 'Create new client'; $wb['datalog_status_u_client'] = 'Update client'; $wb['datalog_status_d_client'] = 'Delete client'; +$wb['datalog_status_i_domain'] = 'Create new domain'; +$wb['datalog_status_u_domain'] = 'Update domain'; +$wb['datalog_status_d_domain'] = 'Delete domain'; ?> diff --git a/interface/lib/lang/cz.lng b/interface/lib/lang/cz.lng index 24ce9743c4..4ed689bba9 100644 --- a/interface/lib/lang/cz.lng +++ b/interface/lib/lang/cz.lng @@ -177,4 +177,7 @@ $wb['copy_to_clipboard_txt'] = 'Copy to clipboard'; $wb['datalog_status_i_client'] = 'Create new client'; $wb['datalog_status_u_client'] = 'Update client'; $wb['datalog_status_d_client'] = 'Delete client'; +$wb['datalog_status_i_domain'] = 'Create new domain'; +$wb['datalog_status_u_domain'] = 'Update domain'; +$wb['datalog_status_d_domain'] = 'Delete domain'; ?> diff --git a/interface/lib/lang/de.lng b/interface/lib/lang/de.lng index 572a8f7191..d7537bac04 100644 --- a/interface/lib/lang/de.lng +++ b/interface/lib/lang/de.lng @@ -177,4 +177,7 @@ $wb['copy_to_clipboard_txt'] = 'Copy to clipboard'; $wb['datalog_status_i_client'] = 'Create new client'; $wb['datalog_status_u_client'] = 'Update client'; $wb['datalog_status_d_client'] = 'Delete client'; +$wb['datalog_status_i_domain'] = 'Create new domain'; +$wb['datalog_status_u_domain'] = 'Update domain'; +$wb['datalog_status_d_domain'] = 'Delete domain'; ?> diff --git a/interface/lib/lang/dk.lng b/interface/lib/lang/dk.lng index 44a5db840b..ec8198fa6f 100644 --- a/interface/lib/lang/dk.lng +++ b/interface/lib/lang/dk.lng @@ -177,4 +177,7 @@ $wb['copy_to_clipboard_txt'] = 'Copy to clipboard'; $wb['datalog_status_i_client'] = 'Create new client'; $wb['datalog_status_u_client'] = 'Update client'; $wb['datalog_status_d_client'] = 'Delete client'; +$wb['datalog_status_i_domain'] = 'Create new domain'; +$wb['datalog_status_u_domain'] = 'Update domain'; +$wb['datalog_status_d_domain'] = 'Delete domain'; ?> diff --git a/interface/lib/lang/el.lng b/interface/lib/lang/el.lng index 8055ae2b15..e15cf3be95 100644 --- a/interface/lib/lang/el.lng +++ b/interface/lib/lang/el.lng @@ -177,4 +177,7 @@ $wb['copy_to_clipboard_txt'] = 'Copy to clipboard'; $wb['datalog_status_i_client'] = 'Create new client'; $wb['datalog_status_u_client'] = 'Update client'; $wb['datalog_status_d_client'] = 'Delete client'; +$wb['datalog_status_i_domain'] = 'Create new domain'; +$wb['datalog_status_u_domain'] = 'Update domain'; +$wb['datalog_status_d_domain'] = 'Delete domain'; ?> diff --git a/interface/lib/lang/en.lng b/interface/lib/lang/en.lng index fc93dc075b..a92268f627 100644 --- a/interface/lib/lang/en.lng +++ b/interface/lib/lang/en.lng @@ -86,6 +86,9 @@ $wb['datalog_changes_end_txt'] = 'Storing updates can take up to one minute. Ple $wb['datalog_status_i_client'] = 'Create new client'; $wb['datalog_status_u_client'] = 'Update client'; $wb['datalog_status_d_client'] = 'Delete client'; +$wb['datalog_status_i_domain'] = 'Create new domain'; +$wb['datalog_status_u_domain'] = 'Update domain'; +$wb['datalog_status_d_domain'] = 'Delete domain'; $wb['datalog_status_i_web_database'] = 'Create new database'; $wb['datalog_status_u_web_database'] = 'Update database'; $wb['datalog_status_d_web_database'] = 'Delete database'; diff --git a/interface/lib/lang/es.lng b/interface/lib/lang/es.lng index 34e1b697ca..38ef203e1c 100644 --- a/interface/lib/lang/es.lng +++ b/interface/lib/lang/es.lng @@ -177,4 +177,7 @@ $wb['copy_to_clipboard_txt'] = 'Copy to clipboard'; $wb['datalog_status_i_client'] = 'Create new client'; $wb['datalog_status_u_client'] = 'Update client'; $wb['datalog_status_d_client'] = 'Delete client'; +$wb['datalog_status_i_domain'] = 'Create new domain'; +$wb['datalog_status_u_domain'] = 'Update domain'; +$wb['datalog_status_d_domain'] = 'Delete domain'; ?> diff --git a/interface/lib/lang/fi.lng b/interface/lib/lang/fi.lng index 53c267e505..55c788f77c 100644 --- a/interface/lib/lang/fi.lng +++ b/interface/lib/lang/fi.lng @@ -177,4 +177,7 @@ $wb['copy_to_clipboard_txt'] = 'Copy to clipboard'; $wb['datalog_status_i_client'] = 'Create new client'; $wb['datalog_status_u_client'] = 'Update client'; $wb['datalog_status_d_client'] = 'Delete client'; +$wb['datalog_status_i_domain'] = 'Create new domain'; +$wb['datalog_status_u_domain'] = 'Update domain'; +$wb['datalog_status_d_domain'] = 'Delete domain'; ?> diff --git a/interface/lib/lang/fr.lng b/interface/lib/lang/fr.lng index fbf834036b..ea3bac73c3 100644 --- a/interface/lib/lang/fr.lng +++ b/interface/lib/lang/fr.lng @@ -177,4 +177,7 @@ $wb['copy_to_clipboard_txt'] = 'Copy to clipboard'; $wb['datalog_status_i_client'] = 'Create new client'; $wb['datalog_status_u_client'] = 'Update client'; $wb['datalog_status_d_client'] = 'Delete client'; +$wb['datalog_status_i_domain'] = 'Create new domain'; +$wb['datalog_status_u_domain'] = 'Update domain'; +$wb['datalog_status_d_domain'] = 'Delete domain'; ?> diff --git a/interface/lib/lang/hr.lng b/interface/lib/lang/hr.lng index 78292d2844..878f73ba20 100644 --- a/interface/lib/lang/hr.lng +++ b/interface/lib/lang/hr.lng @@ -177,4 +177,7 @@ $wb['copy_to_clipboard_txt'] = 'Copy to clipboard'; $wb['datalog_status_i_client'] = 'Create new client'; $wb['datalog_status_u_client'] = 'Update client'; $wb['datalog_status_d_client'] = 'Delete client'; +$wb['datalog_status_i_domain'] = 'Create new domain'; +$wb['datalog_status_u_domain'] = 'Update domain'; +$wb['datalog_status_d_domain'] = 'Delete domain'; ?> diff --git a/interface/lib/lang/hu.lng b/interface/lib/lang/hu.lng index ee4ffda4eb..72b0882326 100644 --- a/interface/lib/lang/hu.lng +++ b/interface/lib/lang/hu.lng @@ -177,4 +177,7 @@ $wb['copy_to_clipboard_txt'] = 'Copy to clipboard'; $wb['datalog_status_i_client'] = 'Create new client'; $wb['datalog_status_u_client'] = 'Update client'; $wb['datalog_status_d_client'] = 'Delete client'; +$wb['datalog_status_i_domain'] = 'Create new domain'; +$wb['datalog_status_u_domain'] = 'Update domain'; +$wb['datalog_status_d_domain'] = 'Delete domain'; ?> diff --git a/interface/lib/lang/id.lng b/interface/lib/lang/id.lng index 95d9d76250..1df46044b4 100644 --- a/interface/lib/lang/id.lng +++ b/interface/lib/lang/id.lng @@ -177,4 +177,7 @@ $wb['copy_to_clipboard_txt'] = 'Copy to clipboard'; $wb['datalog_status_i_client'] = 'Create new client'; $wb['datalog_status_u_client'] = 'Update client'; $wb['datalog_status_d_client'] = 'Delete client'; +$wb['datalog_status_i_domain'] = 'Create new domain'; +$wb['datalog_status_u_domain'] = 'Update domain'; +$wb['datalog_status_d_domain'] = 'Delete domain'; ?> diff --git a/interface/lib/lang/it.lng b/interface/lib/lang/it.lng index 96435edf21..db4660a246 100644 --- a/interface/lib/lang/it.lng +++ b/interface/lib/lang/it.lng @@ -177,4 +177,7 @@ $wb['copy_to_clipboard_txt'] = 'Copy to clipboard'; $wb['datalog_status_i_client'] = 'Create new client'; $wb['datalog_status_u_client'] = 'Update client'; $wb['datalog_status_d_client'] = 'Delete client'; +$wb['datalog_status_i_domain'] = 'Create new domain'; +$wb['datalog_status_u_domain'] = 'Update domain'; +$wb['datalog_status_d_domain'] = 'Delete domain'; ?> diff --git a/interface/lib/lang/ja.lng b/interface/lib/lang/ja.lng index 268cc0219f..82e5b9850e 100644 --- a/interface/lib/lang/ja.lng +++ b/interface/lib/lang/ja.lng @@ -177,4 +177,7 @@ $wb['copy_to_clipboard_txt'] = 'Copy to clipboard'; $wb['datalog_status_i_client'] = 'Create new client'; $wb['datalog_status_u_client'] = 'Update client'; $wb['datalog_status_d_client'] = 'Delete client'; +$wb['datalog_status_i_domain'] = 'Create new domain'; +$wb['datalog_status_u_domain'] = 'Update domain'; +$wb['datalog_status_d_domain'] = 'Delete domain'; ?> diff --git a/interface/lib/lang/nl.lng b/interface/lib/lang/nl.lng index ee9f02b479..d428d807a8 100644 --- a/interface/lib/lang/nl.lng +++ b/interface/lib/lang/nl.lng @@ -172,6 +172,9 @@ $wb['datalog_status_d_xmpp_user'] = 'Verwijderen XMPP user'; $wb['datalog_status_i_client'] = 'Aanmaken client'; $wb['datalog_status_u_client'] = 'Bijwerken client'; $wb['datalog_status_d_client'] = 'Verwijderen client'; +$wb['datalog_status_i_domain'] = 'Aanmaken domain'; +$wb['datalog_status_u_domain'] = 'Bijwerken domain'; +$wb['datalog_status_d_domain'] = 'Verwijderen domain'; $wb['unlimited_txt'] = 'Ongelimiteerd'; $wb['server_id_0_error_txt'] = 'Please select a valid Server. Server ID must be > 0.'; $wb['datalog_changes_close_txt'] = 'Sluiten'; diff --git a/interface/lib/lang/pl.lng b/interface/lib/lang/pl.lng index 7777fba9d0..bf2231c981 100644 --- a/interface/lib/lang/pl.lng +++ b/interface/lib/lang/pl.lng @@ -177,4 +177,7 @@ $wb['copy_to_clipboard_txt'] = 'Copy to clipboard'; $wb['datalog_status_i_client'] = 'Create new client'; $wb['datalog_status_u_client'] = 'Update client'; $wb['datalog_status_d_client'] = 'Delete client'; +$wb['datalog_status_i_domain'] = 'Create new domain'; +$wb['datalog_status_u_domain'] = 'Update domain'; +$wb['datalog_status_d_domain'] = 'Delete domain'; ?> diff --git a/interface/lib/lang/pt.lng b/interface/lib/lang/pt.lng index 7b22fc5246..d7ff100bf8 100644 --- a/interface/lib/lang/pt.lng +++ b/interface/lib/lang/pt.lng @@ -177,4 +177,7 @@ $wb['copy_to_clipboard_txt'] = 'Copy to clipboard'; $wb['datalog_status_i_client'] = 'Create new client'; $wb['datalog_status_u_client'] = 'Update client'; $wb['datalog_status_d_client'] = 'Delete client'; +$wb['datalog_status_i_domain'] = 'Create new domain'; +$wb['datalog_status_u_domain'] = 'Update domain'; +$wb['datalog_status_d_domain'] = 'Delete domain'; ?> diff --git a/interface/lib/lang/ro.lng b/interface/lib/lang/ro.lng index 47c82b3812..3e38f9fb65 100644 --- a/interface/lib/lang/ro.lng +++ b/interface/lib/lang/ro.lng @@ -177,4 +177,7 @@ $wb['copy_to_clipboard_txt'] = 'Copy to clipboard'; $wb['datalog_status_i_client'] = 'Create new client'; $wb['datalog_status_u_client'] = 'Update client'; $wb['datalog_status_d_client'] = 'Delete client'; +$wb['datalog_status_i_domain'] = 'Create new domain'; +$wb['datalog_status_u_domain'] = 'Update domain'; +$wb['datalog_status_d_domain'] = 'Delete domain'; ?> diff --git a/interface/lib/lang/ru.lng b/interface/lib/lang/ru.lng index 9da2408fb5..3dca27230d 100644 --- a/interface/lib/lang/ru.lng +++ b/interface/lib/lang/ru.lng @@ -177,4 +177,7 @@ $wb['copy_to_clipboard_txt'] = 'Copy to clipboard'; $wb['datalog_status_i_client'] = 'Create new client'; $wb['datalog_status_u_client'] = 'Update client'; $wb['datalog_status_d_client'] = 'Delete client'; +$wb['datalog_status_i_domain'] = 'Create new domain'; +$wb['datalog_status_u_domain'] = 'Update domain'; +$wb['datalog_status_d_domain'] = 'Delete domain'; ?> diff --git a/interface/lib/lang/se.lng b/interface/lib/lang/se.lng index ee7e6b3ebe..1e5e770242 100644 --- a/interface/lib/lang/se.lng +++ b/interface/lib/lang/se.lng @@ -177,4 +177,7 @@ $wb['copy_to_clipboard_txt'] = 'Copy to clipboard'; $wb['datalog_status_i_client'] = 'Create new client'; $wb['datalog_status_u_client'] = 'Update client'; $wb['datalog_status_d_client'] = 'Delete client'; +$wb['datalog_status_i_domain'] = 'Create new domain'; +$wb['datalog_status_u_domain'] = 'Update domain'; +$wb['datalog_status_d_domain'] = 'Delete domain'; ?> diff --git a/interface/lib/lang/sk.lng b/interface/lib/lang/sk.lng index e3049ceb03..01f77e616a 100644 --- a/interface/lib/lang/sk.lng +++ b/interface/lib/lang/sk.lng @@ -177,4 +177,7 @@ $wb['copy_to_clipboard_txt'] = 'Copy to clipboard'; $wb['datalog_status_i_client'] = 'Create new client'; $wb['datalog_status_u_client'] = 'Update client'; $wb['datalog_status_d_client'] = 'Delete client'; +$wb['datalog_status_i_domain'] = 'Create new domain'; +$wb['datalog_status_u_domain'] = 'Update domain'; +$wb['datalog_status_d_domain'] = 'Delete domain'; ?> diff --git a/interface/lib/lang/tr.lng b/interface/lib/lang/tr.lng index 990a9155ec..42ca64a087 100644 --- a/interface/lib/lang/tr.lng +++ b/interface/lib/lang/tr.lng @@ -178,4 +178,7 @@ $wb['copy_to_clipboard_txt'] = 'Copy to clipboard'; $wb['datalog_status_i_client'] = 'Create new client'; $wb['datalog_status_u_client'] = 'Update client'; $wb['datalog_status_d_client'] = 'Delete client'; +$wb['datalog_status_i_domain'] = 'Create new domain'; +$wb['datalog_status_u_domain'] = 'Update domain'; +$wb['datalog_status_d_domain'] = 'Delete domain'; ?> From 710a652b0fb86af28b5a081f6c9891bf10b044aa Mon Sep 17 00:00:00 2001 From: Herman van Rink Date: Thu, 24 Aug 2023 14:06:32 +0200 Subject: [PATCH 235/621] Add missing mailbox_show_last_access setVars --- interface/web/dashboard/dashlets/mailquota.php | 4 ++++ interface/web/mail/mail_user_edit.php | 2 +- interface/web/mail/mail_user_list.php | 7 ++++--- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/interface/web/dashboard/dashlets/mailquota.php b/interface/web/dashboard/dashlets/mailquota.php index 337d066459..c255b23ce9 100644 --- a/interface/web/dashboard/dashlets/mailquota.php +++ b/interface/web/dashboard/dashlets/mailquota.php @@ -17,6 +17,10 @@ function show() { $wb['last_accessed_txt'] = $app->lng('last_accessed_txt'); $tpl->setVar($wb); + $app->uses('getconf'); + $mail_config = $app->getconf->get_global_config('mail'); + $tpl->setVar('mailbox_show_last_access', $mail_config['mailbox_show_last_access']); + $emails = $app->quota_lib->get_mailquota_data( ($_SESSION["s"]["user"]["typ"] != 'admin') ? $_SESSION['s']['user']['client_id'] : null); //print_r($emails); diff --git a/interface/web/mail/mail_user_edit.php b/interface/web/mail/mail_user_edit.php index 8cd01bf181..7d0d039557 100644 --- a/interface/web/mail/mail_user_edit.php +++ b/interface/web/mail/mail_user_edit.php @@ -136,7 +136,7 @@ function onShowEnd() { $app->tpl->setVar("enable_custom_login", 0); } - $app->tpl->setVar('mailbox_show_last_access', $global_config['mail']['mailbox_show_last_access']); + $app->tpl->setVar('mailbox_show_last_access', $mail_config['mailbox_show_last_access']); if (!empty($this->dataRecord['last_access'])) { $app->tpl->setVar("last_access", date($app->lng('conf_format_datetime'), $this->dataRecord['last_access'])); } diff --git a/interface/web/mail/mail_user_list.php b/interface/web/mail/mail_user_list.php index fa26861c79..2d28d7a4cf 100644 --- a/interface/web/mail/mail_user_list.php +++ b/interface/web/mail/mail_user_list.php @@ -24,19 +24,20 @@ function onShow() { global $app, $conf; $app->uses('getconf'); - $global_config = $app->getconf->get_global_config('mail'); + $mail_config = $app->getconf->get_global_config('mail'); - if($global_config['mailboxlist_webmail_link'] == 'y') { + if($mail_config['mailboxlist_webmail_link'] == 'y') { $app->tpl->setVar('mailboxlist_webmail_link', 1); } else { $app->tpl->setVar('mailboxlist_webmail_link', 0); } - if($global_config["enable_custom_login"] == "y") { + if($mail_config["enable_custom_login"] == "y") { $app->tpl->setVar("enable_custom_login", 1); } else { $app->tpl->setVar("enable_custom_login", 0); } + $app->tpl->setVar('mailbox_show_last_access', $mail_config['mailbox_show_last_access']); parent::onShow(); } From d8083bb8c1db96cbc16c6dc1feb8715d05a9bc8e Mon Sep 17 00:00:00 2001 From: "Dr. Yves Kreis" Date: Sun, 3 Sep 2023 19:19:14 +0300 Subject: [PATCH 236/621] master.cf changed on Debian 12 aka Bookworm --- install/lib/installer_base.lib.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php index 0041670225..b5dbaf6709 100644 --- a/install/lib/installer_base.lib.php +++ b/install/lib/installer_base.lib.php @@ -1353,7 +1353,7 @@ public function configure_postfix($options = '') { $change_maildrop_flags = @(preg_match("/$quoted_regex/", $configfile))?false:true; } if ($change_maildrop_flags) { - //* Change maildrop service in posfix master.cf + //* Change maildrop service in postfix master.cf if(is_file($config_dir.'/master.cf')) { copy($config_dir.'/master.cf', $config_dir.'/master.cf~'); } @@ -1362,8 +1362,8 @@ public function configure_postfix($options = '') { } $configfile = $config_dir.'/master.cf'; $content = rf($configfile); - $content = str_replace('flags=DRhu user=vmail argv=/usr/bin/maildrop -d ${recipient}', - 'flags=DRhu user='.$cf['vmail_username'].' argv=/usr/bin/maildrop -d '.$cf['vmail_username'].' ${extension} ${recipient} ${user} ${nexthop} ${sender}', + $content = preg_replace('/flags=(DRX?hu) user=vmail argv=\/usr\/bin\/maildrop -d \${recipient}/', + 'flags=$1 user='.$cf['vmail_username'].' argv=/usr/bin/maildrop -d '.$cf['vmail_username'].' \${extension} \${recipient} \${user} \${nexthop} \${sender}', $content); wf($configfile, $content); } From c3ead725308b1cd8deb054be397d084c2a95fcc6 Mon Sep 17 00:00:00 2001 From: "Dr. Yves Kreis" Date: Mon, 4 Sep 2023 00:33:20 +0300 Subject: [PATCH 237/621] configure_dovecot() in installer is creating master.cf~2 --- install/dist/lib/debian60.lib.php | 2 +- install/dist/lib/fedora.lib.php | 2 +- install/dist/lib/gentoo.lib.php | 2 +- install/dist/lib/opensuse.lib.php | 2 +- install/lib/installer_base.lib.php | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/install/dist/lib/debian60.lib.php b/install/dist/lib/debian60.lib.php index 981e6cff92..e6a6ec90aa 100644 --- a/install/dist/lib/debian60.lib.php +++ b/install/dist/lib/debian60.lib.php @@ -61,7 +61,7 @@ public function configure_dovecot() if(is_file($config_dir.'/master.cf')){ copy($config_dir.'/master.cf', $config_dir.'/master.cf~2'); } - if(is_file($config_dir.'/master.cf~')){ + if(is_file($config_dir.'/master.cf~2')){ chmod($config_dir.'/master.cf~2', 0400); } //* Configure master.cf and add a line for deliver diff --git a/install/dist/lib/fedora.lib.php b/install/dist/lib/fedora.lib.php index 71809ac81e..5d578e329e 100644 --- a/install/dist/lib/fedora.lib.php +++ b/install/dist/lib/fedora.lib.php @@ -144,7 +144,7 @@ public function configure_dovecot() if(is_file($config_dir.'/master.cf')){ copy($config_dir.'/master.cf', $config_dir.'/master.cf~2'); } - if(is_file($config_dir.'/master.cf~')){ + if(is_file($config_dir.'/master.cf~2')){ chmod($config_dir.'/master.cf~2', 0400); } //* Configure master.cf and add a line for deliver diff --git a/install/dist/lib/gentoo.lib.php b/install/dist/lib/gentoo.lib.php index ef660d950d..574cb10f67 100644 --- a/install/dist/lib/gentoo.lib.php +++ b/install/dist/lib/gentoo.lib.php @@ -399,7 +399,7 @@ public function configure_dovecot() { if(is_file($config_dir.'/master.cf')){ copy($config_dir.'/master.cf', $config_dir.'/master.cf~2'); } - if(is_file($config_dir.'/master.cf~')){ + if(is_file($config_dir.'/master.cf~2')){ chmod($config_dir.'/master.cf~2', 0400); } //* Configure master.cf and add a line for deliver diff --git a/install/dist/lib/opensuse.lib.php b/install/dist/lib/opensuse.lib.php index 7cc368a14e..1a4ca1d07a 100644 --- a/install/dist/lib/opensuse.lib.php +++ b/install/dist/lib/opensuse.lib.php @@ -383,7 +383,7 @@ public function configure_dovecot() if(is_file($config_dir.'/master.cf')){ copy($config_dir.'/master.cf', $config_dir.'/master.cf~2'); } - if(is_file($config_dir.'/master.cf~')){ + if(is_file($config_dir.'/master.cf~2')){ chmod($config_dir.'/master.cf~2', 0400); } //* Configure master.cf and add a line for deliver diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php index 0041670225..09ecc82e21 100644 --- a/install/lib/installer_base.lib.php +++ b/install/lib/installer_base.lib.php @@ -1539,7 +1539,7 @@ public function configure_dovecot() { if(is_file($config_dir.'/master.cf')){ copy($config_dir.'/master.cf', $config_dir.'/master.cf~2'); } - if(is_file($config_dir.'/master.cf~')){ + if(is_file($config_dir.'/master.cf~2')){ chmod($config_dir.'/master.cf~2', 0400); } //* Configure master.cf and add a line for deliver From 235f2e36372449ba052e1c7ce4c4067999959879 Mon Sep 17 00:00:00 2001 From: "Dr. Yves Kreis" Date: Mon, 4 Sep 2023 14:14:01 +0300 Subject: [PATCH 238/621] rspamd configuration files have execute bit set --- install/lib/installer_base.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php index 0041670225..bb3611fb04 100644 --- a/install/lib/installer_base.lib.php +++ b/install/lib/installer_base.lib.php @@ -2049,7 +2049,7 @@ public function configure_rspamd() { rename("/etc/rspamd/local.d/greylist.conf", "/etc/rspamd/local.d/greylist.old"); } - exec('chmod a+r /etc/rspamd/local.d/* /etc/rspamd/local.d/maps.d/* /etc/rspamd/override.d/*'); + exec('chmod a+r,-x+X /etc/rspamd/local.d/* /etc/rspamd/local.d/maps.d/* /etc/rspamd/override.d/*'); # protect passwords in these files exec('chgrp _rspamd /etc/rspamd/local.d/redis.conf /etc/rspamd/local.d/classifier-bayes.conf'); exec('chmod 640 /etc/rspamd/local.d/redis.conf /etc/rspamd/local.d/classifier-bayes.conf'); From b6eb85f9709bebab69c5707b67c539b52eb869b0 Mon Sep 17 00:00:00 2001 From: "Dr. Yves Kreis" Date: Tue, 5 Sep 2023 17:38:25 +0300 Subject: [PATCH 239/621] jailkit wrong file backup'ed --- install/lib/installer_base.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php index 0041670225..68c8efc976 100644 --- a/install/lib/installer_base.lib.php +++ b/install/lib/installer_base.lib.php @@ -916,7 +916,7 @@ public function configure_jailkit() { if (is_dir($config_dir)) { if(is_file($config_dir.'/'.$jk_init)) copy($config_dir.'/'.$jk_init, $config_dir.'/'.$jk_init.'~'); - if(is_file($config_dir.'/'.$jk_chrootsh.'.master')) copy($config_dir.'/'.$jk_chrootsh.'.master', $config_dir.'/'.$jk_chrootsh.'~'); + if(is_file($config_dir.'/'.$jk_chrootsh)) copy($config_dir.'/'.$jk_chrootsh, $config_dir.'/'.$jk_chrootsh.'~'); if(is_file($conf['ispconfig_install_dir'].'/server/conf-custom/install/'.$jk_init.'.master')) { copy($conf['ispconfig_install_dir'].'/server/conf-custom/install/'.$jk_init.'.master', $config_dir.'/'.$jk_init); From 73a0942468c74ae668ccc5b74dede456d2001164 Mon Sep 17 00:00:00 2001 From: "Dr. Yves Kreis" Date: Tue, 5 Sep 2023 17:45:21 +0300 Subject: [PATCH 240/621] jailkit php 8.2 references wrong directory --- install/tpl/jk_init.ini.master | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/tpl/jk_init.ini.master b/install/tpl/jk_init.ini.master index 0f9acb1ced..80489f8626 100644 --- a/install/tpl/jk_init.ini.master +++ b/install/tpl/jk_init.ini.master @@ -240,7 +240,7 @@ includesections = php_common [php8_2] comment = php version 8.2 -paths = /usr/bin/php8.2, /usr/lib/php/8.2/, /usr/lib/php/20210902/, /usr/share/php/8.2/, /etc/php/8.2/cli/, /etc/php/8.2/mods-available/ +paths = /usr/bin/php8.2, /usr/lib/php/8.2/, /usr/lib/php/20220829/, /usr/share/php/8.2/, /etc/php/8.2/cli/, /etc/php/8.2/mods-available/ includesections = php_common [imagemagick] From 261f8963001ace717d177538877773eef5c0e48f Mon Sep 17 00:00:00 2001 From: "Dr. Yves Kreis" Date: Fri, 8 Sep 2023 13:18:11 +0300 Subject: [PATCH 241/621] apache2 fcgid.conf should place new argument inside IfModule --- install/dist/lib/debian60.lib.php | 8 -------- install/lib/installer_base.lib.php | 6 +++++- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/install/dist/lib/debian60.lib.php b/install/dist/lib/debian60.lib.php index e6a6ec90aa..cfb17b05b0 100644 --- a/install/dist/lib/debian60.lib.php +++ b/install/dist/lib/debian60.lib.php @@ -209,14 +209,6 @@ public function configure_dovecot() } - public function configure_apache() { - global $conf; - - if(file_exists('/etc/apache2/mods-available/fcgid.conf')) replaceLine('/etc/apache2/mods-available/fcgid.conf', 'MaxRequestLen', 'MaxRequestLen 15728640', 0, 1); - - parent::configure_apache(); - } - public function configure_fail2ban() { /* copy('tpl/dovecot-pop3imap.conf.master',"/etc/fail2ban/filter.d/dovecot-pop3imap.conf"); diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php index 72f226ed6a..8910c901ee 100644 --- a/install/lib/installer_base.lib.php +++ b/install/lib/installer_base.lib.php @@ -2402,7 +2402,11 @@ public function configure_apache() { if(is_file('/etc/apache2/mods-available/fcgid.conf')) { // add or modify the parameters for fcgid.conf - replaceLine('/etc/apache2/mods-available/fcgid.conf','MaxRequestLen','MaxRequestLen 15728640',1); + if(hasLine('/etc/apache2/mods-available/fcgid.conf','MaxRequestLen')) { + replaceLine('/etc/apache2/mods-available/fcgid.conf','MaxRequestLen',' MaxRequestLen 15728640',1); + } else { + preg_replace('/^(.*\n)(.*)$/sU', '$1 MaxRequestLen 15728640\n$2', '/etc/apache2/mods-available/fcgid.conf'); + } } if(is_file('/etc/apache2/apache.conf')) { From 63a0b0f4430709b2a71fe113b020378309f7a9aa Mon Sep 17 00:00:00 2001 From: "Dr. Yves Kreis" Date: Fri, 8 Sep 2023 13:21:01 +0300 Subject: [PATCH 242/621] apache2 adding commented NameVirtualHost lines makes no sense --- install/lib/installer_base.lib.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php index 72f226ed6a..980d27402f 100644 --- a/install/lib/installer_base.lib.php +++ b/install/lib/installer_base.lib.php @@ -2396,8 +2396,8 @@ public function configure_apache() { replaceLine('/etc/apache2/ports.conf', 'Listen 443', 'Listen 443', 1); // Comment out the namevirtualhost lines, as they were added by ispconfig in ispconfig.conf file again - replaceLine('/etc/apache2/ports.conf', 'NameVirtualHost *:80', '# NameVirtualHost *:80', 1); - replaceLine('/etc/apache2/ports.conf', 'NameVirtualHost *:443', '# NameVirtualHost *:443', 1); + replaceLine('/etc/apache2/ports.conf', 'NameVirtualHost *:80', '# NameVirtualHost *:80', 1, 0); + replaceLine('/etc/apache2/ports.conf', 'NameVirtualHost *:443', '# NameVirtualHost *:443', 1, 0); } if(is_file('/etc/apache2/mods-available/fcgid.conf')) { From 2482e0e3b27915ff0f877d1b20cbcf369bb2c1e2 Mon Sep 17 00:00:00 2001 From: "Dr. Yves Kreis" Date: Fri, 8 Sep 2023 22:02:08 +0300 Subject: [PATCH 243/621] Undefined variable $issued_successfully --- install/lib/installer_base.lib.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php index 72f226ed6a..386c8a6abd 100644 --- a/install/lib/installer_base.lib.php +++ b/install/lib/installer_base.lib.php @@ -3047,6 +3047,8 @@ public function make_ispconfig_ssl_cert() { $crt_issuer = exec("openssl x509 -in ".escapeshellarg($ssl_crt_file)." -inform PEM -noout -issuer"); } + $issued_successfully = false; + if ((@file_exists($ssl_crt_file) && ($crt_subject == $crt_issuer)) || (!@is_dir($acme_cert_dir) || !@file_exists($check_acme_file) || !@file_exists($ssl_crt_file) || md5_file($check_acme_file) != md5_file($ssl_crt_file)) && $ip_address_match == true) { // This script is needed earlier to check and open http port 80 or standalone might fail @@ -3145,8 +3147,6 @@ public function make_ispconfig_ssl_cert() { } } - $issued_successfully = false; - // Backup existing ispserver ssl files // // We may find valid or broken symlinks or actual files here. From af5bdb6bb3e905a6e7ff4d8a484e0c847e7a0010 Mon Sep 17 00:00:00 2001 From: "Dr. Yves Kreis" Date: Sat, 9 Sep 2023 18:31:17 +0300 Subject: [PATCH 244/621] Avoid "no crontab for ..." message --- install/lib/installer_base.lib.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php index d2ec9065da..0bde929242 100644 --- a/install/lib/installer_base.lib.php +++ b/install/lib/installer_base.lib.php @@ -3927,7 +3927,7 @@ public function install_crontab() { $install_dir = $conf['ispconfig_install_dir']; //* Root Crontab - exec('crontab -u root -l > crontab.txt'); + exec('crontab -u root -l > crontab.txt 2>/dev/null'); $existing_root_cron_jobs = file('crontab.txt'); // remove existing ispconfig cronjobs, in case the syntax has changed @@ -3956,7 +3956,7 @@ public function install_crontab() { //* Getmail crontab if(is_user('getmail')) { $cf = $conf['getmail']; - exec('crontab -u getmail -l > crontab.txt'); + exec('crontab -u getmail -l > crontab.txt 2>/dev/null'); $existing_cron_jobs = file('crontab.txt'); $cron_jobs = array( From 11e59c890c023d39033d71d84129fa4c74ae34f3 Mon Sep 17 00:00:00 2001 From: Pyte C Date: Thu, 14 Sep 2023 16:32:29 +0000 Subject: [PATCH 245/621] Updated validation for DNS DMARC creation/update fixes #6575 --- interface/web/dns/dns_dmarc_edit.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interface/web/dns/dns_dmarc_edit.php b/interface/web/dns/dns_dmarc_edit.php index e194aeb835..c2c54c6659 100644 --- a/interface/web/dns/dns_dmarc_edit.php +++ b/interface/web/dns/dns_dmarc_edit.php @@ -228,7 +228,7 @@ function onSubmit() { // DMARC requieres at least one active dkim-record... $sql = "SELECT * FROM dns_rr LEFT JOIN dns_soa ON (dns_rr.zone=dns_soa.id) - WHERE dns_soa.origin = ? AND dns_rr.name LIKE ? AND type='TXT' AND data like 'v=DKIM1;%' AND dns_rr.active='Y'"; + WHERE dns_soa.origin = ? AND dns_rr.name LIKE ? AND ((type='TXT' AND data LIKE 'v=DKIM%') OR type='CNAME') AND dns_rr.active='Y'"; $temp = $app->db->queryAllRecords($sql, $soa['origin'], '%._domainkey%'); if (empty($temp)) { if (isset($app->tform->errorMessage )) $app->tform->errorMessage = '
' . $app->tform->errorMessage; From 6c5656c1daaae83e8eb97039ce941dcc4bb20bd3 Mon Sep 17 00:00:00 2001 From: Till Date: Sat, 16 Sep 2023 12:44:53 +0200 Subject: [PATCH 246/621] Fixes #6577 Move unmaintained old plugins to docs --- .../bind_dlz_plugin.inc.php | 0 .../nginx_reverseproxy_plugin.inc.php | 0 install/patches/upd_0099.php | 18 ++++++++++++++++++ 3 files changed, 18 insertions(+) rename {server/plugins-available => docs/old_server_plugins}/bind_dlz_plugin.inc.php (100%) rename {server/plugins-available => docs/old_server_plugins}/nginx_reverseproxy_plugin.inc.php (100%) create mode 100644 install/patches/upd_0099.php diff --git a/server/plugins-available/bind_dlz_plugin.inc.php b/docs/old_server_plugins/bind_dlz_plugin.inc.php similarity index 100% rename from server/plugins-available/bind_dlz_plugin.inc.php rename to docs/old_server_plugins/bind_dlz_plugin.inc.php diff --git a/server/plugins-available/nginx_reverseproxy_plugin.inc.php b/docs/old_server_plugins/nginx_reverseproxy_plugin.inc.php similarity index 100% rename from server/plugins-available/nginx_reverseproxy_plugin.inc.php rename to docs/old_server_plugins/nginx_reverseproxy_plugin.inc.php diff --git a/install/patches/upd_0099.php b/install/patches/upd_0099.php new file mode 100644 index 0000000000..137722f8e6 --- /dev/null +++ b/install/patches/upd_0099.php @@ -0,0 +1,18 @@ + Date: Tue, 19 Sep 2023 22:09:44 +0200 Subject: [PATCH 247/621] Allow overriding the interface_base_url for password reset mails, #6580 --- install/tpl/config.inc.php.master | 1 + interface/web/login/password_reset.php | 3 +++ 2 files changed, 4 insertions(+) diff --git a/install/tpl/config.inc.php.master b/install/tpl/config.inc.php.master index aa9329fb7b..faed5b8454 100644 --- a/install/tpl/config.inc.php.master +++ b/install/tpl/config.inc.php.master @@ -158,6 +158,7 @@ $conf['timezone'] = '{timezone}'; //** Misc. $conf['interface_logout_url'] = ''; // example: http://www.domain.tld/ +$conf['interface_base_url'] = ''; // example: http://www.domain.tld (no trailing slash) //** Auto Load Modules diff --git a/interface/web/login/password_reset.php b/interface/web/login/password_reset.php index 659075483c..78ec9624b3 100644 --- a/interface/web/login/password_reset.php +++ b/interface/web/login/password_reset.php @@ -84,6 +84,9 @@ else $server_domain = 'https://' . $server_domain; if(isset($_SERVER['SERVER_PORT']) && $_SERVER['SERVER_PORT'] != '443') $server_domain .= ':' . $_SERVER['SERVER_PORT']; + if (!empty($conf['interface_base_url'])) { + $server_domain = $conf['interface_base_url']; + } $app->uses('getconf,ispcmail'); $server_config_array = $app->getconf->get_global_config(); From ba07b9d1d8ffa127937d43c7222c5856f808761c Mon Sep 17 00:00:00 2001 From: Nathaniel Mitchell Date: Wed, 20 Sep 2023 11:21:13 +0000 Subject: [PATCH 248/621] Added ignores for VSCode (missing items) --- .gitignore | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index ef9abd3d60..334dbbc502 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,5 @@ .idea /nbproject/private/ -.vscode .phplint-cache *.swp @@ -37,4 +36,18 @@ Temporary Items .apdisk # Configuration for the Nova editor -.nova \ No newline at end of file +.nova + +# VS Code files for those working on multiple tools +.vscode/* +*.code-workspace + +# Local History for Visual Studio Code +.history/ + +# Built Visual Studio Code Extensions +*.vsix + +# Visual Studio code coverage results +*.coverage +*.coveragexml \ No newline at end of file From 9c2cbd07c56fb8931064e6c17147a867b9c34bb1 Mon Sep 17 00:00:00 2001 From: Jonas <22-jnsc@users.noreply.git.ispconfig.org> Date: Fri, 22 Sep 2023 09:35:56 +0000 Subject: [PATCH 249/621] Fix typo in french translation --- interface/web/sites/lib/lang/ca_cron.lng | 16 ++++++++-------- interface/web/sites/lib/lang/fr_cron.lng | 18 +++++++++--------- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/interface/web/sites/lib/lang/ca_cron.lng b/interface/web/sites/lib/lang/ca_cron.lng index 85a27b2319..4124abd16a 100644 --- a/interface/web/sites/lib/lang/ca_cron.lng +++ b/interface/web/sites/lib/lang/ca_cron.lng @@ -8,19 +8,19 @@ $wb['run_hour_txt'] = 'Heures'; $wb['run_mday_txt'] = 'Jours du mois'; $wb['run_month_txt'] = 'Mois'; $wb['run_wday_txt'] = 'Jours de la semaine'; -$wb['command_txt'] = 'Commande à éxécuter (commandes via sh, URLs via wget)'; -$wb['limit_cron_txt'] = 'La nombre maximum de tâches cron autorisés a été atteint.'; -$wb['limit_cron_frequency_txt'] = 'La fréquence du cron excède la limite autorisée.'; +$wb['command_txt'] = 'Commande à exécuter (commandes via sh, URLs via wget)'; +$wb['limit_cron_txt'] = 'Le nombre maximum de tâches cron autorisés a été atteint.'; +$wb['limit_cron_frequency_txt'] = 'La fréquence du cron excède la limite autorisées.'; $wb['run_min_error_format'] = 'Format invalide pour les minutes.'; $wb['run_hour_error_format'] = 'Format invalide pour les heures.'; $wb['run_mday_error_format'] = 'Format invalide pour les jours du mois.'; $wb['run_month_error_format'] = 'Format invalide pour les mois.'; -$wb['run_wday_error_format'] = 'Format invalide pour les jours du mois.'; +$wb['run_wday_error_format'] = 'Format invalide pour les jours de la semaine.'; $wb['command_error_format'] = 'Format de la commande invalide.'; $wb['unknown_fieldtype_error'] = 'Un champ inconnu a été utilisé'; $wb['server_id_error_empty'] = 'ID serveur non renseigné'; -$wb['limit_cron_url_txt'] = 'URL cron only. Please enter a URL starting with https:// as cron command.'; -$wb['command_error_empty'] = 'Command is empty.'; -$wb['command_hint_txt'] = 'e.g. /var/www/clients/clientX/webY/myscript.sh or https://www.mydomain.com/path/script.php, you can use [web_root] placeholder that is replaced by /var/www/clients/clientX/webY/web.'; -$wb['log_output_txt'] = 'Log output'; +$wb['limit_cron_url_txt'] = 'Cron de type URL seulement. Merci d\'introduire une URL débutant par https:// en tant que commande cron.'; +$wb['command_error_empty'] = 'Le champ Commande à exécuter est vide.'; +$wb['command_hint_txt'] = 'par exemple /var/www/clients/clientX/webY/monscript.sh ou https://www.mondomaine.com/chemin/script.php, vous pouvez utiliser la constante [web_root] qui sera remplacée par /var/www/clients/clientX/webY/web.'; +$wb['log_output_txt'] = 'Journaliser la sortie du cron'; ?> diff --git a/interface/web/sites/lib/lang/fr_cron.lng b/interface/web/sites/lib/lang/fr_cron.lng index d50767c5ba..4124abd16a 100644 --- a/interface/web/sites/lib/lang/fr_cron.lng +++ b/interface/web/sites/lib/lang/fr_cron.lng @@ -8,19 +8,19 @@ $wb['run_hour_txt'] = 'Heures'; $wb['run_mday_txt'] = 'Jours du mois'; $wb['run_month_txt'] = 'Mois'; $wb['run_wday_txt'] = 'Jours de la semaine'; -$wb['command_txt'] = 'Commande à éxécuter (commandes via sh, URLs via wget)'; -$wb['limit_cron_txt'] = 'La nombre maximum de tâches cron autorisés a été atteint.'; -$wb['limit_cron_frequency_txt'] = 'La fréquence du cron excède la limite autorisée.'; +$wb['command_txt'] = 'Commande à exécuter (commandes via sh, URLs via wget)'; +$wb['limit_cron_txt'] = 'Le nombre maximum de tâches cron autorisés a été atteint.'; +$wb['limit_cron_frequency_txt'] = 'La fréquence du cron excède la limite autorisées.'; $wb['run_min_error_format'] = 'Format invalide pour les minutes.'; $wb['run_hour_error_format'] = 'Format invalide pour les heures.'; $wb['run_mday_error_format'] = 'Format invalide pour les jours du mois.'; $wb['run_month_error_format'] = 'Format invalide pour les mois.'; -$wb['run_wday_error_format'] = 'Format invalide pour les jours du mois.'; +$wb['run_wday_error_format'] = 'Format invalide pour les jours de la semaine.'; $wb['command_error_format'] = 'Format de la commande invalide.'; $wb['unknown_fieldtype_error'] = 'Un champ inconnu a été utilisé'; -$wb['server_id_error_empty'] = 'The server ID is empty.'; -$wb['limit_cron_url_txt'] = 'URL cron only. Please enter a URL starting with https:// as cron command.'; -$wb['command_error_empty'] = 'Command is empty.'; -$wb['command_hint_txt'] = 'e.g. /var/www/clients/clientX/webY/myscript.sh or https://www.mydomain.com/path/script.php, you can use [web_root] placeholder that is replaced by /var/www/clients/clientX/webY/web.'; -$wb['log_output_txt'] = 'Log output'; +$wb['server_id_error_empty'] = 'ID serveur non renseigné'; +$wb['limit_cron_url_txt'] = 'Cron de type URL seulement. Merci d\'introduire une URL débutant par https:// en tant que commande cron.'; +$wb['command_error_empty'] = 'Le champ Commande à exécuter est vide.'; +$wb['command_hint_txt'] = 'par exemple /var/www/clients/clientX/webY/monscript.sh ou https://www.mondomaine.com/chemin/script.php, vous pouvez utiliser la constante [web_root] qui sera remplacée par /var/www/clients/clientX/webY/web.'; +$wb['log_output_txt'] = 'Journaliser la sortie du cron'; ?> From f81d3f2b05b4f3904700bdca79f3999737b35a64 Mon Sep 17 00:00:00 2001 From: Manoa Ratefiarison Date: Tue, 26 Sep 2023 07:30:13 +0000 Subject: [PATCH 250/621] Use PHP-FPM reload mode from server configuration when nginx_plugin ask for a PHP-FPM reload (Fixes #6581) --- server/plugins-available/nginx_plugin.inc.php | 21 ++++++++++--------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/server/plugins-available/nginx_plugin.inc.php b/server/plugins-available/nginx_plugin.inc.php index f46257e661..5ab2bcba33 100644 --- a/server/plugins-available/nginx_plugin.inc.php +++ b/server/plugins-available/nginx_plugin.inc.php @@ -2880,6 +2880,7 @@ private function php_fpm_pool_update ($data, $web_config, $pool_dir, $pool_name, $app->uses("getconf"); $web_config = $app->getconf->get_server_config($conf["server_id"], 'web'); + $php_fpm_reload_mode = ($web_config['php_fpm_reload_mode'] == 'reload')?'reload':'restart'; // HHVM => PHP-FPM-Fallback if($data['new']['php'] != 'php-fpm' && $data['new']['php'] != 'hhvm'){ @@ -2889,9 +2890,9 @@ private function php_fpm_pool_update ($data, $web_config, $pool_dir, $pool_name, } if($data['old']['php'] != 'no'){ if(!$default_php_fpm){ - $app->services->restartService('php-fpm', 'reload:'.$custom_php_fpm_init_script); + $app->services->restartService('php-fpm', $php_fpm_reload_mode.':'.$custom_php_fpm_init_script); } else { - $app->services->restartService('php-fpm', 'reload:'.$conf['init_scripts'].'/'.$web_config['php_fpm_init_script']); + $app->services->restartService('php-fpm', $php_fpm_reload_mode.':'.$conf['init_scripts'].'/'.$web_config['php_fpm_init_script']); } } return; @@ -3039,7 +3040,7 @@ private function php_fpm_pool_update ($data, $web_config, $pool_dir, $pool_name, if ( @is_file($default_pool_dir.$pool_name.'.conf') ) { $app->system->unlink($default_pool_dir.$pool_name.'.conf'); $app->log('Removed PHP-FPM config file: '.$default_pool_dir.$pool_name.'.conf', LOGLEVEL_DEBUG); - $app->services->restartService('php-fpm', 'reload:'.$conf['init_scripts'].'/'.$web_config['php_fpm_init_script']); + $app->services->restartService('php-fpm', $php_fpm_reload_mode.':'.$conf['init_scripts'].'/'.$web_config['php_fpm_init_script']); } } $php_versions = $app->db->queryAllRecords("SELECT * FROM server_php WHERE php_fpm_init_script != '' AND php_fpm_ini_dir != '' AND php_fpm_pool_dir != '' AND server_id = ?", $conf["server_id"]); @@ -3051,7 +3052,7 @@ private function php_fpm_pool_update ($data, $web_config, $pool_dir, $pool_name, if ( @is_file($php_version['php_fpm_pool_dir'].$pool_name.'.conf') ) { $app->system->unlink($php_version['php_fpm_pool_dir'].$pool_name.'.conf'); $app->log('Removed PHP-FPM config file: '.$php_version['php_fpm_pool_dir'].$pool_name.'.conf', LOGLEVEL_DEBUG); - $app->services->restartService('php-fpm', 'reload:'.$php_version['php_fpm_init_script']); + $app->services->restartService('php-fpm', $php_fpm_reload_mode.':'.$php_version['php_fpm_init_script']); } } } @@ -3059,9 +3060,9 @@ private function php_fpm_pool_update ($data, $web_config, $pool_dir, $pool_name, // Reload current PHP-FPM after all others sleep(1); if(!$default_php_fpm){ - $app->services->restartService('php-fpm', 'reload:'.$custom_php_fpm_init_script); + $app->services->restartService('php-fpm', $php_fpm_reload_mode.':'.$custom_php_fpm_init_script); } else { - $app->services->restartService('php-fpm', 'reload:'.$conf['init_scripts'].'/'.$web_config['php_fpm_init_script']); + $app->services->restartService('php-fpm', $php_fpm_reload_mode.':'.$conf['init_scripts'].'/'.$web_config['php_fpm_init_script']); } } @@ -3104,7 +3105,7 @@ private function php_fpm_pool_delete ($data, $web_config) { if ( @is_file($default_pool_dir.$pool_name.'.conf') ) { $app->system->unlink($default_pool_dir.$pool_name.'.conf'); $app->log('Removed PHP-FPM config file: '.$default_pool_dir.$pool_name.'.conf', LOGLEVEL_DEBUG); - $app->services->restartService('php-fpm', 'reload:'.$conf['init_scripts'].'/'.$web_config['php_fpm_init_script']); + $app->services->restartService('php-fpm', $php_fpm_reload_mode.':'.$conf['init_scripts'].'/'.$web_config['php_fpm_init_script']); } } $php_versions = $app->db->queryAllRecords("SELECT * FROM server_php WHERE php_fpm_init_script != '' AND php_fpm_ini_dir != '' AND php_fpm_pool_dir != '' AND server_id = ?", $data['old']['server_id']); @@ -3116,7 +3117,7 @@ private function php_fpm_pool_delete ($data, $web_config) { if ( @is_file($php_version['php_fpm_pool_dir'].$pool_name.'.conf') ) { $app->system->unlink($php_version['php_fpm_pool_dir'].$pool_name.'.conf'); $app->log('Removed PHP-FPM config file: '.$php_version['php_fpm_pool_dir'].$pool_name.'.conf', LOGLEVEL_DEBUG); - $app->services->restartService('php-fpm', 'reload:'.$php_version['php_fpm_init_script']); + $app->services->restartService('php-fpm', $php_fpm_reload_mode.':'.$php_version['php_fpm_init_script']); } } } @@ -3125,9 +3126,9 @@ private function php_fpm_pool_delete ($data, $web_config) { // Reload current PHP-FPM after all others sleep(1); if(!$default_php_fpm){ - $app->services->restartService('php-fpm', 'reload:'.$custom_php_fpm_init_script); + $app->services->restartService('php-fpm', $php_fpm_reload_mode.':'.$custom_php_fpm_init_script); } else { - $app->services->restartService('php-fpm', 'reload:'.$conf['init_scripts'].'/'.$web_config['php_fpm_init_script']); + $app->services->restartService('php-fpm', $php_fpm_reload_mode.':'.$conf['init_scripts'].'/'.$web_config['php_fpm_init_script']); } } From 7c2bb8821be625c349c4dba7bceb40becd0e6368 Mon Sep 17 00:00:00 2001 From: Till Brehm Date: Tue, 3 Oct 2023 11:59:04 +0000 Subject: [PATCH 251/621] Fixes #1813 --- install/lib/installer_base.lib.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php index 0bde929242..8e6cfca07b 100644 --- a/install/lib/installer_base.lib.php +++ b/install/lib/installer_base.lib.php @@ -2988,7 +2988,7 @@ public function make_ispconfig_ssl_cert() { $dnsa=dns_get_record($hostname, DNS_A); if($dnsa) { foreach ($dnsa as $rec) { - $dns_ips[] = $rec['ip']; + if(is_array($rec) && isset($rec['ip'])) $dns_ips[] = $rec['ip']; } } } @@ -2996,7 +2996,7 @@ public function make_ispconfig_ssl_cert() { $dnsaaaa=dns_get_record($hostname, DNS_AAAA); if($dnsaaaa) { foreach ($dnsaaaa as $rec) { - $dns_ips[] = $rec['ip']; + if(is_array($rec) && isset($rec['ip'])) $dns_ips[] = $rec['ip']; } } } From b4abe78631b97ec21c6893ee8cb1b2184b033685 Mon Sep 17 00:00:00 2001 From: Till Brehm Date: Sat, 14 Oct 2023 10:11:21 +0000 Subject: [PATCH 252/621] Update system_config_dns_ca_plugin.inc.php --- interface/lib/plugins/system_config_dns_ca_plugin.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interface/lib/plugins/system_config_dns_ca_plugin.inc.php b/interface/lib/plugins/system_config_dns_ca_plugin.inc.php index ba28ca0641..0cfd871560 100644 --- a/interface/lib/plugins/system_config_dns_ca_plugin.inc.php +++ b/interface/lib/plugins/system_config_dns_ca_plugin.inc.php @@ -79,7 +79,7 @@ function web_vhost_domain_edit($event_name, $page_form) { if(is_array($caa) && is_array($soa)) { $records = array(); $records[] = $domain.'.';; - if($subdomain != '' && $subdomain != 'www') $records[] = $subdomain.'.'.$domain; + if($subdomain != '' && $subdomain != 'www' && $subdomain != 'none') $records[] = $subdomain.'.'.$domain; foreach($records as $record) { $new_rr = $app->db->queryOneRecord("SELECT * FROM dns_rr WHERE name = ?", $soa['origin']); unset($new_rr['id']); From ecc9b9e7667677fa7950892e4a29750713c7b9f6 Mon Sep 17 00:00:00 2001 From: Till Date: Sat, 21 Oct 2023 09:41:10 +0200 Subject: [PATCH 253/621] Revert "Move asking to sql root to the place where its needed," This reverts commit a8d78f68d8b882a153b555e1207c2ca3004ba9f3. --- install/update.php | 53 ++++++++++++++++++++-------------------------- 1 file changed, 23 insertions(+), 30 deletions(-) diff --git a/install/update.php b/install/update.php index e03b5d9de1..55b711da73 100644 --- a/install/update.php +++ b/install/update.php @@ -279,11 +279,33 @@ //* initialize the master DB, if we have a multiserver setup if($conf['mysql']['master_slave_setup'] == 'y') { + //** Get MySQL root credentials + $finished = false; + do { + $tmp_mysql_server_host = $inst->free_query('MySQL master server hostname', $conf['mysql']['master_host'],'mysql_master_hostname'); + $tmp_mysql_server_port = $inst->free_query('MySQL master server port', $conf['mysql']['master_port'],'mysql_master_port'); + $tmp_mysql_server_admin_user = $inst->free_query('MySQL master server root username', $conf['mysql']['master_admin_user'],'mysql_master_root_user'); + $tmp_mysql_server_admin_password = $inst->free_query('MySQL master server root password', $conf['mysql']['master_admin_password'],'mysql_master_root_password'); + $tmp_mysql_server_database = $inst->free_query('MySQL master server database name', $conf['mysql']['master_database'],'mysql_master_database'); + + //* Initialize the MySQL server connection + if(@mysqli_connect($tmp_mysql_server_host, $tmp_mysql_server_admin_user, $tmp_mysql_server_admin_password, $tmp_mysql_server_database, (int)$tmp_mysql_server_port)) { + $conf['mysql']['master_host'] = $tmp_mysql_server_host; + $conf['mysql']['master_port'] = $tmp_mysql_server_port; + $conf['mysql']['master_admin_user'] = $tmp_mysql_server_admin_user; + $conf['mysql']['master_admin_password'] = $tmp_mysql_server_admin_password; + $conf['mysql']['master_database'] = $tmp_mysql_server_database; + $finished = true; + } else { + swriteln($inst->lng('Unable to connect to mysql server').' '.mysqli_connect_error()); + } + } while ($finished == false); + unset($finished); // initialize the connection to the master database $inst->dbmaster = new db(); if($inst->dbmaster->linkId) $inst->dbmaster->closeConn(); - $inst->dbmaster->setDBData($conf['mysql']["master_host"], $conf['mysql']["master_ispconfig_user"], $conf['mysql']["master_ispconfig_password"], $conf['mysql']["master_port"]); + $inst->dbmaster->setDBData($conf['mysql']["master_host"], $conf['mysql']["master_admin_user"], $conf['mysql']["master_admin_password"], $conf['mysql']["master_port"]); $inst->dbmaster->setDBName($conf['mysql']["master_database"]); } else { $inst->dbmaster = $inst->db; @@ -330,35 +352,6 @@ $reconfigure_master_database_rights_answer = $inst->simple_query('Reconfigure Permissions in master database?', array('yes', 'no'), 'no','reconfigure_permissions_in_master_database'); if($reconfigure_master_database_rights_answer == 'yes') { - //** Get MySQL root credentials, to upgrade the dbmaster connection. - $finished = false; - do { - $tmp_mysql_server_host = $inst->free_query('MySQL master server hostname', $conf['mysql']['master_host'],'mysql_master_hostname'); - $tmp_mysql_server_port = $inst->free_query('MySQL master server port', $conf['mysql']['master_port'],'mysql_master_port'); - $tmp_mysql_server_admin_user = $inst->free_query('MySQL master server root username', $conf['mysql']['master_admin_user'],'mysql_master_root_user'); - $tmp_mysql_server_admin_password = $inst->free_query('MySQL master server root password', $conf['mysql']['master_admin_password'],'mysql_master_root_password'); - $tmp_mysql_server_database = $inst->free_query('MySQL master server database name', $conf['mysql']['master_database'],'mysql_master_database'); - - //* Initialize the MySQL server connection - if(@mysqli_connect($tmp_mysql_server_host, $tmp_mysql_server_admin_user, $tmp_mysql_server_admin_password, $tmp_mysql_server_database, (int)$tmp_mysql_server_port)) { - $conf['mysql']['master_host'] = $tmp_mysql_server_host; - $conf['mysql']['master_port'] = $tmp_mysql_server_port; - $conf['mysql']['master_admin_user'] = $tmp_mysql_server_admin_user; - $conf['mysql']['master_admin_password'] = $tmp_mysql_server_admin_password; - $conf['mysql']['master_database'] = $tmp_mysql_server_database; - $finished = true; - } else { - swriteln($inst->lng('Unable to connect to mysql server').' '.mysqli_connect_error()); - } - } while ($finished == false); - unset($finished); - - // initialize the connection to the master database - $inst->dbmaster = new db(); - if($inst->dbmaster->linkId) $inst->dbmaster->closeConn(); - $inst->dbmaster->setDBData($conf['mysql']["master_host"], $conf['mysql']["master_admin_user"], $conf['mysql']["master_admin_password"], $conf['mysql']["master_port"]); - $inst->dbmaster->setDBName($conf['mysql']["master_database"]); - $inst->grant_master_database_rights(); } //} From e5a9f19ee06b0d94aab3c509569e1780bbf53a68 Mon Sep 17 00:00:00 2001 From: Nathaniel Mitchell Date: Sat, 21 Oct 2023 07:58:19 +0000 Subject: [PATCH 254/621] Fixes PHP warnings in monitor for mem and clamav --- .../cron.d/100-monitor_clamav_log.inc.php | 34 ++++++++++--------- .../cron.d/100-monitor_mem_usage.inc.php | 17 ++++++---- 2 files changed, 28 insertions(+), 23 deletions(-) diff --git a/server/lib/classes/cron.d/100-monitor_clamav_log.inc.php b/server/lib/classes/cron.d/100-monitor_clamav_log.inc.php index 162f38c385..f2120539b4 100644 --- a/server/lib/classes/cron.d/100-monitor_clamav_log.inc.php +++ b/server/lib/classes/cron.d/100-monitor_clamav_log.inc.php @@ -104,24 +104,26 @@ public function onRunJob() { $tmp = explode("\n", $data); $lastLog = array(); - if ($tmp[sizeof($tmp) - 1] == '') { - /* the log ends with an empty line remove this */ - array_pop($tmp); - } - if (strpos($tmp[sizeof($tmp) - 1], '-------------') !== false) { - /* the log ends with "-----..." remove this */ - array_pop($tmp); - } - for ($i = sizeof($tmp) - 1; $i > 0; $i--) { - if (strpos($tmp[$i], '---------') === false) { - /* no delimiter found, so add this to the last-log */ - $lastLog[] = $tmp[$i]; - } else { - /* delimiter found, so there is no more line left! */ - break; + if (count($tmp) >= 2) { + if ($tmp[sizeof($tmp) - 1] == '') { + /* the log ends with an empty line remove this */ + array_pop($tmp); + } + if (strpos($tmp[sizeof($tmp) - 1], '-------------') !== false) { + /* the log ends with "-----..." remove this */ + array_pop($tmp); + } + for ($i = sizeof($tmp) - 1; $i > 0; $i--) { + if (strpos($tmp[$i], '---------') === false) { + /* no delimiter found, so add this to the last-log */ + $lastLog[] = $tmp[$i]; + } else { + /* delimiter found, so there is no more line left! */ + break; + } } } - + /* * Now we have the last log in the array. * Check if the outdated-string is found... diff --git a/server/lib/classes/cron.d/100-monitor_mem_usage.inc.php b/server/lib/classes/cron.d/100-monitor_mem_usage.inc.php index 613287267d..22fa25607a 100644 --- a/server/lib/classes/cron.d/100-monitor_mem_usage.inc.php +++ b/server/lib/classes/cron.d/100-monitor_mem_usage.inc.php @@ -28,6 +28,7 @@ EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ + class cronjob_monitor_mem_usage extends cronjob { // job schedule @@ -74,13 +75,15 @@ public function onRunJob() { $memInfo = explode("\n", $miData); foreach ($memInfo as $line) { - $part = preg_split('/:/', $line); - $key = trim($part[0]); - $tmp = explode(' ', trim($part[1])); - $value = 0; - if (isset($tmp[1]) && $tmp[1] == 'kB') - $value = $tmp[0] * 1024; - $data[$key] = $value; + if (strlen($line) >= 1){ + $part = preg_split('/:/', $line); + $key = trim($part[0]); + $tmp = explode(' ', trim($part[1])); + $value = 0; + if (isset($tmp[1]) && $tmp[1] == 'kB') + $value = $tmp[0] * 1024; + $data[$key] = $value; + } } /* From 3aab298c478f19dac3b1a956f2cd8622f09e17fa Mon Sep 17 00:00:00 2001 From: Riccardo Leonardi Date: Sat, 21 Oct 2023 08:33:59 +0000 Subject: [PATCH 255/621] Implements #6582 Autoresponder in HTML format --- install/sql/incremental/upd_dev_collection.sql | 1 + install/sql/ispconfig3.sql | 1 + interface/web/mail/form/mail_user.tform.php | 8 +++++++- .../mailuser/templates/mail_user_autoresponder_edit.htm | 4 ++++ server/conf/sieve_filter.master | 8 ++++++++ server/plugins-available/maildeliver_plugin.inc.php | 4 ++++ 6 files changed, 25 insertions(+), 1 deletion(-) diff --git a/install/sql/incremental/upd_dev_collection.sql b/install/sql/incremental/upd_dev_collection.sql index e69de29bb2..3a16aee496 100644 --- a/install/sql/incremental/upd_dev_collection.sql +++ b/install/sql/incremental/upd_dev_collection.sql @@ -0,0 +1 @@ +ALTER TABLE `mail_user` ADD `autoresponder_html` enum('n','y') NOT NULL DEFAULT 'n'; diff --git a/install/sql/ispconfig3.sql b/install/sql/ispconfig3.sql index 75529ab82b..fefa6ccb6d 100644 --- a/install/sql/ispconfig3.sql +++ b/install/sql/ispconfig3.sql @@ -1076,6 +1076,7 @@ CREATE TABLE `mail_user` ( `sender_cc` varchar(255) NOT NULL default '', `homedir` varchar(255) NOT NULL default '', `autoresponder` enum('n','y') NOT NULL default 'n', + `autoresponder_html` enum('n','y') NOT NULL default 'n', `autoresponder_start_date` datetime NULL default NULL, `autoresponder_end_date` datetime NULL default NULL, `autoresponder_subject` varchar(255) NOT NULL default 'Out of office reply', diff --git a/interface/web/mail/form/mail_user.tform.php b/interface/web/mail/form/mail_user.tform.php index 3dd334a29c..b008299c34 100644 --- a/interface/web/mail/form/mail_user.tform.php +++ b/interface/web/mail/form/mail_user.tform.php @@ -381,7 +381,7 @@ 'formtype' => 'TEXTAREA', 'filters' => array( 0 => array( 'event' => 'SAVE', - 'type' => 'STRIPTAGS') + 'type' => 'TRIM') ), 'default' => '', 'value' => '', @@ -394,6 +394,12 @@ 'default' => 'n', 'value' => array(1 => 'y', 0 => 'n') ), + 'autoresponder_html' => array ( + 'datatype' => 'VARCHAR', + 'formtype' => 'CHECKBOX', + 'default' => 'n', + 'value' => array(1 => 'y', 0 => 'n') + ), 'autoresponder_start_date' => array ( 'datatype' => 'DATETIME', 'formtype' => 'DATETIME', diff --git a/interface/web/mailuser/templates/mail_user_autoresponder_edit.htm b/interface/web/mailuser/templates/mail_user_autoresponder_edit.htm index 898f285e53..51c28351c7 100644 --- a/interface/web/mailuser/templates/mail_user_autoresponder_edit.htm +++ b/interface/web/mailuser/templates/mail_user_autoresponder_edit.htm @@ -10,6 +10,10 @@
+
+ +
+
{tmpl_var name='autoresponder_start_date'}
diff --git a/server/conf/sieve_filter.master b/server/conf/sieve_filter.master index 8719717da8..67ea56ddf2 100644 --- a/server/conf/sieve_filter.master +++ b/server/conf/sieve_filter.master @@ -61,7 +61,15 @@ if currentdate :value "le" "iso8601" "" { vacation :days 1 :subject "" + + :mime "MIME-Version: 1.0 +Content-Type: text/html; charset=UTF-8 +Content-Transfer-Encoding: 7bit +"; + + ""; + } diff --git a/server/plugins-available/maildeliver_plugin.inc.php b/server/plugins-available/maildeliver_plugin.inc.php index 15cf20c25f..0d3ad974f4 100644 --- a/server/plugins-available/maildeliver_plugin.inc.php +++ b/server/plugins-available/maildeliver_plugin.inc.php @@ -89,6 +89,7 @@ function update($event_name, $data) { or $data["old"]["autoresponder_subject"] != $data["new"]["autoresponder_subject"] or $data["old"]["autoresponder_text"] != $data["new"]["autoresponder_text"] or $data["old"]["autoresponder"] != $data["new"]["autoresponder"] + or $data["old"]["autoresponder_html"] != $data["new"]["autoresponder_html"] or (isset($data["new"]["email"]) and $data["old"]["email"] != $data["new"]["email"]) or $data["old"]["autoresponder_start_date"] != $data["new"]["autoresponder_start_date"] or $data["old"]["autoresponder_end_date"] != $data["new"]["autoresponder_end_date"] @@ -154,6 +155,9 @@ function update($event_name, $data) { // Autoresponder $tpl->setVar('autoresponder', $data["new"]["autoresponder"]); + // Autoresponder_html + $tpl->setVar('autoresponder_html', $data["new"]["autoresponder_html"]); + // Autoresponder Subject $data["new"]["autoresponder_subject"] = str_replace("\"", "'", $data["new"]["autoresponder_subject"]); $tpl->setVar('autoresponder_subject', $data["new"]["autoresponder_subject"]); From cd17083b9f5d09b686b0f08f5e549c5c313f8780 Mon Sep 17 00:00:00 2001 From: Till Brehm Date: Sat, 21 Oct 2023 09:02:54 +0000 Subject: [PATCH 256/621] Revert "Merge branch 'develop' into 'develop'" This reverts merge request !1812 --- install/sql/incremental/upd_dev_collection.sql | 1 - install/sql/ispconfig3.sql | 1 - interface/web/mail/form/mail_user.tform.php | 8 +------- .../mailuser/templates/mail_user_autoresponder_edit.htm | 4 ---- server/conf/sieve_filter.master | 8 -------- server/plugins-available/maildeliver_plugin.inc.php | 4 ---- 6 files changed, 1 insertion(+), 25 deletions(-) diff --git a/install/sql/incremental/upd_dev_collection.sql b/install/sql/incremental/upd_dev_collection.sql index 3a16aee496..e69de29bb2 100644 --- a/install/sql/incremental/upd_dev_collection.sql +++ b/install/sql/incremental/upd_dev_collection.sql @@ -1 +0,0 @@ -ALTER TABLE `mail_user` ADD `autoresponder_html` enum('n','y') NOT NULL DEFAULT 'n'; diff --git a/install/sql/ispconfig3.sql b/install/sql/ispconfig3.sql index fefa6ccb6d..75529ab82b 100644 --- a/install/sql/ispconfig3.sql +++ b/install/sql/ispconfig3.sql @@ -1076,7 +1076,6 @@ CREATE TABLE `mail_user` ( `sender_cc` varchar(255) NOT NULL default '', `homedir` varchar(255) NOT NULL default '', `autoresponder` enum('n','y') NOT NULL default 'n', - `autoresponder_html` enum('n','y') NOT NULL default 'n', `autoresponder_start_date` datetime NULL default NULL, `autoresponder_end_date` datetime NULL default NULL, `autoresponder_subject` varchar(255) NOT NULL default 'Out of office reply', diff --git a/interface/web/mail/form/mail_user.tform.php b/interface/web/mail/form/mail_user.tform.php index b008299c34..3dd334a29c 100644 --- a/interface/web/mail/form/mail_user.tform.php +++ b/interface/web/mail/form/mail_user.tform.php @@ -381,7 +381,7 @@ 'formtype' => 'TEXTAREA', 'filters' => array( 0 => array( 'event' => 'SAVE', - 'type' => 'TRIM') + 'type' => 'STRIPTAGS') ), 'default' => '', 'value' => '', @@ -394,12 +394,6 @@ 'default' => 'n', 'value' => array(1 => 'y', 0 => 'n') ), - 'autoresponder_html' => array ( - 'datatype' => 'VARCHAR', - 'formtype' => 'CHECKBOX', - 'default' => 'n', - 'value' => array(1 => 'y', 0 => 'n') - ), 'autoresponder_start_date' => array ( 'datatype' => 'DATETIME', 'formtype' => 'DATETIME', diff --git a/interface/web/mailuser/templates/mail_user_autoresponder_edit.htm b/interface/web/mailuser/templates/mail_user_autoresponder_edit.htm index 51c28351c7..898f285e53 100644 --- a/interface/web/mailuser/templates/mail_user_autoresponder_edit.htm +++ b/interface/web/mailuser/templates/mail_user_autoresponder_edit.htm @@ -10,10 +10,6 @@
-
- -
-
{tmpl_var name='autoresponder_start_date'}
diff --git a/server/conf/sieve_filter.master b/server/conf/sieve_filter.master index 67ea56ddf2..8719717da8 100644 --- a/server/conf/sieve_filter.master +++ b/server/conf/sieve_filter.master @@ -61,15 +61,7 @@ if currentdate :value "le" "iso8601" "" { vacation :days 1 :subject "" - - :mime "MIME-Version: 1.0 -Content-Type: text/html; charset=UTF-8 -Content-Transfer-Encoding: 7bit -"; - - ""; - } diff --git a/server/plugins-available/maildeliver_plugin.inc.php b/server/plugins-available/maildeliver_plugin.inc.php index 0d3ad974f4..15cf20c25f 100644 --- a/server/plugins-available/maildeliver_plugin.inc.php +++ b/server/plugins-available/maildeliver_plugin.inc.php @@ -89,7 +89,6 @@ function update($event_name, $data) { or $data["old"]["autoresponder_subject"] != $data["new"]["autoresponder_subject"] or $data["old"]["autoresponder_text"] != $data["new"]["autoresponder_text"] or $data["old"]["autoresponder"] != $data["new"]["autoresponder"] - or $data["old"]["autoresponder_html"] != $data["new"]["autoresponder_html"] or (isset($data["new"]["email"]) and $data["old"]["email"] != $data["new"]["email"]) or $data["old"]["autoresponder_start_date"] != $data["new"]["autoresponder_start_date"] or $data["old"]["autoresponder_end_date"] != $data["new"]["autoresponder_end_date"] @@ -155,9 +154,6 @@ function update($event_name, $data) { // Autoresponder $tpl->setVar('autoresponder', $data["new"]["autoresponder"]); - // Autoresponder_html - $tpl->setVar('autoresponder_html', $data["new"]["autoresponder_html"]); - // Autoresponder Subject $data["new"]["autoresponder_subject"] = str_replace("\"", "'", $data["new"]["autoresponder_subject"]); $tpl->setVar('autoresponder_subject', $data["new"]["autoresponder_subject"]); From fd6f638b1fbadc950a27d9227d88b1c789f5d0eb Mon Sep 17 00:00:00 2001 From: Thom Date: Sat, 21 Oct 2023 11:21:52 +0200 Subject: [PATCH 257/621] Remove default RBL entry for Spamhaus (#6518) --- install/tpl/server.ini.master | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/tpl/server.ini.master b/install/tpl/server.ini.master index a038e833be..f6d1b2d88c 100644 --- a/install/tpl/server.ini.master +++ b/install/tpl/server.ini.master @@ -58,7 +58,7 @@ mailbox_size_limit=0 message_size_limit=0 mailbox_soft_delete=0 mailbox_quota_stats=y -realtime_blackhole_list=zen.spamhaus.org +realtime_blackhole_list= overquota_notify_threshold=90 overquota_notify_admin=y overquota_notify_reseller=y From cf312f0c7146bee3d012b204108ae64dda979ce4 Mon Sep 17 00:00:00 2001 From: Thom Date: Sat, 21 Oct 2023 11:28:33 +0200 Subject: [PATCH 258/621] Add start and stop as valid systemd actions (#6330) --- server/lib/classes/system.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/lib/classes/system.inc.php b/server/lib/classes/system.inc.php index 6a8b418ffe..b2c6357d8f 100644 --- a/server/lib/classes/system.inc.php +++ b/server/lib/classes/system.inc.php @@ -2073,7 +2073,7 @@ function _getinitcommand($servicename, $action, $init_script_directory = '', $ch } */ - if(!in_array($action,array('restart','reload','force-reload'))) { + if(!in_array($action,array('start','stop','restart','reload','force-reload'))) { $app->log('Invalid init command action '.$action,LOGLEVEL_WARN); return false; } From c1f39c0c4035665b38e46872552359dff051da0d Mon Sep 17 00:00:00 2001 From: Thom Date: Sat, 21 Oct 2023 11:49:36 +0200 Subject: [PATCH 259/621] Do not allow the value `any` for also_notify (#6584) --- interface/lib/classes/validate_dns.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interface/lib/classes/validate_dns.inc.php b/interface/lib/classes/validate_dns.inc.php index 15d670d84a..1dca969629 100644 --- a/interface/lib/classes/validate_dns.inc.php +++ b/interface/lib/classes/validate_dns.inc.php @@ -292,7 +292,7 @@ function validate_ip($field_name, $field_value, $validator) { if($validator['allowempty'] != 'y') $validator['allowempty'] = 'n'; if($validator['allowempty'] == 'y' && $field_value == '') { //* Do nothing - } elseif ($field_value == 'any') { + } elseif ($field_value == 'any' && $field_name != "also_notify") { //* Do nothing } else { //* Check if its a IPv4 or IPv6 address/range From b9ece50999f740c0ae72dd19f8459507ecc91eac Mon Sep 17 00:00:00 2001 From: Johannes Koschier Date: Tue, 24 Oct 2023 09:29:48 +0000 Subject: [PATCH 260/621] 6595_php_deprecated_warning_letsencrypt --- server/lib/classes/letsencrypt.inc.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/lib/classes/letsencrypt.inc.php b/server/lib/classes/letsencrypt.inc.php index 6a1d2d02ac..fe6766e600 100644 --- a/server/lib/classes/letsencrypt.inc.php +++ b/server/lib/classes/letsencrypt.inc.php @@ -44,7 +44,7 @@ public function __construct(){ } public function get_acme_script() { - $acme = explode("\n", shell_exec('which acme.sh /usr/local/ispconfig/server/scripts/acme.sh /root/.acme.sh/acme.sh 2> /dev/null')); + $acme = explode("\n", shell_exec('which acme.sh /usr/local/ispconfig/server/scripts/acme.sh /root/.acme.sh/acme.sh 2> /dev/null') ?? ''); $acme = reset($acme); if(is_executable($acme)) { return $acme; @@ -464,7 +464,7 @@ public function request_certificates($data, $server_type = 'apache') { $letsencrypt_cmd = $this->get_certbot_script() . " certificates " . $cli_domain_arg; - $output = explode("\n", shell_exec($letsencrypt_cmd . " 2>/dev/null | grep -v '^\$'")); + $output = explode("\n", shell_exec($letsencrypt_cmd . " 2>/dev/null | grep -v '^\$'") ?? ''); $le_path = ''; $skip_to_next = true; $matches = null; From 1d027303f4c2aa546a1dc31e005270647c974a2e Mon Sep 17 00:00:00 2001 From: Till Date: Thu, 26 Oct 2023 12:06:05 +0200 Subject: [PATCH 261/621] Fixes #6596 improve language file editor input validation --- interface/web/admin/language_edit.php | 1 + 1 file changed, 1 insertion(+) diff --git a/interface/web/admin/language_edit.php b/interface/web/admin/language_edit.php index 39baec55e3..681f39acf7 100644 --- a/interface/web/admin/language_edit.php +++ b/interface/web/admin/language_edit.php @@ -64,6 +64,7 @@ $val = stripslashes($val); $val = preg_replace('/(^|[^\\\\])((\\\\\\\\)*)"/', '$1$2\\"', $val); $val = str_replace('$', '', $val); + if(!preg_match("/^[a-z0-9_]+$/", $key)) die('Invalid language file key.'); $file_content .= '$wb['."'$key'".'] = "'.$val.'";'."\n"; $msg = 'File saved.'; } From 4593d5eb1ac0c6b7f89e1c3a5a119cd299386b3a Mon Sep 17 00:00:00 2001 From: Thom Date: Fri, 27 Oct 2023 16:54:37 +0200 Subject: [PATCH 262/621] Fix typo (#6597) --- interface/lib/classes/tform_base.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interface/lib/classes/tform_base.inc.php b/interface/lib/classes/tform_base.inc.php index 25c64409e8..7b031dd345 100644 --- a/interface/lib/classes/tform_base.inc.php +++ b/interface/lib/classes/tform_base.inc.php @@ -1187,7 +1187,7 @@ function validateField($field_name, $field_value, $validators) { if (count($sql_v6_explode) < count($explode_field_value) && isset($sql_v6['ip_address'])) { $errmsg = $validator['errmsg']; if(isset($this->wordbook[$errmsg])) { - $this->errorMessage .= $this->wordbook[$errmsg].$sql_v6[ip_address]."
\r\n"; + $this->errorMessage .= $this->wordbook[$errmsg].$sql_v6['ip_address']."
\r\n"; } else { $this->errorMessage .= $errmsg."
\r\n"; } From c830ae5eba9688bc9b80e2d4167063c1fb58f304 Mon Sep 17 00:00:00 2001 From: Till Brehm Date: Thu, 2 Nov 2023 15:17:27 +0000 Subject: [PATCH 263/621] Fixes issue #6599 --- interface/web/mail/ajax_get_json.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interface/web/mail/ajax_get_json.php b/interface/web/mail/ajax_get_json.php index c40c3bf401..68d935abb7 100644 --- a/interface/web/mail/ajax_get_json.php +++ b/interface/web/mail/ajax_get_json.php @@ -51,7 +51,7 @@ unset($rec); $mail_config = $app->getconf->get_server_config($server_id, 'mail'); $dkim_strength = $app->functions->intval($mail_config['dkim_strength']); - if ($dkim_strength=='') $dkim_strength = 2048; + if ($dkim_strength == '' || $dkim_strength == 0 ) $dkim_strength = 2048; $rnd_val = $dkim_strength * 10; $app->system->exec_safe('openssl rand -out ../../temp/random-data.bin '.$rnd_val.' 2> /dev/null'); From e3057ac54bb4c995d2a3659d385f04abcc47153c Mon Sep 17 00:00:00 2001 From: Johannes Koschier Date: Tue, 7 Nov 2023 19:00:09 +0000 Subject: [PATCH 264/621] 6542_copy_to_clipboard_with_css_class --- .../web/mail/templates/mail_forward_list.htm | 2 +- .../web/mail/templates/mail_user_list.htm | 2 +- .../default/assets/javascripts/ispconfig.js | 27 +++++++++++++++++++ .../default/assets/stylesheets/ispconfig.css | 17 ++++++++++++ 4 files changed, 46 insertions(+), 2 deletions(-) diff --git a/interface/web/mail/templates/mail_forward_list.htm b/interface/web/mail/templates/mail_forward_list.htm index c4d7e1f60a..6afcf52dfb 100644 --- a/interface/web/mail/templates/mail_forward_list.htm +++ b/interface/web/mail/templates/mail_forward_list.htm @@ -50,7 +50,7 @@

{tmpl_var name="active"} - {tmpl_var name="source"} + {tmpl_var name="source"} {tmpl_var name="destination"} diff --git a/interface/web/mail/templates/mail_user_list.htm b/interface/web/mail/templates/mail_user_list.htm index 12659260ac..ca14cf9fa3 100644 --- a/interface/web/mail/templates/mail_user_list.htm +++ b/interface/web/mail/templates/mail_user_list.htm @@ -61,7 +61,7 @@

- {tmpl_var name="email"} + {tmpl_var name="email"} {tmpl_var name="login"} {tmpl_var name="name"} {tmpl_var name="autoresponder"} diff --git a/interface/web/themes/default/assets/javascripts/ispconfig.js b/interface/web/themes/default/assets/javascripts/ispconfig.js index d909f38183..8df11a0c0c 100644 --- a/interface/web/themes/default/assets/javascripts/ispconfig.js +++ b/interface/web/themes/default/assets/javascripts/ispconfig.js @@ -813,4 +813,31 @@ $(document).ready(function() { } return iCaretPos; }; + + //copy to clipboard + $(document).on('click', '.copy-to-clipboard', function() { + var $copyElement = $(this).children(); + var temp = $(""); + $("body").append(temp); + temp.val($copyElement.text()).select(); + //execCommand is Deprecated - but there is no alternative (2023) + document.execCommand("copy"); + temp.remove(); + } ); + + //display copy-to-clipboard icon + let lastCopyToClipboardIcon; + $(document).on("mouseenter", '.copy-to-clipboard', function() { + $(lastCopyToClipboardIcon).removeClass("copy-to-clipboard-icon"); //Clean up old icons - sometimes mouse is too fast to trigger mouseleave + $(this).addClass("copy-to-clipboard-icon"); + lastCopyToClipboardIcon = $(this); + //console.log("Mouseenter e-tooltip"); + }); + + //hide copy-to-clipboard icon + $(document).on("mouseleave", '.copy-to-clipboard', function() { + $(this).removeClass("copy-to-clipboard-icon"); + //console.log("Mouseleave e-tooltip"); + }); + }); diff --git a/interface/web/themes/default/assets/stylesheets/ispconfig.css b/interface/web/themes/default/assets/stylesheets/ispconfig.css index 32d063936c..b27fe51093 100644 --- a/interface/web/themes/default/assets/stylesheets/ispconfig.css +++ b/interface/web/themes/default/assets/stylesheets/ispconfig.css @@ -838,3 +838,20 @@ max-width: 1260px; } #apache_directives, #nginx_directives, #proxy_directives { font-family: Consolas, "Courier New", Courier, monospace; } + .copy-to-clipboard-icon::after { + content: "\f0ea"; + font-family: FontAwesome; + font-size:0.6em; + color:#6396b5; + vertical-align:top; + float:right; + cursor: copy; + position: absolute; + margin-left: 5px; + } + .copy-to-clipboard-icon-helper { + display: inline-block; + max-width: 90%; + text-overflow: ellipsis ; + overflow-x: hidden; + } \ No newline at end of file From 6d8c2dbf37b5c313b1dc8cc15bb158c7b617137b Mon Sep 17 00:00:00 2001 From: Johannes Koschier Date: Fri, 17 Nov 2023 08:24:47 +0000 Subject: [PATCH 265/621] 6606_de_mail_user_german_lang_fix --- interface/web/mail/lib/lang/de_mail_user.lng | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interface/web/mail/lib/lang/de_mail_user.lng b/interface/web/mail/lib/lang/de_mail_user.lng index db8c85a2da..0fc31e8446 100644 --- a/interface/web/mail/lib/lang/de_mail_user.lng +++ b/interface/web/mail/lib/lang/de_mail_user.lng @@ -68,7 +68,7 @@ $wb['monthly_backup_txt'] = 'monatlich'; $wb['cc_note_txt'] = '(Mehrere E-Mail-Adressen mit Kommas trennen)'; $wb['sender_cc_txt'] = 'Kopie ausgehender Emails senden an (BCC)'; $wb['sender_cc_error_isemail'] = '-Kopie ausgehender Emails senden an- Feld enthält keine gültige Emailadresse'; -$wb['sender_cc_note_txt'] = '(Mehrere E-Mail-Adressen mit Kommas trennen)'; +$wb['sender_cc_note_txt'] = '(Nur eine E-Mail-Adresse)'; $wb['password_click_to_set_txt'] = 'Passwort erzeugen'; $wb['purge_trash_days_txt'] = 'Papierkorb automatisch nach X Tagen leeren'; $wb['tooltip_purge_trash_days_txt'] = '0 = deaktiviert'; From fc96c64464d2125f1518e0a80bb2e8ed5a8300f8 Mon Sep 17 00:00:00 2001 From: Michael Seevogel Date: Sun, 19 Nov 2023 20:47:05 +0100 Subject: [PATCH 266/621] Add current PHP enhancements (WiP) --- .../sql/incremental/upd_dev_collection.sql | 1 + install/sql/ispconfig3.sql | 1 + interface/web/admin/form/server_php.tform.php | 24 +++++++ .../web/admin/lib/lang/ar_server_php.lng | 2 + .../web/admin/lib/lang/bg_server_php.lng | 2 + .../web/admin/lib/lang/br_server_php.lng | 2 + .../web/admin/lib/lang/ca_server_php.lng | 2 + .../web/admin/lib/lang/cn_server_php.lng | 5 ++ .../web/admin/lib/lang/cz_server_php.lng | 2 + .../web/admin/lib/lang/de_server_php.lng | 2 + .../web/admin/lib/lang/dk_server_php.lng | 2 + .../web/admin/lib/lang/el_server_php.lng | 2 + .../web/admin/lib/lang/en_server_php.lng | 2 + .../web/admin/lib/lang/es_server_php.lng | 2 + .../web/admin/lib/lang/fi_server_php.lng | 2 + .../web/admin/lib/lang/fr_server_php.lng | 2 + .../web/admin/lib/lang/hr_server_php.lng | 2 + .../web/admin/lib/lang/hu_server_php.lng | 2 + .../web/admin/lib/lang/id_server_php.lng | 2 + .../web/admin/lib/lang/it_server_php.lng | 2 + .../web/admin/lib/lang/ja_server_php.lng | 2 + .../web/admin/lib/lang/nl_server_php.lng | 2 + .../web/admin/lib/lang/pl_server_php.lng | 2 + .../web/admin/lib/lang/pt_server_php.lng | 2 + .../web/admin/lib/lang/ro_server_php.lng | 2 + .../web/admin/lib/lang/ru_server_php.lng | 2 + .../web/admin/lib/lang/se_server_php.lng | 2 + .../web/admin/lib/lang/sk_server_php.lng | 2 + .../web/admin/lib/lang/tr_server_php.lng | 2 + .../admin/templates/server_php_cli_edit.htm | 10 +++ interface/web/sites/lib/lang/de_cron.lng | 1 + interface/web/sites/lib/lang/en_cron.lng | 3 +- interface/web/sites/templates/cron_edit.htm | 5 +- interface/web/sites/web_vhost_domain_edit.php | 19 ++++++ server/conf/bash.bashrc.master | 8 +++ server/plugins-available/cron_plugin.inc.php | 23 ++++++- .../shelluser_base_plugin.inc.php | 66 ++++++++++++++++++- .../shelluser_jailkit_plugin.inc.php | 14 ++-- 38 files changed, 218 insertions(+), 12 deletions(-) create mode 100644 interface/web/admin/templates/server_php_cli_edit.htm diff --git a/install/sql/incremental/upd_dev_collection.sql b/install/sql/incremental/upd_dev_collection.sql index e69de29bb2..1a6f847d65 100644 --- a/install/sql/incremental/upd_dev_collection.sql +++ b/install/sql/incremental/upd_dev_collection.sql @@ -0,0 +1 @@ +ALTER TABLE `server_php` ADD `php_cli_binary` varchar(255) DEFAULT NULL AFTER `php_fpm_socket_dir`; diff --git a/install/sql/ispconfig3.sql b/install/sql/ispconfig3.sql index 75529ab82b..e9aa9aaeed 100644 --- a/install/sql/ispconfig3.sql +++ b/install/sql/ispconfig3.sql @@ -1460,6 +1460,7 @@ CREATE TABLE `server_php` ( `php_fpm_ini_dir` varchar(255) DEFAULT NULL, `php_fpm_pool_dir` varchar(255) DEFAULT NULL, `php_fpm_socket_dir` varchar(255) DEFAULT NULL, + `php_cli_binary` varchar(255) DEFAULT NULL, `active` enum('n','y') NOT NULL DEFAULT 'y', `sortprio` int(20) NOT NULL DEFAULT 100, PRIMARY KEY (`server_php_id`) diff --git a/interface/web/admin/form/server_php.tform.php b/interface/web/admin/form/server_php.tform.php index 67f22cbeb4..a77a719f20 100644 --- a/interface/web/admin/form/server_php.tform.php +++ b/interface/web/admin/form/server_php.tform.php @@ -248,6 +248,30 @@ //################################# ) ); +$form["tabs"]['php_cli'] = array ( +'title' => "PHP-CLI settings", +'width' => 80, +'template' => "templates/server_php_cli_edit.htm", +'fields' => array( + //################################# + // Begin Datatable fields + //################################# + 'php_cli_binary' => array( + 'datatype' => 'VARCHAR', + 'formtype' => 'TEXT', + 'filters' => array( + 0 => array( 'event' => 'SAVE', + 'type' => 'STRIPTAGS'), + 1 => array( 'event' => 'SAVE', + 'type' => 'STRIPNL') + ), + 'default' => '', + 'value' => '', + 'width' => '40', + 'maxlength' => '255' + ), +) +); $form["tabs"]['php_sort'] = array ( 'title' => "PHP Sort Priority", 'width' => 80, diff --git a/interface/web/admin/lib/lang/ar_server_php.lng b/interface/web/admin/lib/lang/ar_server_php.lng index 4d71bb50b7..89b357cdbc 100644 --- a/interface/web/admin/lib/lang/ar_server_php.lng +++ b/interface/web/admin/lib/lang/ar_server_php.lng @@ -20,4 +20,6 @@ $wb['php_name_in_use_error'] = 'The name can not be changed.'; $wb['PHP Sort Priority'] = 'Priority'; $wb['sortprio_txt'] = 'Priority'; $wb['sortprio_long_txt'] = 'Priority of PHP version in the PHP version select box
Default PHP has prio 0 if enabled
Lower value is higher priority'; +$wb['PHP-CLI settings'] = 'PHP-CLI settings'; +$wb['php_cli_binary_txt'] = 'Path to the PHP CLI binary'; ?> diff --git a/interface/web/admin/lib/lang/bg_server_php.lng b/interface/web/admin/lib/lang/bg_server_php.lng index 4d71bb50b7..89b357cdbc 100644 --- a/interface/web/admin/lib/lang/bg_server_php.lng +++ b/interface/web/admin/lib/lang/bg_server_php.lng @@ -20,4 +20,6 @@ $wb['php_name_in_use_error'] = 'The name can not be changed.'; $wb['PHP Sort Priority'] = 'Priority'; $wb['sortprio_txt'] = 'Priority'; $wb['sortprio_long_txt'] = 'Priority of PHP version in the PHP version select box
Default PHP has prio 0 if enabled
Lower value is higher priority'; +$wb['PHP-CLI settings'] = 'PHP-CLI settings'; +$wb['php_cli_binary_txt'] = 'Path to the PHP CLI binary'; ?> diff --git a/interface/web/admin/lib/lang/br_server_php.lng b/interface/web/admin/lib/lang/br_server_php.lng index 791db7e3ec..cb1b93acc3 100644 --- a/interface/web/admin/lib/lang/br_server_php.lng +++ b/interface/web/admin/lib/lang/br_server_php.lng @@ -20,4 +20,6 @@ $wb['php_name_in_use_error'] = 'O nome não pode ser modificado.'; $wb['PHP Sort Priority'] = 'Priority'; $wb['sortprio_txt'] = 'Priority'; $wb['sortprio_long_txt'] = 'Priority of PHP version in the PHP version select box
Default PHP has prio 0 if enabled
Lower value is higher priority'; +$wb['PHP-CLI settings'] = 'PHP-CLI settings'; +$wb['php_cli_binary_txt'] = 'Path to the PHP CLI binary'; ?> diff --git a/interface/web/admin/lib/lang/ca_server_php.lng b/interface/web/admin/lib/lang/ca_server_php.lng index 4d71bb50b7..89b357cdbc 100644 --- a/interface/web/admin/lib/lang/ca_server_php.lng +++ b/interface/web/admin/lib/lang/ca_server_php.lng @@ -20,4 +20,6 @@ $wb['php_name_in_use_error'] = 'The name can not be changed.'; $wb['PHP Sort Priority'] = 'Priority'; $wb['sortprio_txt'] = 'Priority'; $wb['sortprio_long_txt'] = 'Priority of PHP version in the PHP version select box
Default PHP has prio 0 if enabled
Lower value is higher priority'; +$wb['PHP-CLI settings'] = 'PHP-CLI settings'; +$wb['php_cli_binary_txt'] = 'Path to the PHP CLI binary'; ?> diff --git a/interface/web/admin/lib/lang/cn_server_php.lng b/interface/web/admin/lib/lang/cn_server_php.lng index 80571fb194..102bcc1fbf 100644 --- a/interface/web/admin/lib/lang/cn_server_php.lng +++ b/interface/web/admin/lib/lang/cn_server_php.lng @@ -17,4 +17,9 @@ $wb['php_fpm_socket_dir_txt'] = 'PHP-FPM套接字目录'; $wb['active_txt'] = '激活'; $wb['php_in_use_error'] = '此PHP版本正在使用中。'; $wb['php_name_in_use_error'] = '名称无法更改。'; +$wb['PHP Sort Priority'] = 'Priority'; +$wb['sortprio_txt'] = 'Priority'; +$wb['sortprio_long_txt'] = 'Priority of PHP version in the PHP version select box
Default PHP has prio 0 if enabled
Lower value is higher priority'; +$wb['PHP-CLI settings'] = 'PHP-CLI settings'; +$wb['php_cli_binary_txt'] = 'Path to the PHP CLI binary'; ?> diff --git a/interface/web/admin/lib/lang/cz_server_php.lng b/interface/web/admin/lib/lang/cz_server_php.lng index 6490928429..eb16414a31 100644 --- a/interface/web/admin/lib/lang/cz_server_php.lng +++ b/interface/web/admin/lib/lang/cz_server_php.lng @@ -20,4 +20,6 @@ $wb['php_name_in_use_error'] = 'The name can not be changed.'; $wb['PHP Sort Priority'] = 'Priority'; $wb['sortprio_txt'] = 'Priority'; $wb['sortprio_long_txt'] = 'Priority of PHP version in the PHP version select box
Default PHP has prio 0 if enabled
Lower value is higher priority'; +$wb['PHP-CLI settings'] = 'PHP-CLI settings'; +$wb['php_cli_binary_txt'] = 'Path to the PHP CLI binary'; ?> diff --git a/interface/web/admin/lib/lang/de_server_php.lng b/interface/web/admin/lib/lang/de_server_php.lng index 4100957b9d..a63e90d80c 100644 --- a/interface/web/admin/lib/lang/de_server_php.lng +++ b/interface/web/admin/lib/lang/de_server_php.lng @@ -20,4 +20,6 @@ $wb['php_name_in_use_error'] = 'Der Name kann nicht geändert werden.'; $wb['PHP Sort Priority'] = 'Priorität'; $wb['sortprio_txt'] = 'Sorting Priority'; $wb['sortprio_long_txt'] = 'Priority of PHP Version in the PHP version select box
Default PHP has prio 0 if enabled
Lower value is higher priority'; +$wb['PHP-CLI settings'] = 'PHP-CLI-Einstellungen'; +$wb['php_cli_binary_txt'] = 'Pfad zur PHP-CLI Binary'; ?> diff --git a/interface/web/admin/lib/lang/dk_server_php.lng b/interface/web/admin/lib/lang/dk_server_php.lng index e9b42a5133..b43202ae41 100644 --- a/interface/web/admin/lib/lang/dk_server_php.lng +++ b/interface/web/admin/lib/lang/dk_server_php.lng @@ -20,4 +20,6 @@ $wb['php_name_in_use_error'] = 'The name can not be changed.'; $wb['PHP Sort Priority'] = 'Priority'; $wb['sortprio_txt'] = 'Priority'; $wb['sortprio_long_txt'] = 'Priority of PHP version in the PHP version select box
Default PHP has prio 0 if enabled
Lower value is higher priority'; +$wb['PHP-CLI settings'] = 'PHP-CLI settings'; +$wb['php_cli_binary_txt'] = 'Path to the PHP CLI binary'; ?> diff --git a/interface/web/admin/lib/lang/el_server_php.lng b/interface/web/admin/lib/lang/el_server_php.lng index 4d71bb50b7..89b357cdbc 100644 --- a/interface/web/admin/lib/lang/el_server_php.lng +++ b/interface/web/admin/lib/lang/el_server_php.lng @@ -20,4 +20,6 @@ $wb['php_name_in_use_error'] = 'The name can not be changed.'; $wb['PHP Sort Priority'] = 'Priority'; $wb['sortprio_txt'] = 'Priority'; $wb['sortprio_long_txt'] = 'Priority of PHP version in the PHP version select box
Default PHP has prio 0 if enabled
Lower value is higher priority'; +$wb['PHP-CLI settings'] = 'PHP-CLI settings'; +$wb['php_cli_binary_txt'] = 'Path to the PHP CLI binary'; ?> diff --git a/interface/web/admin/lib/lang/en_server_php.lng b/interface/web/admin/lib/lang/en_server_php.lng index 4d71bb50b7..89b357cdbc 100644 --- a/interface/web/admin/lib/lang/en_server_php.lng +++ b/interface/web/admin/lib/lang/en_server_php.lng @@ -20,4 +20,6 @@ $wb['php_name_in_use_error'] = 'The name can not be changed.'; $wb['PHP Sort Priority'] = 'Priority'; $wb['sortprio_txt'] = 'Priority'; $wb['sortprio_long_txt'] = 'Priority of PHP version in the PHP version select box
Default PHP has prio 0 if enabled
Lower value is higher priority'; +$wb['PHP-CLI settings'] = 'PHP-CLI settings'; +$wb['php_cli_binary_txt'] = 'Path to the PHP CLI binary'; ?> diff --git a/interface/web/admin/lib/lang/es_server_php.lng b/interface/web/admin/lib/lang/es_server_php.lng index e75aa0e4e4..ff81b3ae90 100644 --- a/interface/web/admin/lib/lang/es_server_php.lng +++ b/interface/web/admin/lib/lang/es_server_php.lng @@ -20,4 +20,6 @@ $wb['php_name_in_use_error'] = 'The name can not be changed.'; $wb['PHP Sort Priority'] = 'Priority'; $wb['sortprio_txt'] = 'Priority'; $wb['sortprio_long_txt'] = 'Priority of PHP version in the PHP version select box
Default PHP has prio 0 if enabled
Lower value is higher priority'; +$wb['PHP-CLI settings'] = 'PHP-CLI settings'; +$wb['php_cli_binary_txt'] = 'Path to the PHP CLI binary'; ?> diff --git a/interface/web/admin/lib/lang/fi_server_php.lng b/interface/web/admin/lib/lang/fi_server_php.lng index 4d71bb50b7..89b357cdbc 100644 --- a/interface/web/admin/lib/lang/fi_server_php.lng +++ b/interface/web/admin/lib/lang/fi_server_php.lng @@ -20,4 +20,6 @@ $wb['php_name_in_use_error'] = 'The name can not be changed.'; $wb['PHP Sort Priority'] = 'Priority'; $wb['sortprio_txt'] = 'Priority'; $wb['sortprio_long_txt'] = 'Priority of PHP version in the PHP version select box
Default PHP has prio 0 if enabled
Lower value is higher priority'; +$wb['PHP-CLI settings'] = 'PHP-CLI settings'; +$wb['php_cli_binary_txt'] = 'Path to the PHP CLI binary'; ?> diff --git a/interface/web/admin/lib/lang/fr_server_php.lng b/interface/web/admin/lib/lang/fr_server_php.lng index 4d71bb50b7..89b357cdbc 100644 --- a/interface/web/admin/lib/lang/fr_server_php.lng +++ b/interface/web/admin/lib/lang/fr_server_php.lng @@ -20,4 +20,6 @@ $wb['php_name_in_use_error'] = 'The name can not be changed.'; $wb['PHP Sort Priority'] = 'Priority'; $wb['sortprio_txt'] = 'Priority'; $wb['sortprio_long_txt'] = 'Priority of PHP version in the PHP version select box
Default PHP has prio 0 if enabled
Lower value is higher priority'; +$wb['PHP-CLI settings'] = 'PHP-CLI settings'; +$wb['php_cli_binary_txt'] = 'Path to the PHP CLI binary'; ?> diff --git a/interface/web/admin/lib/lang/hr_server_php.lng b/interface/web/admin/lib/lang/hr_server_php.lng index 9db79d4f9b..57c44ae53c 100644 --- a/interface/web/admin/lib/lang/hr_server_php.lng +++ b/interface/web/admin/lib/lang/hr_server_php.lng @@ -20,4 +20,6 @@ $wb['php_name_in_use_error'] = 'The name can not be changed.'; $wb['PHP Sort Priority'] = 'Priority'; $wb['sortprio_txt'] = 'Priority'; $wb['sortprio_long_txt'] = 'Priority of PHP version in the PHP version select box
Default PHP has prio 0 if enabled
Lower value is higher priority'; +$wb['PHP-CLI settings'] = 'PHP-CLI settings'; +$wb['php_cli_binary_txt'] = 'Path to the PHP CLI binary'; ?> diff --git a/interface/web/admin/lib/lang/hu_server_php.lng b/interface/web/admin/lib/lang/hu_server_php.lng index 4d71bb50b7..89b357cdbc 100644 --- a/interface/web/admin/lib/lang/hu_server_php.lng +++ b/interface/web/admin/lib/lang/hu_server_php.lng @@ -20,4 +20,6 @@ $wb['php_name_in_use_error'] = 'The name can not be changed.'; $wb['PHP Sort Priority'] = 'Priority'; $wb['sortprio_txt'] = 'Priority'; $wb['sortprio_long_txt'] = 'Priority of PHP version in the PHP version select box
Default PHP has prio 0 if enabled
Lower value is higher priority'; +$wb['PHP-CLI settings'] = 'PHP-CLI settings'; +$wb['php_cli_binary_txt'] = 'Path to the PHP CLI binary'; ?> diff --git a/interface/web/admin/lib/lang/id_server_php.lng b/interface/web/admin/lib/lang/id_server_php.lng index 4d71bb50b7..89b357cdbc 100644 --- a/interface/web/admin/lib/lang/id_server_php.lng +++ b/interface/web/admin/lib/lang/id_server_php.lng @@ -20,4 +20,6 @@ $wb['php_name_in_use_error'] = 'The name can not be changed.'; $wb['PHP Sort Priority'] = 'Priority'; $wb['sortprio_txt'] = 'Priority'; $wb['sortprio_long_txt'] = 'Priority of PHP version in the PHP version select box
Default PHP has prio 0 if enabled
Lower value is higher priority'; +$wb['PHP-CLI settings'] = 'PHP-CLI settings'; +$wb['php_cli_binary_txt'] = 'Path to the PHP CLI binary'; ?> diff --git a/interface/web/admin/lib/lang/it_server_php.lng b/interface/web/admin/lib/lang/it_server_php.lng index d4feb7cb0c..76c97e8adc 100644 --- a/interface/web/admin/lib/lang/it_server_php.lng +++ b/interface/web/admin/lib/lang/it_server_php.lng @@ -20,4 +20,6 @@ $wb['php_name_in_use_error'] = 'Il nome non può essere cambiato.'; $wb['PHP Sort Priority'] = 'Priority'; $wb['sortprio_txt'] = 'Priority'; $wb['sortprio_long_txt'] = 'Priority of PHP version in the PHP version select box
Default PHP has prio 0 if enabled
Lower value is higher priority'; +$wb['PHP-CLI settings'] = 'PHP-CLI settings'; +$wb['php_cli_binary_txt'] = 'Path to the PHP CLI binary'; ?> diff --git a/interface/web/admin/lib/lang/ja_server_php.lng b/interface/web/admin/lib/lang/ja_server_php.lng index 4d71bb50b7..89b357cdbc 100644 --- a/interface/web/admin/lib/lang/ja_server_php.lng +++ b/interface/web/admin/lib/lang/ja_server_php.lng @@ -20,4 +20,6 @@ $wb['php_name_in_use_error'] = 'The name can not be changed.'; $wb['PHP Sort Priority'] = 'Priority'; $wb['sortprio_txt'] = 'Priority'; $wb['sortprio_long_txt'] = 'Priority of PHP version in the PHP version select box
Default PHP has prio 0 if enabled
Lower value is higher priority'; +$wb['PHP-CLI settings'] = 'PHP-CLI settings'; +$wb['php_cli_binary_txt'] = 'Path to the PHP CLI binary'; ?> diff --git a/interface/web/admin/lib/lang/nl_server_php.lng b/interface/web/admin/lib/lang/nl_server_php.lng index 4d71bb50b7..89b357cdbc 100644 --- a/interface/web/admin/lib/lang/nl_server_php.lng +++ b/interface/web/admin/lib/lang/nl_server_php.lng @@ -20,4 +20,6 @@ $wb['php_name_in_use_error'] = 'The name can not be changed.'; $wb['PHP Sort Priority'] = 'Priority'; $wb['sortprio_txt'] = 'Priority'; $wb['sortprio_long_txt'] = 'Priority of PHP version in the PHP version select box
Default PHP has prio 0 if enabled
Lower value is higher priority'; +$wb['PHP-CLI settings'] = 'PHP-CLI settings'; +$wb['php_cli_binary_txt'] = 'Path to the PHP CLI binary'; ?> diff --git a/interface/web/admin/lib/lang/pl_server_php.lng b/interface/web/admin/lib/lang/pl_server_php.lng index d86e2cf01f..c43dd727cb 100644 --- a/interface/web/admin/lib/lang/pl_server_php.lng +++ b/interface/web/admin/lib/lang/pl_server_php.lng @@ -20,4 +20,6 @@ $wb['php_name_in_use_error'] = 'The name can not be changed.'; $wb['PHP Sort Priority'] = 'Priority'; $wb['sortprio_txt'] = 'Priority'; $wb['sortprio_long_txt'] = 'Priority of PHP version in the PHP version select box
Default PHP has prio 0 if enabled
Lower value is higher priority'; +$wb['PHP-CLI settings'] = 'PHP-CLI settings'; +$wb['php_cli_binary_txt'] = 'Path to the PHP CLI binary'; ?> diff --git a/interface/web/admin/lib/lang/pt_server_php.lng b/interface/web/admin/lib/lang/pt_server_php.lng index 4d71bb50b7..89b357cdbc 100644 --- a/interface/web/admin/lib/lang/pt_server_php.lng +++ b/interface/web/admin/lib/lang/pt_server_php.lng @@ -20,4 +20,6 @@ $wb['php_name_in_use_error'] = 'The name can not be changed.'; $wb['PHP Sort Priority'] = 'Priority'; $wb['sortprio_txt'] = 'Priority'; $wb['sortprio_long_txt'] = 'Priority of PHP version in the PHP version select box
Default PHP has prio 0 if enabled
Lower value is higher priority'; +$wb['PHP-CLI settings'] = 'PHP-CLI settings'; +$wb['php_cli_binary_txt'] = 'Path to the PHP CLI binary'; ?> diff --git a/interface/web/admin/lib/lang/ro_server_php.lng b/interface/web/admin/lib/lang/ro_server_php.lng index 4d71bb50b7..89b357cdbc 100644 --- a/interface/web/admin/lib/lang/ro_server_php.lng +++ b/interface/web/admin/lib/lang/ro_server_php.lng @@ -20,4 +20,6 @@ $wb['php_name_in_use_error'] = 'The name can not be changed.'; $wb['PHP Sort Priority'] = 'Priority'; $wb['sortprio_txt'] = 'Priority'; $wb['sortprio_long_txt'] = 'Priority of PHP version in the PHP version select box
Default PHP has prio 0 if enabled
Lower value is higher priority'; +$wb['PHP-CLI settings'] = 'PHP-CLI settings'; +$wb['php_cli_binary_txt'] = 'Path to the PHP CLI binary'; ?> diff --git a/interface/web/admin/lib/lang/ru_server_php.lng b/interface/web/admin/lib/lang/ru_server_php.lng index ca1a8147a3..6644018b3a 100644 --- a/interface/web/admin/lib/lang/ru_server_php.lng +++ b/interface/web/admin/lib/lang/ru_server_php.lng @@ -20,4 +20,6 @@ $wb['php_name_in_use_error'] = 'The name can not be changed.'; $wb['PHP Sort Priority'] = 'Priority'; $wb['sortprio_txt'] = 'Priority'; $wb['sortprio_long_txt'] = 'Priority of PHP version in the PHP version select box
Default PHP has prio 0 if enabled
Lower value is higher priority'; +$wb['PHP-CLI settings'] = 'PHP-CLI settings'; +$wb['php_cli_binary_txt'] = 'Path to the PHP CLI binary'; ?> diff --git a/interface/web/admin/lib/lang/se_server_php.lng b/interface/web/admin/lib/lang/se_server_php.lng index 4d71bb50b7..89b357cdbc 100644 --- a/interface/web/admin/lib/lang/se_server_php.lng +++ b/interface/web/admin/lib/lang/se_server_php.lng @@ -20,4 +20,6 @@ $wb['php_name_in_use_error'] = 'The name can not be changed.'; $wb['PHP Sort Priority'] = 'Priority'; $wb['sortprio_txt'] = 'Priority'; $wb['sortprio_long_txt'] = 'Priority of PHP version in the PHP version select box
Default PHP has prio 0 if enabled
Lower value is higher priority'; +$wb['PHP-CLI settings'] = 'PHP-CLI settings'; +$wb['php_cli_binary_txt'] = 'Path to the PHP CLI binary'; ?> diff --git a/interface/web/admin/lib/lang/sk_server_php.lng b/interface/web/admin/lib/lang/sk_server_php.lng index 4d71bb50b7..89b357cdbc 100644 --- a/interface/web/admin/lib/lang/sk_server_php.lng +++ b/interface/web/admin/lib/lang/sk_server_php.lng @@ -20,4 +20,6 @@ $wb['php_name_in_use_error'] = 'The name can not be changed.'; $wb['PHP Sort Priority'] = 'Priority'; $wb['sortprio_txt'] = 'Priority'; $wb['sortprio_long_txt'] = 'Priority of PHP version in the PHP version select box
Default PHP has prio 0 if enabled
Lower value is higher priority'; +$wb['PHP-CLI settings'] = 'PHP-CLI settings'; +$wb['php_cli_binary_txt'] = 'Path to the PHP CLI binary'; ?> diff --git a/interface/web/admin/lib/lang/tr_server_php.lng b/interface/web/admin/lib/lang/tr_server_php.lng index 914d28f167..447b3ab20b 100644 --- a/interface/web/admin/lib/lang/tr_server_php.lng +++ b/interface/web/admin/lib/lang/tr_server_php.lng @@ -20,4 +20,6 @@ $wb['php_name_in_use_error'] = 'The name can not be changed.'; $wb['PHP Sort Priority'] = 'Priority'; $wb['sortprio_txt'] = 'Priority'; $wb['sortprio_long_txt'] = 'Priority of PHP version in the PHP version select box
Default PHP has prio 0 if enabled
Lower value is higher priority'; +$wb['PHP-CLI settings'] = 'PHP-CLI settings'; +$wb['php_cli_binary_txt'] = 'Path to the PHP CLI binary'; ?> diff --git a/interface/web/admin/templates/server_php_cli_edit.htm b/interface/web/admin/templates/server_php_cli_edit.htm new file mode 100644 index 0000000000..72e26bd4b8 --- /dev/null +++ b/interface/web/admin/templates/server_php_cli_edit.htm @@ -0,0 +1,10 @@ +
+ +
+ + + +
+ + +
diff --git a/interface/web/sites/lib/lang/de_cron.lng b/interface/web/sites/lib/lang/de_cron.lng index 535f7e7dca..260744116a 100644 --- a/interface/web/sites/lib/lang/de_cron.lng +++ b/interface/web/sites/lib/lang/de_cron.lng @@ -23,4 +23,5 @@ $wb['command_hint_txt'] = 'z. B. /var/www/clients/clientX/webY/myscript.sh oder $wb['log_output_txt'] = 'Ausgabe loggen'; $wb['limit_cron_url_txt'] = 'Es sind nur URL cronjobs möglich. Der Cron-Befehl muss mit https:// beginnen.'; $wb['command_error_empty'] = 'Befehl ist leer.'; +$wb['variables_txt'] = 'Variablen'; ?> diff --git a/interface/web/sites/lib/lang/en_cron.lng b/interface/web/sites/lib/lang/en_cron.lng index 871d4a292e..e912da82a5 100644 --- a/interface/web/sites/lib/lang/en_cron.lng +++ b/interface/web/sites/lib/lang/en_cron.lng @@ -23,4 +23,5 @@ $wb['command_hint_txt'] = 'e.g. /var/www/clients/clientX/webY/myscript.sh or htt $wb['log_output_txt'] = 'Log output'; $wb['limit_cron_url_txt'] = 'URL cron only. Please enter a URL starting with https:// as cron command.'; $wb['command_error_empty'] = 'Command is empty.'; -?> \ No newline at end of file +$wb['variables_txt'] = 'Variables'; +?> diff --git a/interface/web/sites/templates/cron_edit.htm b/interface/web/sites/templates/cron_edit.htm index 2c0f22ddb9..ffb0254681 100644 --- a/interface/web/sites/templates/cron_edit.htm +++ b/interface/web/sites/templates/cron_edit.htm @@ -51,7 +51,8 @@
-

{tmpl_var name='command_hint_txt'}

+ {tmpl_var name='variables_txt'}: {SITE_PHP}, {DOCROOT_CLIENT}, {DOMAIN} +

{tmpl_var name='command_hint_txt'}

@@ -66,7 +67,7 @@ {tmpl_var name='active'}
- + diff --git a/interface/web/sites/web_vhost_domain_edit.php b/interface/web/sites/web_vhost_domain_edit.php index be9f0911c7..14b3965d89 100644 --- a/interface/web/sites/web_vhost_domain_edit.php +++ b/interface/web/sites/web_vhost_domain_edit.php @@ -1443,6 +1443,25 @@ function onAfterUpdate() { global $app, $conf; if(isset($this->dataRecord['folder_directive_snippets'])) $app->db->query("UPDATE web_domain SET folder_directive_snippets = ? WHERE domain_id = ?", $this->dataRecord['folder_directive_snippets'], $this->id); + + // Trigger an update of the website's cronjobs when the PHP version is changed + if(isset($this->dataRecord['server_php_id']) && $this->oldDataRecord['server_php_id'] != $this->dataRecord['server_php_id']) { + $cronjob_list = $app->db->queryAllRecords("SELECT * FROM cron WHERE parent_domain_id = ? and active = 'y'", $this->dataRecord['id']); + if(!empty($cronjob_list)) { + foreach ($cronjob_list as $cronjob) { + // Only update cronjobs with placeholders + if(preg_match("/([\{][a-zA-Z_\-0-9]+[\}]|[\[][a-zA-Z_\-0-9]+[\]])/", $cronjob['command'])) { + $app->db->datalogUpdate('cron', $cronjob, 'id', $cronjob['id'], true); + } + } + } + $shelluser_list = $app->db->queryAllRecords("SELECT * FROM shell_user WHERE parent_domain_id = ? and active = 'y'", $this->dataRecord['id']); + if(!empty($shelluser_list)) { + foreach ($shelluser_list as $shelluser) { + $app->db->datalogUpdate('shell_user', $shelluser, 'shell_user_id', $shelluser['shell_user_id'], true); + } + } + } } function validateDefaultFastcgiPhpVersion() { diff --git a/server/conf/bash.bashrc.master b/server/conf/bash.bashrc.master index edcaf7dc58..4c5090ec55 100644 --- a/server/conf/bash.bashrc.master +++ b/server/conf/bash.bashrc.master @@ -62,4 +62,12 @@ fi #alias la='ls -A' #alias l='ls -CF' + +# Overwrite the PHP cli binaries by using $PATH: +export PATH=:$PATH + + + +alias php="" + diff --git a/server/plugins-available/cron_plugin.inc.php b/server/plugins-available/cron_plugin.inc.php index f8b16b96cb..e6aa8c2e01 100644 --- a/server/plugins-available/cron_plugin.inc.php +++ b/server/plugins-available/cron_plugin.inc.php @@ -93,7 +93,7 @@ function update($event_name, $data) { } //* get data from web - $parent_domain = $app->db->queryOneRecord("SELECT `domain_id`, `system_user`, `system_group`, `document_root`, `hd_quota` FROM `web_domain` WHERE `domain_id` = ?", $data["new"]["parent_domain_id"]); + $parent_domain = $app->db->queryOneRecord("SELECT `domain_id`, `system_user`, `system_group`, `domain`, `document_root`, `hd_quota`, `php_cli_binary` FROM `web_domain` LEFT JOIN server_php ON web_domain.server_php_id = server_php.server_php_id WHERE `domain_id` = ?", $data["new"]["parent_domain_id"]); if(!$parent_domain["domain_id"]) { $app->log("Parent domain not found", LOGLEVEL_WARN); return 0; @@ -220,7 +220,7 @@ function _write_crontab() { $chr_cmd_count = 0; //* read all active cron jobs from database and write them to file - $cron_jobs = $app->db->queryAllRecords("SELECT c.`run_min`, c.`run_hour`, c.`run_mday`, c.`run_month`, c.`run_wday`, c.`command`, c.`type`, c.`log`, `web_domain`.`domain` as `domain` FROM `cron` as c INNER JOIN `web_domain` ON `web_domain`.`domain_id` = c.`parent_domain_id` WHERE c.`parent_domain_id` = ? AND c.`active` = 'y'", $this->parent_domain["domain_id"]); + $cron_jobs = $app->db->queryAllRecords("SELECT c.`id`, c.`run_min`, c.`run_hour`, c.`run_mday`, c.`run_month`, c.`run_wday`, c.`command`, c.`type`, c.`log`, `web_domain`.`domain` as `domain` FROM `cron` as c INNER JOIN `web_domain` ON `web_domain`.`domain_id` = c.`parent_domain_id` WHERE c.`parent_domain_id` = ? AND c.`active` = 'y'", $this->parent_domain["domain_id"]); if($cron_jobs && count($cron_jobs) > 0) { foreach($cron_jobs as $job) { if($job['run_month'] == '@reboot') { @@ -259,8 +259,25 @@ function _write_crontab() { $web_root = $this->parent_domain['document_root']; } + $web_domain = $this->parent_domain['domain']; + if($this->parent_domain['php_cli_binary'] == '') { + // PHP cli binary not set or default was selected, fallback to just "php" + $web_php_cli = 'php'; + $app->log("PHP CLI binary not set for the website\'s selected PHP version or Default was selected. Falling back to \"php\" for cronjob id " . $job['id'], LOGLEVEL_DEBUG); + } else { + $web_php_cli = $this->parent_domain['php_cli_binary']; + } + $web_root .= '/web'; - $job['command'] = str_replace('[web_root]', $web_root, $job['command']); + + $trans = array( + '[web_root]' => $web_root, + '{DOCROOT_CLIENT}' => $web_root, + '{DOMAIN}' => $web_domain, + '{SITE_PHP}' => $web_php_cli + ); + + $job['command'] = strtr($job['command'], $trans); $cron_line .= "\t"; //if($job['type'] != 'chrooted' && substr($job['command'], 0, 1) != "/") $cron_line .= $this->parent_domain['document_root'].'/'; diff --git a/server/plugins-available/shelluser_base_plugin.inc.php b/server/plugins-available/shelluser_base_plugin.inc.php index 5bbda0e13d..eaf7871fb1 100755 --- a/server/plugins-available/shelluser_base_plugin.inc.php +++ b/server/plugins-available/shelluser_base_plugin.inc.php @@ -80,7 +80,8 @@ function insert($event_name, $data) { } //* Check if the resulting path is inside the docroot - $web = $app->db->queryOneRecord("SELECT * FROM web_domain WHERE domain_id = ?", $data['new']['parent_domain_id']); + $web = $app->db->queryOneRecord("SELECT * FROM web_domain LEFT JOIN server_php ON web_domain.server_php_id = server_php.server_php_id WHERE `domain_id` = ?", $data["new"]["parent_domain_id"]); + //$web = $app->db->queryOneRecord("SELECT * FROM web_domain WHERE domain_id = ?", $data['new']['parent_domain_id']); if(substr($data['new']['dir'],0,strlen($web['document_root'])) != $web['document_root']) { $app->log('Directory of the shell user is outside of website docroot.',LOGLEVEL_WARN); return false; @@ -168,6 +169,36 @@ function insert($event_name, $data) { $app->system->chown($homedir.'/.profile', $data['new']['username']); $app->system->chgrp($homedir.'/.profile', $data['new']['pgroup']); + $app->load('tpl'); + + $tpl = new tpl(); + $tpl->newTemplate("bash.bashrc.master"); + + $tpl->setVar('jailkit_chroot', false); + $tpl->setVar('domain', $web['domain']); + //$tpl->setVar('home_dir', $this->_get_home_dir("")); + + if($web['server_php_id'] > 0) { + $tpl->setVar('use_site_php', true); + $tpl->setVar('php_bin_dir', $php_bin_dir); + } else { + $tpl->setVar('use_site_php', false); + } + + $bashrc = $this->data['new']['dir'].'/etc/bash.bashrc'; + if(@is_file($bashrc) || @is_link($bashrc)) unlink($bashrc); + + //file_put_contents($bashrc, $tpl->grab()); + $app->system->file_put_contents($bashrc, $tpl->grab()); + unset($tpl); + + $app->log("Added bashrc script: ".$bashrc, LOGLEVEL_DEBUG); + + + + + + // Create symlinks for conveniance, SFTP user should not land in an empty dir. symlink('../../web', $homedir.'/web'); symlink('../../log', $homedir.'/log'); @@ -202,7 +233,8 @@ function update($event_name, $data) { } //* Check if the resulting path is inside the docroot - $web = $app->db->queryOneRecord("SELECT * FROM web_domain WHERE domain_id = ?", $data['new']['parent_domain_id']); + $web = $app->db->queryOneRecord("SELECT * FROM web_domain LEFT JOIN server_php ON web_domain.server_php_id = server_php.server_php_id WHERE `domain_id` = ?", $data["new"]["parent_domain_id"]); + //$web = $app->db->queryOneRecord("SELECT * FROM web_domain WHERE domain_id = ?", $data['new']['parent_domain_id']); if(substr($data['new']['dir'],0,strlen($web['document_root'])) != $web['document_root']) { $app->log('Directory of the shell user is outside of website docroot.',LOGLEVEL_WARN); return false; @@ -300,6 +332,36 @@ function update($event_name, $data) { $app->system->chgrp($homedir.'/.profile', $data['new']['pgroup']); } + + + // Create .bashrc file + $app->load('tpl'); + + $tpl = new tpl(); + $tpl->newTemplate("bash.bashrc.master"); + + $tpl->setVar('jailkit_chroot', false); + //$tpl->setVar('domain', $web['domain']); + $php_bin_dir = dirname($web['php_cli_binary']); + //$tpl->setVar('home_dir', $this->_get_home_dir("")); + + if($web['server_php_id'] > 0) { + $tpl->setVar('use_site_php', false); + $tpl->setVar('php_bin_dir', $php_bin_dir); + $tpl->setVar('use_php_alias', true); + $tpl->setVar('php_alias', $web['php_cli_binary']); + } else { + $tpl->setVar('use_site_php', false); + } + + $bashrc = $homedir .'/.bashrc'; + if(@is_file($bashrc) || @is_link($bashrc)) unlink($bashrc); + + $app->system->file_put_contents($bashrc, $tpl->grab()); + unset($tpl); + + $app->log("Added bashrc script: ".$bashrc, LOGLEVEL_DEBUG); + //* Add webfolder protection again $app->system->web_folder_protection($web['document_root'], true); } else { diff --git a/server/plugins-available/shelluser_jailkit_plugin.inc.php b/server/plugins-available/shelluser_jailkit_plugin.inc.php index fc37727ad7..6ff6ee1568 100755 --- a/server/plugins-available/shelluser_jailkit_plugin.inc.php +++ b/server/plugins-available/shelluser_jailkit_plugin.inc.php @@ -82,7 +82,8 @@ function insert($event_name, $data) { } - $web = $app->db->queryOneRecord("SELECT * FROM web_domain WHERE domain_id = ?", $data['new']['parent_domain_id']); + //$web = $app->db->queryOneRecord("SELECT * FROM web_domain WHERE domain_id = ?", $data['new']['parent_domain_id']); + $web = $app->db->queryOneRecord("SELECT * FROM web_domain LEFT JOIN server_php ON web_domain.server_php_id = server_php.server_php_id WHERE `domain_id` = ?", $data["new"]["parent_domain_id"]); if(!$app->system->is_allowed_user($data['new']['username'], false, false) || !$app->system->is_allowed_user($data['new']['puser'], true, true) @@ -190,7 +191,8 @@ function update($event_name, $data) { } if($app->system->is_user($data['new']['puser'])) { - $web = $app->db->queryOneRecord("SELECT * FROM web_domain WHERE domain_id = ?", $data['new']['parent_domain_id']); + //$web = $app->db->queryOneRecord("SELECT * FROM web_domain WHERE domain_id = ?", $data['new']['parent_domain_id']); + $web = $app->db->queryOneRecord("SELECT * FROM web_domain LEFT JOIN server_php ON web_domain.server_php_id = server_php.server_php_id WHERE `domain_id` = ?", $data["new"]["parent_domain_id"]); // Get the UID of the parent user $uid = intval($app->system->getuid($data['new']['puser'])); @@ -327,7 +329,8 @@ function _setup_jailkit_chroot() $options = array('allow_hardlink'); } - $web = $app->db->queryOneRecord("SELECT domain, last_jailkit_hash FROM web_domain WHERE domain_id = ?", $this->data['new']["parent_domain_id"]); + //$web = $app->db->queryOneRecord("SELECT domain, last_jailkit_hash FROM web_domain WHERE domain_id = ?", $this->data['new']["parent_domain_id"]); + $web = $app->db->queryOneRecord("SELECT * FROM web_domain LEFT JOIN server_php ON web_domain.server_php_id = server_php.server_php_id WHERE `domain_id` = ?", $data["new"]["parent_domain_id"]); $last_updated = preg_split('/[\s,]+/', $this->jailkit_config['jailkit_chroot_app_sections'] .' '.$this->jailkit_config['jailkit_chroot_app_programs'] @@ -354,11 +357,14 @@ function _setup_jailkit_chroot() $tpl->setVar('jailkit_chroot', true); $tpl->setVar('domain', $web['domain']); $tpl->setVar('home_dir', $this->_get_home_dir("")); + $tpl->setVar('php_cli_binary', dirname($web['php_cli_binary'])); $bashrc = $this->data['new']['dir'].'/etc/bash.bashrc'; if(@is_file($bashrc) || @is_link($bashrc)) unlink($bashrc); - file_put_contents($bashrc, $tpl->grab()); + $app->system->file_put_contents($bashrc, $tpl->grab()); + + //file_put_contents($bashrc, $tpl->grab()); unset($tpl); $app->log("Added bashrc script: ".$bashrc, LOGLEVEL_DEBUG); From eec29823adaaff2ca5f3d6a0d957bf6ac6d023bd Mon Sep 17 00:00:00 2001 From: Michael Seevogel Date: Wed, 29 Nov 2023 13:35:32 +0100 Subject: [PATCH 267/621] Revert changes --- server/plugins-available/shelluser_jailkit_plugin.inc.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/server/plugins-available/shelluser_jailkit_plugin.inc.php b/server/plugins-available/shelluser_jailkit_plugin.inc.php index 6ff6ee1568..24bb7e1a74 100755 --- a/server/plugins-available/shelluser_jailkit_plugin.inc.php +++ b/server/plugins-available/shelluser_jailkit_plugin.inc.php @@ -329,8 +329,8 @@ function _setup_jailkit_chroot() $options = array('allow_hardlink'); } - //$web = $app->db->queryOneRecord("SELECT domain, last_jailkit_hash FROM web_domain WHERE domain_id = ?", $this->data['new']["parent_domain_id"]); - $web = $app->db->queryOneRecord("SELECT * FROM web_domain LEFT JOIN server_php ON web_domain.server_php_id = server_php.server_php_id WHERE `domain_id` = ?", $data["new"]["parent_domain_id"]); + $web = $app->db->queryOneRecord("SELECT domain, last_jailkit_hash FROM web_domain WHERE domain_id = ?", $this->data['new']["parent_domain_id"]); + //$web = $app->db->queryOneRecord("SELECT * FROM web_domain LEFT JOIN server_php ON web_domain.server_php_id = server_php.server_php_id WHERE `domain_id` = ?", $data["new"]["parent_domain_id"]); $last_updated = preg_split('/[\s,]+/', $this->jailkit_config['jailkit_chroot_app_sections'] .' '.$this->jailkit_config['jailkit_chroot_app_programs'] @@ -357,14 +357,13 @@ function _setup_jailkit_chroot() $tpl->setVar('jailkit_chroot', true); $tpl->setVar('domain', $web['domain']); $tpl->setVar('home_dir', $this->_get_home_dir("")); - $tpl->setVar('php_cli_binary', dirname($web['php_cli_binary'])); $bashrc = $this->data['new']['dir'].'/etc/bash.bashrc'; if(@is_file($bashrc) || @is_link($bashrc)) unlink($bashrc); $app->system->file_put_contents($bashrc, $tpl->grab()); - //file_put_contents($bashrc, $tpl->grab()); + unset($tpl); $app->log("Added bashrc script: ".$bashrc, LOGLEVEL_DEBUG); From d67fe7a923f5221981732dda8cf29f670a0d6620 Mon Sep 17 00:00:00 2001 From: Herman van Rink Date: Sun, 3 Dec 2023 21:44:36 +0100 Subject: [PATCH 268/621] Convert text to icon with on hover title --- interface/web/mail/templates/mail_domain_edit.htm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interface/web/mail/templates/mail_domain_edit.htm b/interface/web/mail/templates/mail_domain_edit.htm index fc2132b209..6b078b98a3 100644 --- a/interface/web/mail/templates/mail_domain_edit.htm +++ b/interface/web/mail/templates/mail_domain_edit.htm @@ -129,7 +129,7 @@
- +
From a115471d6b8fd47ff895b8bdbebe49850c959a72 Mon Sep 17 00:00:00 2001 From: Herman van Rink Date: Sun, 3 Dec 2023 21:46:33 +0100 Subject: [PATCH 269/621] Add translation strings --- interface/web/mail/lib/lang/ar_mail_domain.lng | 1 + interface/web/mail/lib/lang/bg_mail_domain.lng | 1 + interface/web/mail/lib/lang/br_mail_domain.lng | 1 + interface/web/mail/lib/lang/ca_mail_domain.lng | 1 + interface/web/mail/lib/lang/cn_mail_domain.lng | 1 + interface/web/mail/lib/lang/cz_mail_domain.lng | 1 + interface/web/mail/lib/lang/de_mail_domain.lng | 1 + interface/web/mail/lib/lang/dk_mail_domain.lng | 1 + interface/web/mail/lib/lang/el_mail_domain.lng | 1 + interface/web/mail/lib/lang/es_mail_domain.lng | 1 + interface/web/mail/lib/lang/fi_mail_domain.lng | 1 + interface/web/mail/lib/lang/fr_mail_domain.lng | 1 + interface/web/mail/lib/lang/hr_mail_domain.lng | 1 + interface/web/mail/lib/lang/hu_mail_domain.lng | 1 + interface/web/mail/lib/lang/id_mail_domain.lng | 1 + interface/web/mail/lib/lang/it_mail_domain.lng | 1 + interface/web/mail/lib/lang/ja_mail_domain.lng | 1 + interface/web/mail/lib/lang/nl_mail_domain.lng | 1 + interface/web/mail/lib/lang/pl_mail_domain.lng | 1 + interface/web/mail/lib/lang/pt_mail_domain.lng | 1 + interface/web/mail/lib/lang/ro_mail_domain.lng | 1 + interface/web/mail/lib/lang/ru_mail_domain.lng | 1 + interface/web/mail/lib/lang/se_mail_domain.lng | 1 + interface/web/mail/lib/lang/sk_mail_domain.lng | 1 + interface/web/mail/lib/lang/tr_mail_domain.lng | 1 + 25 files changed, 25 insertions(+) diff --git a/interface/web/mail/lib/lang/ar_mail_domain.lng b/interface/web/mail/lib/lang/ar_mail_domain.lng index e53c5d9ec2..aec7f401e5 100644 --- a/interface/web/mail/lib/lang/ar_mail_domain.lng +++ b/interface/web/mail/lib/lang/ar_mail_domain.lng @@ -23,3 +23,4 @@ $wb['error_not_allowed_server_id'] = 'Chosen server is not allowed for this acco $wb['relayhost_txt'] = 'Relayhost'; $wb['relayhost_user_txt'] = 'Relayhost User'; $wb['relayhost_password_txt'] = 'Relayhost Password'; +$wb['dkim_auto_dns_txt'] = 'Managed zone, dns updated automatically'; diff --git a/interface/web/mail/lib/lang/bg_mail_domain.lng b/interface/web/mail/lib/lang/bg_mail_domain.lng index f2d329a62e..003d54de71 100644 --- a/interface/web/mail/lib/lang/bg_mail_domain.lng +++ b/interface/web/mail/lib/lang/bg_mail_domain.lng @@ -23,3 +23,4 @@ $wb['error_not_allowed_server_id'] = 'Chosen server is not allowed for this acco $wb['relayhost_txt'] = 'Relayhost'; $wb['relayhost_user_txt'] = 'Relayhost User'; $wb['relayhost_password_txt'] = 'Relayhost Password'; +$wb['dkim_auto_dns_txt'] = 'Managed zone, dns updated automatically'; diff --git a/interface/web/mail/lib/lang/br_mail_domain.lng b/interface/web/mail/lib/lang/br_mail_domain.lng index 7371f51894..48cb66f57b 100644 --- a/interface/web/mail/lib/lang/br_mail_domain.lng +++ b/interface/web/mail/lib/lang/br_mail_domain.lng @@ -23,3 +23,4 @@ $wb['dkim_selector_error'] = 'Seletor DKIM é inválido. Utilize apenas caracter $wb['relayhost_txt'] = 'Relayhost'; $wb['relayhost_user_txt'] = 'Relayhost User'; $wb['relayhost_password_txt'] = 'Relayhost Password'; +$wb['dkim_auto_dns_txt'] = 'Managed zone, dns updated automatically'; diff --git a/interface/web/mail/lib/lang/ca_mail_domain.lng b/interface/web/mail/lib/lang/ca_mail_domain.lng index 0b701a16c3..a22ce61178 100644 --- a/interface/web/mail/lib/lang/ca_mail_domain.lng +++ b/interface/web/mail/lib/lang/ca_mail_domain.lng @@ -23,3 +23,4 @@ $wb['dkim_selector_error'] = 'Invalid DKIM-Selector. Use only lower-case alphanu $wb['relayhost_txt'] = 'Relayhost'; $wb['relayhost_user_txt'] = 'Relayhost User'; $wb['relayhost_password_txt'] = 'Relayhost Password'; +$wb['dkim_auto_dns_txt'] = 'Managed zone, dns updated automatically'; diff --git a/interface/web/mail/lib/lang/cn_mail_domain.lng b/interface/web/mail/lib/lang/cn_mail_domain.lng index 279e9a3bf7..59c60340b3 100644 --- a/interface/web/mail/lib/lang/cn_mail_domain.lng +++ b/interface/web/mail/lib/lang/cn_mail_domain.lng @@ -23,3 +23,4 @@ $wb['dkim_selector_error'] = '无效的 DKIM 选择器。仅使用小写字母 $wb['relayhost_txt'] = 'Relayhost'; $wb['relayhost_user_txt'] = 'Relayhost 用户'; $wb['relayhost_password_txt'] = 'Relayhost 密码'; +$wb['dkim_auto_dns_txt'] = 'Managed zone, dns updated automatically'; diff --git a/interface/web/mail/lib/lang/cz_mail_domain.lng b/interface/web/mail/lib/lang/cz_mail_domain.lng index 0c648a68f3..546e27cfbe 100644 --- a/interface/web/mail/lib/lang/cz_mail_domain.lng +++ b/interface/web/mail/lib/lang/cz_mail_domain.lng @@ -23,3 +23,4 @@ $wb['error_not_allowed_server_id'] = 'Zvolený server není povolen pro tento ú $wb['relayhost_txt'] = 'Relayhost'; $wb['relayhost_user_txt'] = 'Relayhost User'; $wb['relayhost_password_txt'] = 'Relayhost Password'; +$wb['dkim_auto_dns_txt'] = 'Managed zone, dns updated automatically'; diff --git a/interface/web/mail/lib/lang/de_mail_domain.lng b/interface/web/mail/lib/lang/de_mail_domain.lng index 0a972caa42..e49b66358a 100644 --- a/interface/web/mail/lib/lang/de_mail_domain.lng +++ b/interface/web/mail/lib/lang/de_mail_domain.lng @@ -23,3 +23,4 @@ $wb['error_not_allowed_server_id'] = 'Chosen server is not allowed for this acco $wb['relayhost_txt'] = 'Relayhost'; $wb['relayhost_user_txt'] = 'Relayhost User'; $wb['relayhost_password_txt'] = 'Relayhost Password'; +$wb['dkim_auto_dns_txt'] = 'Managed zone, dns updated automatically'; diff --git a/interface/web/mail/lib/lang/dk_mail_domain.lng b/interface/web/mail/lib/lang/dk_mail_domain.lng index fcced58e1a..64058ef18a 100644 --- a/interface/web/mail/lib/lang/dk_mail_domain.lng +++ b/interface/web/mail/lib/lang/dk_mail_domain.lng @@ -23,3 +23,4 @@ $wb['dkim_selector_error'] = 'Invalid DKIM-Selector. Use only lower-case alphanu $wb['relayhost_txt'] = 'Relayhost'; $wb['relayhost_user_txt'] = 'Relayhost User'; $wb['relayhost_password_txt'] = 'Relayhost Password'; +$wb['dkim_auto_dns_txt'] = 'Managed zone, dns updated automatically'; diff --git a/interface/web/mail/lib/lang/el_mail_domain.lng b/interface/web/mail/lib/lang/el_mail_domain.lng index 3909576a3c..1086651b16 100644 --- a/interface/web/mail/lib/lang/el_mail_domain.lng +++ b/interface/web/mail/lib/lang/el_mail_domain.lng @@ -23,3 +23,4 @@ $wb['error_not_allowed_server_id'] = 'Chosen server is not allowed for this acco $wb['relayhost_txt'] = 'Relayhost'; $wb['relayhost_user_txt'] = 'Relayhost User'; $wb['relayhost_password_txt'] = 'Relayhost Password'; +$wb['dkim_auto_dns_txt'] = 'Managed zone, dns updated automatically'; diff --git a/interface/web/mail/lib/lang/es_mail_domain.lng b/interface/web/mail/lib/lang/es_mail_domain.lng index 4a3feb7c8b..81d0939b89 100644 --- a/interface/web/mail/lib/lang/es_mail_domain.lng +++ b/interface/web/mail/lib/lang/es_mail_domain.lng @@ -23,3 +23,4 @@ $wb['type_txt'] = 'Tipo'; $wb['relayhost_txt'] = 'Relayhost'; $wb['relayhost_user_txt'] = 'Relayhost User'; $wb['relayhost_password_txt'] = 'Relayhost Password'; +$wb['dkim_auto_dns_txt'] = 'Managed zone, dns updated automatically'; diff --git a/interface/web/mail/lib/lang/fi_mail_domain.lng b/interface/web/mail/lib/lang/fi_mail_domain.lng index d77fe32500..8ecd3f6718 100644 --- a/interface/web/mail/lib/lang/fi_mail_domain.lng +++ b/interface/web/mail/lib/lang/fi_mail_domain.lng @@ -23,3 +23,4 @@ $wb['error_not_allowed_server_id'] = 'Chosen server is not allowed for this acco $wb['relayhost_txt'] = 'Relayhost'; $wb['relayhost_user_txt'] = 'Relayhost User'; $wb['relayhost_password_txt'] = 'Relayhost Password'; +$wb['dkim_auto_dns_txt'] = 'Managed zone, dns updated automatically'; diff --git a/interface/web/mail/lib/lang/fr_mail_domain.lng b/interface/web/mail/lib/lang/fr_mail_domain.lng index 56efb88aae..6cf3e060f8 100644 --- a/interface/web/mail/lib/lang/fr_mail_domain.lng +++ b/interface/web/mail/lib/lang/fr_mail_domain.lng @@ -23,3 +23,4 @@ $wb['dkim_selector_error'] = 'Invalid DKIM-Selector. Use only lower-case alphanu $wb['relayhost_txt'] = 'Relayhost'; $wb['relayhost_user_txt'] = 'Relayhost User'; $wb['relayhost_password_txt'] = 'Relayhost Password'; +$wb['dkim_auto_dns_txt'] = 'Managed zone, dns updated automatically'; diff --git a/interface/web/mail/lib/lang/hr_mail_domain.lng b/interface/web/mail/lib/lang/hr_mail_domain.lng index 2f53c694c8..2404324f04 100644 --- a/interface/web/mail/lib/lang/hr_mail_domain.lng +++ b/interface/web/mail/lib/lang/hr_mail_domain.lng @@ -23,3 +23,4 @@ $wb['error_not_allowed_server_id'] = 'Chosen server is not allowed for this acco $wb['relayhost_txt'] = 'Relayhost'; $wb['relayhost_user_txt'] = 'Relayhost User'; $wb['relayhost_password_txt'] = 'Relayhost Password'; +$wb['dkim_auto_dns_txt'] = 'Managed zone, dns updated automatically'; diff --git a/interface/web/mail/lib/lang/hu_mail_domain.lng b/interface/web/mail/lib/lang/hu_mail_domain.lng index 96a5dc03a5..faf5eae4ae 100644 --- a/interface/web/mail/lib/lang/hu_mail_domain.lng +++ b/interface/web/mail/lib/lang/hu_mail_domain.lng @@ -23,3 +23,4 @@ $wb['error_not_allowed_server_id'] = 'Chosen server is not allowed for this acco $wb['relayhost_txt'] = 'Relayhost'; $wb['relayhost_user_txt'] = 'Relayhost User'; $wb['relayhost_password_txt'] = 'Relayhost Password'; +$wb['dkim_auto_dns_txt'] = 'Managed zone, dns updated automatically'; diff --git a/interface/web/mail/lib/lang/id_mail_domain.lng b/interface/web/mail/lib/lang/id_mail_domain.lng index 2979773e8c..f8c2d7c516 100644 --- a/interface/web/mail/lib/lang/id_mail_domain.lng +++ b/interface/web/mail/lib/lang/id_mail_domain.lng @@ -23,3 +23,4 @@ $wb['error_not_allowed_server_id'] = 'Chosen server is not allowed for this acco $wb['relayhost_txt'] = 'Relayhost'; $wb['relayhost_user_txt'] = 'Relayhost User'; $wb['relayhost_password_txt'] = 'Relayhost Password'; +$wb['dkim_auto_dns_txt'] = 'Managed zone, dns updated automatically'; diff --git a/interface/web/mail/lib/lang/it_mail_domain.lng b/interface/web/mail/lib/lang/it_mail_domain.lng index 13af4beb97..75c8a7b6a4 100644 --- a/interface/web/mail/lib/lang/it_mail_domain.lng +++ b/interface/web/mail/lib/lang/it_mail_domain.lng @@ -23,4 +23,5 @@ $wb['dkim_selector_error'] = 'Selettore di chiave DKIM invalido. Usare solo cara $wb['relayhost_txt'] = 'Relayhost'; $wb['relayhost_user_txt'] = 'Utente Relayhost'; $wb['relayhost_password_txt'] = 'Relayhost Password'; +$wb['dkim_auto_dns_txt'] = 'Managed zone, dns updated automatically'; ?> diff --git a/interface/web/mail/lib/lang/ja_mail_domain.lng b/interface/web/mail/lib/lang/ja_mail_domain.lng index a96faaa367..9713c8d734 100644 --- a/interface/web/mail/lib/lang/ja_mail_domain.lng +++ b/interface/web/mail/lib/lang/ja_mail_domain.lng @@ -23,3 +23,4 @@ $wb['dkim_selector_error'] = 'Invalid DKIM-Selector. Use only lower-case alphanu $wb['relayhost_txt'] = 'Relayhost'; $wb['relayhost_user_txt'] = 'Relayhost User'; $wb['relayhost_password_txt'] = 'Relayhost Password'; +$wb['dkim_auto_dns_txt'] = 'Managed zone, dns updated automatically'; diff --git a/interface/web/mail/lib/lang/nl_mail_domain.lng b/interface/web/mail/lib/lang/nl_mail_domain.lng index 0e8a912a71..97ecca773d 100644 --- a/interface/web/mail/lib/lang/nl_mail_domain.lng +++ b/interface/web/mail/lib/lang/nl_mail_domain.lng @@ -23,3 +23,4 @@ $wb['error_not_allowed_server_id'] = 'Chosen server is not allowed for this acco $wb['relayhost_txt'] = 'Relayhost'; $wb['relayhost_user_txt'] = 'Relayhost User'; $wb['relayhost_password_txt'] = 'Relayhost Password'; +$wb['dkim_auto_dns_txt'] = 'Beheerde zone, dns update automatisch'; diff --git a/interface/web/mail/lib/lang/pl_mail_domain.lng b/interface/web/mail/lib/lang/pl_mail_domain.lng index 7ff3c297ff..cba78dc309 100644 --- a/interface/web/mail/lib/lang/pl_mail_domain.lng +++ b/interface/web/mail/lib/lang/pl_mail_domain.lng @@ -23,3 +23,4 @@ $wb['error_not_allowed_server_id'] = 'Chosen server is not allowed for this acco $wb['relayhost_txt'] = 'Relayhost'; $wb['relayhost_user_txt'] = 'Relayhost User'; $wb['relayhost_password_txt'] = 'Relayhost Password'; +$wb['dkim_auto_dns_txt'] = 'Managed zone, dns updated automatically'; diff --git a/interface/web/mail/lib/lang/pt_mail_domain.lng b/interface/web/mail/lib/lang/pt_mail_domain.lng index 092f83f1ca..16ff402ded 100644 --- a/interface/web/mail/lib/lang/pt_mail_domain.lng +++ b/interface/web/mail/lib/lang/pt_mail_domain.lng @@ -23,3 +23,4 @@ $wb['error_not_allowed_server_id'] = 'Chosen server is not allowed for this acco $wb['relayhost_txt'] = 'Relayhost'; $wb['relayhost_user_txt'] = 'Relayhost User'; $wb['relayhost_password_txt'] = 'Relayhost Password'; +$wb['dkim_auto_dns_txt'] = 'Managed zone, dns updated automatically'; diff --git a/interface/web/mail/lib/lang/ro_mail_domain.lng b/interface/web/mail/lib/lang/ro_mail_domain.lng index e0543f36ec..dce3c99ceb 100644 --- a/interface/web/mail/lib/lang/ro_mail_domain.lng +++ b/interface/web/mail/lib/lang/ro_mail_domain.lng @@ -23,3 +23,4 @@ $wb['error_not_allowed_server_id'] = 'Chosen server is not allowed for this acco $wb['relayhost_txt'] = 'Relayhost'; $wb['relayhost_user_txt'] = 'Relayhost User'; $wb['relayhost_password_txt'] = 'Relayhost Password'; +$wb['dkim_auto_dns_txt'] = 'Managed zone, dns updated automatically'; diff --git a/interface/web/mail/lib/lang/ru_mail_domain.lng b/interface/web/mail/lib/lang/ru_mail_domain.lng index 7567e3c670..af76a508fb 100644 --- a/interface/web/mail/lib/lang/ru_mail_domain.lng +++ b/interface/web/mail/lib/lang/ru_mail_domain.lng @@ -23,3 +23,4 @@ $wb['error_not_allowed_server_id'] = 'Выбранный сервер не до $wb['relayhost_txt'] = 'Relayhost'; $wb['relayhost_user_txt'] = 'Relayhost User'; $wb['relayhost_password_txt'] = 'Relayhost Password'; +$wb['dkim_auto_dns_txt'] = 'Managed zone, dns updated automatically'; diff --git a/interface/web/mail/lib/lang/se_mail_domain.lng b/interface/web/mail/lib/lang/se_mail_domain.lng index 7f192224e6..ec787116f6 100644 --- a/interface/web/mail/lib/lang/se_mail_domain.lng +++ b/interface/web/mail/lib/lang/se_mail_domain.lng @@ -23,3 +23,4 @@ $wb['error_not_allowed_server_id'] = 'Chosen server is not allowed for this acco $wb['relayhost_txt'] = 'Relayhost'; $wb['relayhost_user_txt'] = 'Relayhost User'; $wb['relayhost_password_txt'] = 'Relayhost Password'; +$wb['dkim_auto_dns_txt'] = 'Managed zone, dns updated automatically'; diff --git a/interface/web/mail/lib/lang/sk_mail_domain.lng b/interface/web/mail/lib/lang/sk_mail_domain.lng index ed67d20044..7527ba1d65 100644 --- a/interface/web/mail/lib/lang/sk_mail_domain.lng +++ b/interface/web/mail/lib/lang/sk_mail_domain.lng @@ -23,3 +23,4 @@ $wb['dkim_selector_txt'] = 'DKIM-Selector'; $wb['relayhost_txt'] = 'Relayhost'; $wb['relayhost_user_txt'] = 'Relayhost User'; $wb['relayhost_password_txt'] = 'Relayhost Password'; +$wb['dkim_auto_dns_txt'] = 'Managed zone, dns updated automatically'; diff --git a/interface/web/mail/lib/lang/tr_mail_domain.lng b/interface/web/mail/lib/lang/tr_mail_domain.lng index 802fdcf94b..8ada2139b0 100644 --- a/interface/web/mail/lib/lang/tr_mail_domain.lng +++ b/interface/web/mail/lib/lang/tr_mail_domain.lng @@ -23,3 +23,4 @@ $wb['dkim_selector_error'] = 'DKIM seçici geçersiz. En fazla 63 karakter uzunl $wb['relayhost_txt'] = 'Relayhost'; $wb['relayhost_user_txt'] = 'Relayhost User'; $wb['relayhost_password_txt'] = 'Relayhost Password'; +$wb['dkim_auto_dns_txt'] = 'Managed zone, dns updated automatically'; From 3004c05b365ce87f6e84111267f2ec2c5eee6c86 Mon Sep 17 00:00:00 2001 From: Herman van Rink Date: Sun, 3 Dec 2023 23:29:02 +0100 Subject: [PATCH 270/621] Change to link icoc --- interface/web/mail/templates/mail_domain_edit.htm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interface/web/mail/templates/mail_domain_edit.htm b/interface/web/mail/templates/mail_domain_edit.htm index 6b078b98a3..2d8d14536c 100644 --- a/interface/web/mail/templates/mail_domain_edit.htm +++ b/interface/web/mail/templates/mail_domain_edit.htm @@ -129,7 +129,7 @@
- +
From 1f1350c5ca19aa27f564845a490694631651081d Mon Sep 17 00:00:00 2001 From: Michael Seevogel Date: Fri, 8 Dec 2023 12:23:50 +0100 Subject: [PATCH 271/621] Clean up --- server/plugins-available/cron_plugin.inc.php | 4 ++-- .../shelluser_base_plugin.inc.php | 23 +++++++++++-------- .../shelluser_jailkit_plugin.inc.php | 2 +- 3 files changed, 17 insertions(+), 12 deletions(-) diff --git a/server/plugins-available/cron_plugin.inc.php b/server/plugins-available/cron_plugin.inc.php index e6aa8c2e01..853f222046 100644 --- a/server/plugins-available/cron_plugin.inc.php +++ b/server/plugins-available/cron_plugin.inc.php @@ -260,8 +260,8 @@ function _write_crontab() { } $web_domain = $this->parent_domain['domain']; - if($this->parent_domain['php_cli_binary'] == '') { - // PHP cli binary not set or default was selected, fallback to just "php" + if($this->parent_domain['php_cli_binary'] == '' || $job['type'] == 'chrooted') { + // PHP cli binary not set or default was selected or it is a chrooted web, fallback to just "php" $web_php_cli = 'php'; $app->log("PHP CLI binary not set for the website\'s selected PHP version or Default was selected. Falling back to \"php\" for cronjob id " . $job['id'], LOGLEVEL_DEBUG); } else { diff --git a/server/plugins-available/shelluser_base_plugin.inc.php b/server/plugins-available/shelluser_base_plugin.inc.php index eaf7871fb1..6b0f14fd71 100755 --- a/server/plugins-available/shelluser_base_plugin.inc.php +++ b/server/plugins-available/shelluser_base_plugin.inc.php @@ -332,32 +332,37 @@ function update($event_name, $data) { $app->system->chgrp($homedir.'/.profile', $data['new']['pgroup']); } - - // Create .bashrc file $app->load('tpl'); $tpl = new tpl(); $tpl->newTemplate("bash.bashrc.master"); + // This is not a Jailkit chroot $tpl->setVar('jailkit_chroot', false); - //$tpl->setVar('domain', $web['domain']); $php_bin_dir = dirname($web['php_cli_binary']); - //$tpl->setVar('home_dir', $this->_get_home_dir("")); + // FIXME: Check if we need to add an additional field for the path environment variable that contains the path to the php binary if($web['server_php_id'] > 0) { - $tpl->setVar('use_site_php', false); - $tpl->setVar('php_bin_dir', $php_bin_dir); - $tpl->setVar('use_php_alias', true); - $tpl->setVar('php_alias', $web['php_cli_binary']); + if(preg_match('/^(\/usr\/(s)?bin|\/(s)?bin)/', $php_bin_dir)) + { + $tpl->setVar('use_site_php', false); + $tpl->setVar('use_php_alias', true); + $tpl->setVar('php_alias', $web['php_cli_binary']); + } else { + $tpl->setVar('use_site_php', true); + $tpl->setVar('use_php_alias', false); + $tpl->setVar('php_bin_dir', $php_bin_dir); + } } else { $tpl->setVar('use_site_php', false); + $tpl->setVar('use_php_alias', false); } $bashrc = $homedir .'/.bashrc'; if(@is_file($bashrc) || @is_link($bashrc)) unlink($bashrc); - $app->system->file_put_contents($bashrc, $tpl->grab()); + file_put_contents($bashrc, $tpl->grab()); unset($tpl); $app->log("Added bashrc script: ".$bashrc, LOGLEVEL_DEBUG); diff --git a/server/plugins-available/shelluser_jailkit_plugin.inc.php b/server/plugins-available/shelluser_jailkit_plugin.inc.php index 24bb7e1a74..285df2bbc6 100755 --- a/server/plugins-available/shelluser_jailkit_plugin.inc.php +++ b/server/plugins-available/shelluser_jailkit_plugin.inc.php @@ -361,7 +361,7 @@ function _setup_jailkit_chroot() $bashrc = $this->data['new']['dir'].'/etc/bash.bashrc'; if(@is_file($bashrc) || @is_link($bashrc)) unlink($bashrc); - $app->system->file_put_contents($bashrc, $tpl->grab()); + file_put_contents($bashrc, $tpl->grab()); unset($tpl); From 93680219dd95921498fdd373831cfaaba38ced83 Mon Sep 17 00:00:00 2001 From: Helmo Date: Sun, 10 Dec 2023 17:57:12 +0000 Subject: [PATCH 272/621] Remove accidental quotes around a record, #6618 --- interface/web/dns/dns_edit_base.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/interface/web/dns/dns_edit_base.php b/interface/web/dns/dns_edit_base.php index 3d15ec1d86..2d6d4081e7 100644 --- a/interface/web/dns/dns_edit_base.php +++ b/interface/web/dns/dns_edit_base.php @@ -129,6 +129,12 @@ function onSubmit() { if($this->checkDuplicate()) $app->tform->errorMessage .= $app->tform->lng("data_error_duplicate")."
"; + // Remove accidental quotes around a record. + $matches = array(); + if(preg_match('/^"(.*)"$/', $this->dataRecord["data"], $matches)) { + $this->dataRecord["data"] = $matches[1]; + } + // Set the server ID of the rr record to the same server ID as the parent record. $this->dataRecord["server_id"] = $soa["server_id"]; From a74eb51f77215210b3dcf34e6395a0e1334cb114 Mon Sep 17 00:00:00 2001 From: Herman van Rink Date: Wed, 13 Dec 2023 21:50:21 +0100 Subject: [PATCH 273/621] Extract the dkim public key from the private when empty --- interface/web/mail/mail_domain_edit.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/interface/web/mail/mail_domain_edit.php b/interface/web/mail/mail_domain_edit.php index f5697b4f1c..8db7baf5eb 100644 --- a/interface/web/mail/mail_domain_edit.php +++ b/interface/web/mail/mail_domain_edit.php @@ -331,6 +331,11 @@ function onSubmit() { $this->dataRecord["domain"] = strtolower($this->dataRecord["domain"]); } + // Extract the dkim public key if not submitted. + if (!empty($this->dataRecord['dkim_private']) && empty( $this->dataRecord['dkim_public']) ) { + $this->dataRecord['dkim_public'] = openssl_pkey_get_details(openssl_pkey_get_private($this->dataRecord['dkim_private']))['key']; + } + //* server_id must be > 0 if(isset($this->dataRecord["server_id"]) && $this->dataRecord["server_id"] < 1) $app->tform->errorMessage .= $app->lng("server_id_0_error_txt"); From f74fa40c372863662a8fceb1b420e04c0ff68ddf Mon Sep 17 00:00:00 2001 From: Johannes Koschier Date: Mon, 25 Dec 2023 15:15:16 +0100 Subject: [PATCH 274/621] Force tab change on filter update, fixes #6613 --- interface/web/dns/templates/dns_a_list.htm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interface/web/dns/templates/dns_a_list.htm b/interface/web/dns/templates/dns_a_list.htm index 4d0f3b2b28..d08f7a58fc 100644 --- a/interface/web/dns/templates/dns_a_list.htm +++ b/interface/web/dns/templates/dns_a_list.htm @@ -73,7 +73,7 @@ - + From bb99e9553f00e71f09a29deb26f38cf574d5aa90 Mon Sep 17 00:00:00 2001 From: Herman van Rink Date: Mon, 25 Dec 2023 20:07:58 +0100 Subject: [PATCH 275/621] Use our default value instead of an empty string, fixes #6624 --- interface/lib/classes/tform_base.inc.php | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/interface/lib/classes/tform_base.inc.php b/interface/lib/classes/tform_base.inc.php index 7b031dd345..dad8266971 100644 --- a/interface/lib/classes/tform_base.inc.php +++ b/interface/lib/classes/tform_base.inc.php @@ -478,7 +478,7 @@ function getHTML($record, $tab, $action = 'NEW') { if(isset($record[$key])) { $val = $record[$key]; } else { - $val = ''; + $val = $field['default']; } // If Datasource is set, get the data from there @@ -621,11 +621,7 @@ function getHTML($record, $tab, $action = 'NEW') { break; default: - if(isset($record[$key])) { - $new_record[$key] = $app->functions->htmlentities($record[$key]); - } else { - $new_record[$key] = ''; - } + $new_record[$key] = $app->functions->htmlentities($val); } } } From ba12d61be9efea1bb44ae2c4a3d7bd91ab7280a6 Mon Sep 17 00:00:00 2001 From: Herman van Rink Date: Thu, 28 Dec 2023 23:59:10 +0100 Subject: [PATCH 276/621] De-duplicate onBeforeUpdate and onBeforeInsert --- interface/web/sites/database_edit.php | 144 +++++--------------------- 1 file changed, 26 insertions(+), 118 deletions(-) diff --git a/interface/web/sites/database_edit.php b/interface/web/sites/database_edit.php index 528ec444ed..16b3666e8e 100644 --- a/interface/web/sites/database_edit.php +++ b/interface/web/sites/database_edit.php @@ -306,19 +306,32 @@ function onBeforeUpdate() { $global_config = $app->getconf->get_global_config('sites'); $dbname_prefix = $app->tools_sites->replacePrefix($global_config['dbname_prefix'], $this->dataRecord); - //* Prevent that the database name and charset is changed - $old_record = $app->tform->getDataRecord($this->id); - $dbname_prefix = $app->tools_sites->getPrefix($old_record['database_name_prefix'], $dbname_prefix); - $this->dataRecord['database_name_prefix'] = $dbname_prefix; - - //* Only admin can change the database name - if ($_SESSION["s"]["user"]["typ"] != 'admin') { - if($old_record["database_name"] != $dbname_prefix . $this->dataRecord["database_name"]) { - $app->tform->errorMessage .= $app->tform->wordbook["database_name_change_txt"].'
'; + if($this->id > 0) { + //* Prevent that the database name and charset is changed + $old_record = $app->tform->getDataRecord($this->id); + $dbname_prefix = $app->tools_sites->getPrefix($old_record['database_name_prefix'], $dbname_prefix); + $this->dataRecord['database_name_prefix'] = $dbname_prefix; + + //* Only admin can change the database name + if ($_SESSION["s"]["user"]["typ"] != 'admin') { + if($old_record["database_name"] != $dbname_prefix . $this->dataRecord["database_name"]) { + $app->tform->errorMessage .= $app->tform->wordbook["database_name_change_txt"].'
'; + } } - } - if($old_record["database_charset"] != $this->dataRecord["database_charset"]) { - $app->tform->errorMessage .= $app->tform->wordbook["database_charset_change_txt"].'
'; + if($old_record["database_charset"] != $this->dataRecord["database_charset"]) { + $app->tform->errorMessage .= $app->tform->wordbook["database_charset_change_txt"].'
'; + } + + //* Check if the server has been changed + // We do this only for the admin or reseller users, as normal clients can not change the server ID anyway + if($_SESSION["s"]["user"]["typ"] == 'admin' || $app->auth->has_clients($_SESSION['s']['user']['userid'])) { + if($old_record["server_id"] != $this->dataRecord["server_id"]) { + //* Add a error message and switch back to old server + $app->tform->errorMessage .= $app->lng('The Server can not be changed.'); + $this->dataRecord["server_id"] = $rec['server_id']; + } + } + unset($old_record); } if(!$this->dataRecord['database_user_id']) { @@ -328,16 +341,6 @@ function onBeforeUpdate() { //* Database username and database name shall not be empty if($this->dataRecord['database_name'] == '') $app->tform->errorMessage .= $app->tform->wordbook["database_name_error_empty"].'
'; - //* Check if the server has been changed - // We do this only for the admin or reseller users, as normal clients can not change the server ID anyway - if($_SESSION["s"]["user"]["typ"] == 'admin' || $app->auth->has_clients($_SESSION['s']['user']['userid'])) { - if($old_record["server_id"] != $this->dataRecord["server_id"]) { - //* Add a error message and switch back to old server - $app->tform->errorMessage .= $app->lng('The Server can not be changed.'); - $this->dataRecord["server_id"] = $rec['server_id']; - } - } - unset($old_record); if(strlen($dbname_prefix . $this->dataRecord['database_name']) > 64) $app->tform->errorMessage .= str_replace('{db}', $dbname_prefix . $this->dataRecord['database_name'], $app->tform->wordbook["database_name_error_len"]).'
'; @@ -426,102 +429,7 @@ function onBeforeUpdate() { function onBeforeInsert() { global $app, $conf, $interfaceConf; - //* Site shell not be empty - if($this->dataRecord['parent_domain_id'] == 0) $app->tform->errorMessage .= $app->tform->lng("database_site_error_empty").'
'; - - //* Database username and database name shall not be empty - if($this->dataRecord['database_name'] == '') $app->tform->errorMessage .= $app->tform->wordbook["database_name_error_empty"].'
'; - - //* Get the database name and database user prefix - $app->uses('getconf,tools_sites'); - $global_config = $app->getconf->get_global_config('sites'); - $dbname_prefix = $app->tools_sites->replacePrefix($global_config['dbname_prefix'], $this->dataRecord); - $this->dataRecord['database_name_prefix'] = $dbname_prefix; - - if(strlen($dbname_prefix . $this->dataRecord['database_name']) > 64) $app->tform->errorMessage .= str_replace('{db}', $dbname_prefix . $this->dataRecord['database_name'], $app->tform->wordbook["database_name_error_len"]).'
'; - - //* Check database name and user against blacklist - $dbname_blacklist = array($conf['db_database'], 'mysql'); - if(in_array($dbname_prefix . $this->dataRecord['database_name'], $dbname_blacklist)) { - $app->tform->errorMessage .= $app->lng('Database name not allowed.').'
'; - } - - /* restrict the names */ - /* crop user and db names if they are too long -> mysql: user: 16 chars / db: 64 chars */ - if ($app->tform->errorMessage == ''){ - $this->dataRecord['database_name'] = substr($dbname_prefix . $this->dataRecord['database_name'], 0, 64); - } - - //* Check for duplicates - $tmp = $app->db->queryOneRecord("SELECT count(database_id) as dbnum FROM web_database WHERE database_name = ? AND server_id = ?", $this->dataRecord['database_name'], $this->dataRecord["server_id"]); - if($tmp['dbnum'] > 0) $app->tform->errorMessage .= $app->tform->lng('database_name_error_unique').'
'; - - // get the web server ip (parent domain) - $tmp = $app->db->queryOneRecord("SELECT server_id FROM web_domain WHERE domain_id = ?", $this->dataRecord['parent_domain_id']); - if($tmp['server_id'] && $tmp['server_id'] != $this->dataRecord['server_id']) { - // we need remote access rights for this server, so get it's ip address - $server_config = $app->getconf->get_server_config($tmp['server_id'], 'server'); - - // Add default remote_ips from Main Configuration. - if(empty($global_config['default_remote_dbserver'])) { - $remote_ips = array(); - } else { - $remote_ips = explode(",", $global_config['default_remote_dbserver']); - } - - if (!in_array($server_config['ip_address'], $remote_ips)) { $remote_ips[] = $server_config['ip_address']; } - - if($server_config['ip_address']!='') { - if($this->dataRecord['remote_access'] != 'y'){ - $this->dataRecord['remote_ips'] = implode(',', $remote_ips); - $this->dataRecord['remote_access'] = 'y'; - } else { - if($this->dataRecord['remote_ips'] != ''){ - if(preg_match('/(^|,)' . preg_quote($server_config['ip_address'], '/') . '(,|$)/', $this->dataRecord['remote_ips']) == false) { - $this->dataRecord['remote_ips'] .= ',' . $server_config['ip_address']; - } - $tmp = preg_split('/\s*,\s*/', $this->dataRecord['remote_ips']); - $tmp = array_merge($tmp, $remote_ips); - $tmp = array_unique($tmp); - $this->dataRecord['remote_ips'] = implode(',', $tmp); - unset($tmp); - } - } - } - } else { - if(!empty($global_config['default_remote_dbserver'])) { - // Add default remote_ips from Main Configuration. - $remote_ips = explode(",", $global_config['default_remote_dbserver']); - - if($this->dataRecord['remote_access'] != 'y'){ - $this->dataRecord['remote_ips'] = implode(',', $remote_ips); - $this->dataRecord['remote_access'] = 'y'; - } - } - } - - if ($app->tform->errorMessage == '') { - // force update of the used database user - if($this->dataRecord['database_user_id']) { - $user_old_rec = $app->db->queryOneRecord('SELECT * FROM `web_database_user` WHERE `database_user_id` = ?', $this->dataRecord['database_user_id']); - if($user_old_rec) { - $user_new_rec = $user_old_rec; - $user_new_rec['server_id'] = $this->dataRecord['server_id']; - $app->db->datalogSave('web_database_user', 'UPDATE', 'database_user_id', $this->dataRecord['database_user_id'], $user_old_rec, $user_new_rec); - } - } - if($this->dataRecord['database_ro_user_id']) { - $user_old_rec = $app->db->queryOneRecord('SELECT * FROM `web_database_user` WHERE `database_user_id` = ?', $this->dataRecord['database_ro_user_id']); - if($user_old_rec) { - $user_new_rec = $user_old_rec; - $user_new_rec['server_id'] = $this->dataRecord['server_id']; - $app->db->datalogSave('web_database_user', 'UPDATE', 'database_user_id', $this->dataRecord['database_ro_user_id'], $user_old_rec, $user_new_rec); - } - } - } - - - parent::onBeforeInsert(); + $this->onBeforeUpdate(); } function onInsertSave($sql) { From 18e43553522ab9541c4e87e58f09e9f1fd6e7982 Mon Sep 17 00:00:00 2001 From: Herman van Rink Date: Fri, 29 Dec 2023 10:27:12 +0100 Subject: [PATCH 277/621] Add mirror webservers to the remote IP whitelist, #6626 --- interface/web/sites/database_edit.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/interface/web/sites/database_edit.php b/interface/web/sites/database_edit.php index 16b3666e8e..cbb9d7e9de 100644 --- a/interface/web/sites/database_edit.php +++ b/interface/web/sites/database_edit.php @@ -374,6 +374,14 @@ function onBeforeUpdate() { } if (!in_array($server_config['ip_address'], $remote_ips)) { $remote_ips[] = $server_config['ip_address']; } + // If server has a slave ... add it. + $mirrors = $app->db->queryAllRecords("SELECT server_id FROM server WHERE mirror_server_id = ?", $tmp['server_id']); + foreach ($mirrors as $mirror) { + // we need remote access rights for this server, so get it's ip address + $mirror_server_config = $app->getconf->get_server_config($mirror['server_id'], 'server'); + if (!in_array($server_config['ip_address'], $remote_ips)) { $remote_ips[] = $mirror_server_config['ip_address']; } + } + if($server_config['ip_address']!='') { if($this->dataRecord['remote_access'] != 'y'){ $this->dataRecord['remote_ips'] = implode(',', $remote_ips); From 8543fd1cf1b1cf9a8b4c037671ae22918c73fb54 Mon Sep 17 00:00:00 2001 From: Michael Seevogel Date: Sat, 13 Jan 2024 11:45:27 +0100 Subject: [PATCH 278/621] clean up of php-ssh-cron branch --- install/sql/ispconfig3.sql | 2 +- interface/web/sites/cron_edit.php | 5 +- interface/web/sites/templates/cron_edit.htm | 4 +- interface/web/sites/templates/cron_list.htm | 10 +- server/conf/bash.bashrc.master | 3 +- server/conf/bashrc_el.master | 132 ++++++++++++++++++ server/lib/classes/system.inc.php | 38 ++--- .../cron_jailkit_plugin.inc.php | 97 ++++++++++--- server/plugins-available/cron_plugin.inc.php | 37 +++-- .../shelluser_base_plugin.inc.php | 111 +++++++-------- .../shelluser_jailkit_plugin.inc.php | 104 +++++++++++--- 11 files changed, 394 insertions(+), 149 deletions(-) create mode 100644 server/conf/bashrc_el.master diff --git a/install/sql/ispconfig3.sql b/install/sql/ispconfig3.sql index e9aa9aaeed..38234751a3 100644 --- a/install/sql/ispconfig3.sql +++ b/install/sql/ispconfig3.sql @@ -1460,7 +1460,7 @@ CREATE TABLE `server_php` ( `php_fpm_ini_dir` varchar(255) DEFAULT NULL, `php_fpm_pool_dir` varchar(255) DEFAULT NULL, `php_fpm_socket_dir` varchar(255) DEFAULT NULL, - `php_cli_binary` varchar(255) DEFAULT NULL, + `php_cli_binary` varchar(255) DEFAULT NULL, `active` enum('n','y') NOT NULL DEFAULT 'y', `sortprio` int(20) NOT NULL DEFAULT 100, PRIMARY KEY (`server_php_id`) diff --git a/interface/web/sites/cron_edit.php b/interface/web/sites/cron_edit.php index 62f338f33f..eea8bdff71 100644 --- a/interface/web/sites/cron_edit.php +++ b/interface/web/sites/cron_edit.php @@ -78,6 +78,7 @@ function onShowEnd() { $app->tpl->setVar("edit_disabled", 0); } + parent::onShowEnd(); } @@ -148,7 +149,7 @@ function onUpdateSave($sql) { $has_error = true; } } - + if($client["limit_cron_type"] == 'url' && $this->dataRecord["type"] != 'url') { $app->error($app->tform->wordbook["limit_cron_url_txt"]); $has_error = true; @@ -178,7 +179,7 @@ function onInsertSave($sql) { $has_error = true; } } - + if($client["limit_cron_type"] == 'url' && $this->dataRecord["type"] != 'url') { $app->error($app->tform->wordbook["limit_cron_url_txt"]); $has_error = true; diff --git a/interface/web/sites/templates/cron_edit.htm b/interface/web/sites/templates/cron_edit.htm index ffb0254681..66619831c4 100644 --- a/interface/web/sites/templates/cron_edit.htm +++ b/interface/web/sites/templates/cron_edit.htm @@ -51,8 +51,8 @@
- {tmpl_var name='variables_txt'}: {SITE_PHP}, {DOCROOT_CLIENT}, {DOMAIN} -

{tmpl_var name='command_hint_txt'}

+ {tmpl_var name='variables_txt'}: {SITE_PHP}, {DOCROOT_CLIENT}, {DOMAIN} +
diff --git a/interface/web/sites/templates/cron_list.htm b/interface/web/sites/templates/cron_list.htm index fbca26a844..7597e073d4 100644 --- a/interface/web/sites/templates/cron_list.htm +++ b/interface/web/sites/templates/cron_list.htm @@ -5,12 +5,12 @@

{tmpl_var name="toolsarea_head_txt"}

- + - - - + + +

@@ -55,7 +55,7 @@

diff --git a/server/conf/bash.bashrc.master b/server/conf/bash.bashrc.master index 4c5090ec55..9393bd9b50 100644 --- a/server/conf/bash.bashrc.master +++ b/server/conf/bash.bashrc.master @@ -62,11 +62,10 @@ fi #alias la='ls -A' #alias l='ls -CF' - + # Overwrite the PHP cli binaries by using $PATH: export PATH=:$PATH - alias php="" diff --git a/server/conf/bashrc_el.master b/server/conf/bashrc_el.master new file mode 100644 index 0000000000..7282b03f5d --- /dev/null +++ b/server/conf/bashrc_el.master @@ -0,0 +1,132 @@ +# /etc/bashrc + +# Taken from EL9 + +# System wide functions and aliases +# Environment stuff goes in /etc/profile + +# It's NOT a good idea to change this file unless you know what you +# are doing. It's much better to create a custom.sh shell script in +# /etc/profile.d/ to make custom changes to your environment, as this +# will prevent the need for merging in future updates. + + + +# Set some more environment variables, they are likely not set in Jailkit setups for EL. +export TERM="xterm" +export LESSOPEN="||/usr/bin/lesspipe.sh %s" + +dircolors -b >/dev/null + + + + +# Prevent doublesourcing +if [ -z "$BASHRCSOURCED" ]; then + BASHRCSOURCED="Y" + + # are we an interactive shell? + if [ "$PS1" ]; then + if [ -z "$PROMPT_COMMAND" ]; then + case $TERM in + xterm*|vte*) + if [ -e /etc/sysconfig/bash-prompt-xterm ]; then + PROMPT_COMMAND=/etc/sysconfig/bash-prompt-xterm + else + PROMPT_COMMAND='printf "\033]0;%s@%s:%s\007" "${USER}" "${HOSTNAME%%.*}" "${PWD/#$HOME/\~}"' + fi + ;; + screen*) + if [ -e /etc/sysconfig/bash-prompt-screen ]; then + PROMPT_COMMAND=/etc/sysconfig/bash-prompt-screen + else + PROMPT_COMMAND='printf "\033k%s@%s:%s\033\\" "${USER}" "${HOSTNAME%%.*}" "${PWD/#$HOME/\~}"' + fi + ;; + *) + [ -e /etc/sysconfig/bash-prompt-default ] && PROMPT_COMMAND=/etc/sysconfig/bash-prompt-default + ;; + esac + fi + # Turn on parallel history + shopt -s histappend + history -a + # Turn on checkwinsize + shopt -s checkwinsize + [ "$PS1" = "\\s-\\v\\\$ " ] && PS1="[\u@\h \W]\\$ " + # You might want to have e.g. tty in prompt (e.g. more virtual machines) + # and console windows + # If you want to do so, just add e.g. + # if [ "$PS1" ]; then + # PS1="[\u@\h:\l \W]\\$ " + # fi + # to your custom modification shell script in /etc/profile.d/ directory + fi + + if ! shopt -q login_shell ; then # We're not a login shell + # Need to redefine pathmunge, it gets undefined at the end of /etc/profile + pathmunge () { + case ":${PATH}:" in + *:"$1":*) + ;; + *) + if [ "$2" = "after" ] ; then + PATH=$PATH:$1 + else + PATH=$1:$PATH + fi + esac + } + + # Set default umask for non-login shell only if it is set to 0 + [ `umask` -eq 0 ] && umask 022 + + SHELL=/bin/bash + # Only display echos from profile.d scripts if we are no login shell + # and interactive - otherwise just process them to set envvars + for i in /etc/profile.d/*.sh; do + if [ -r "$i" ]; then + if [ "$PS1" ]; then + . "$i" + else + . "$i" >/dev/null + fi + fi + done + + unset i + unset -f pathmunge + fi + +fi + + +## Hack for Jailkit User to change back to the logged in user ## +if [ -n "$LOGNAME" ]; then + if [ "$LOGNAME" != $USER ]; then + export HOME=$LOGNAME + export USER=$LOGNAME + export USERNAME=$LOGNAME + cd $HOME + fi +fi + +## Change machine hostname to site domain ## +export HOSTNAME= + + + + +# Overwrite the PHP cli binaries by using $PATH: +export PATH=:$PATH + + +alias php="" + + +### Hack to source a custom bashrc +#if [ -f ~/.bashrc_ispcuser ]; then +# . ~/.bashrc_ispcuser +#fi + +# vim:ts=4:sw=4 diff --git a/server/lib/classes/system.inc.php b/server/lib/classes/system.inc.php index b2c6357d8f..5ba578a023 100644 --- a/server/lib/classes/system.inc.php +++ b/server/lib/classes/system.inc.php @@ -2064,7 +2064,7 @@ function umount_backup_dir($backup_dir, $mount_cmd = '/usr/local/ispconfig/serve function _getinitcommand($servicename, $action, $init_script_directory = '', $check_service) { global $conf, $app; - + // upstart /* removed upstart support - deprecated if(is_executable('/sbin/initctl')){ @@ -2072,7 +2072,7 @@ function _getinitcommand($servicename, $action, $init_script_directory = '', $ch if(intval($retval['retval']) == 0) return 'service '.$servicename.' '.$action; } */ - + if(!in_array($action,array('start','stop','restart','reload','force-reload'))) { $app->log('Invalid init command action '.$action,LOGLEVEL_WARN); return false; @@ -2081,10 +2081,10 @@ function _getinitcommand($servicename, $action, $init_script_directory = '', $ch //* systemd (now default in all supported OS) if(is_executable('/bin/systemd') || is_executable('/usr/bin/systemctl')){ $app->log('Trying to use Systemd to restart service',LOGLEVEL_DEBUG); - + //* Test service name via regex if(preg_match('/[a-zA-Z0-9\.\-\_]/',$servicename)) { - + //* Test if systemd service is enabled if ($check_service) { $this->exec_safe("systemctl is-enabled ? 2>&1", $servicename); @@ -2092,7 +2092,7 @@ function _getinitcommand($servicename, $action, $init_script_directory = '', $ch } else { $app->log('Systemd service '.$servicename.' not found or not enabled.',LOGLEVEL_DEBUG); } - + //* Return service command if ($ret_val == 0 || !$check_service) { return 'systemctl '.$action.' '.$servicename.'.service'; @@ -2108,69 +2108,69 @@ function _getinitcommand($servicename, $action, $init_script_directory = '', $ch //* sysvinit fallback $app->log('Using init script to restart service',LOGLEVEL_DEBUG); - + //* Get init script directory if($init_script_directory == '') $init_script_directory = $conf['init_scripts']; if(substr($init_script_directory, -1) === '/') $init_script_directory = substr($init_script_directory, 0, -1); $init_script_directory = realpath($init_script_directory); - + //* Check init script dir if(!is_dir($init_script_directory)) { $app->log('Init script directory '.$init_script_directory.' not found',LOGLEVEL_WARN); return false; } - + //* Forbidden init script paths if(substr($init_script_directory,0,4) == '/var' || substr($init_script_directory,0,4) == '/tmp') { $app->log('Do not put init scripts in /var or /tmp folder.',LOGLEVEL_WARN); return false; } - + //* Check init script dir owner if(fileowner($init_script_directory) !== 0) { $app->log('Init script directory '.$init_script_directory.' not owned by root user',LOGLEVEL_WARN); return false; } - + $full_init_script_path = realpath($init_script_directory.'/'.$servicename); - + //** Gentoo, keep symlink as init script, but do some checks - if(file_exists('/etc/gentoo-release')) { + if(file_exists('/etc/gentoo-release')) { //* check if init script is symlink - if(is_link($init_script_directory.'/'.$servicename)) { + if(is_link($init_script_directory.'/'.$servicename)) { //* Check init script owner (realpath, symlink is checked later) if(fileowner($full_init_script_path) !== 0) { $app->log('Init script '.$full_init_script_path.' not owned by root user',LOGLEVEL_WARN); return false; } - + //* full path is symlink $full_init_script_path_symlink = $init_script_directory.'/'.$servicename; - + //* check if realpath matches symlink if(strpos($full_init_script_path_symlink,$full_init_script_path) == 0) { $full_init_script_path = $full_init_script_path_symlink; } } } - + if($full_init_script_path == '') { $app->log('No init script, we quit here.',LOGLEVEL_WARN); return false; } - + //* Check init script if(!is_file($full_init_script_path)) { $app->log('Init script '.$full_init_script_path.' not found',LOGLEVEL_WARN); return false; } - + //* Check init script owner if(fileowner($full_init_script_path) !== 0) { $app->log('Init script '.$full_init_script_path.' not owned by root user',LOGLEVEL_WARN); return false; } - + if($check_service && is_executable($full_init_script_path)) { return $full_init_script_path.' '.$action; } diff --git a/server/plugins-available/cron_jailkit_plugin.inc.php b/server/plugins-available/cron_jailkit_plugin.inc.php index 08f039b371..5d6638b9e3 100644 --- a/server/plugins-available/cron_jailkit_plugin.inc.php +++ b/server/plugins-available/cron_jailkit_plugin.inc.php @@ -77,7 +77,8 @@ function insert($event_name, $data) { } //* get data from web - $parent_domain = $app->db->queryOneRecord("SELECT * FROM `web_domain` WHERE `domain_id` = ?", $data["new"]["parent_domain_id"]); + $parent_domain = $app->db->queryOneRecord("SELECT * FROM web_domain LEFT JOIN server_php ON web_domain.server_php_id = server_php.server_php_id WHERE domain_id = ?", $data["new"]["parent_domain_id"]); + if(!$parent_domain["domain_id"]) { $app->log("Parent domain not found", LOGLEVEL_WARN); return 0; @@ -92,6 +93,8 @@ function insert($event_name, $data) { $this->parent_domain = $parent_domain; + $this->cronjob_id = $data['new']['id']; + $app->uses('system'); if($app->system->is_user($parent_domain['system_user'])) { @@ -121,6 +124,8 @@ function insert($event_name, $data) { $this->_add_jailkit_user(); + $this->_add_bashrc_jailkit(); + $command .= 'usermod -U ? 2>/dev/null'; $app->system->exec_safe($command, $parent_domain["system_user"]); @@ -145,8 +150,10 @@ function update($event_name, $data) { $app->log("Parent domain not set", LOGLEVEL_WARN); return 0; } + //* get data from web - $parent_domain = $app->db->queryOneRecord("SELECT * FROM `web_domain` WHERE `domain_id` = ?", $data["new"]["parent_domain_id"]); + $parent_domain = $app->db->queryOneRecord("SELECT * FROM web_domain LEFT JOIN server_php ON web_domain.server_php_id = server_php.server_php_id WHERE domain_id = ?", $data["new"]["parent_domain_id"]); + if(!$parent_domain["domain_id"]) { $app->log("Parent domain not found", LOGLEVEL_WARN); return 0; @@ -161,6 +168,8 @@ function update($event_name, $data) { $this->parent_domain = $parent_domain; + $this->cronjob_id = $data['new']['id']; + if($app->system->is_user($parent_domain['system_user'])) { @@ -189,6 +198,8 @@ function update($event_name, $data) { $this->_add_jailkit_user(); + $this->_add_bashrc_jailkit(); + $this->_update_website_security_level(); $app->system->web_folder_protection($parent_domain['document_root'], true); @@ -253,33 +264,15 @@ function _setup_jailkit_chroot() // check if the chroot environment is created yet if not create it with a list of program sections from the config if (!is_dir($this->parent_domain['document_root'].'/etc/jailkit')) { + $app->system->create_jailkit_chroot($this->parent_domain['document_root'], $this->jailkit_config['jailkit_chroot_app_sections'], $options); $app->log("Added jailkit chroot", LOGLEVEL_DEBUG); $this->_add_jailkit_programs($options); - $app->load('tpl'); - - $tpl = new tpl(); - $tpl->newTemplate("bash.bashrc.master"); - - $tpl->setVar('jailkit_chroot', true); - $tpl->setVar('domain', $this->parent_domain['domain']); - $tpl->setVar('home_dir', $this->_get_home_dir("")); - - $bashrc = $this->parent_domain['document_root'].'/etc/bash.bashrc'; - if(@is_file($bashrc) || @is_link($bashrc)) unlink($bashrc); - - $app->system->file_put_contents($bashrc, $tpl->grab()); - unset($tpl); - - $app->log('Added bashrc script: '.$bashrc, LOGLEVEL_DEBUG); - $tpl = new tpl(); $tpl->newTemplate('motd.master'); - $tpl->setVar('domain', $this->parent_domain['domain']); - $motd = $this->parent_domain['document_root'].'/var/run/motd'; if(@is_file($motd) || @is_link($motd)) unlink($motd); @@ -303,6 +296,7 @@ function _setup_jailkit_chroot() } $app->system->update_jailkit_chroot($this->parent_domain['document_root'], $sections, $programs, $options); + } // this gets last_jailkit_update out of sync with master db, but that is ok, @@ -373,6 +367,67 @@ function _update_website_security_level() { } } + function _add_bashrc_jailkit() { + global $app; + + // Create .bashrc file + $app->load('tpl'); + + $tpl = new tpl(); + + // /etc/bash.bashrc is not supported by Red Hat OS + if($app->system->is_redhat_os() == true) { + $tpl->newTemplate("bashrc_el.master"); + } else { + $tpl->newTemplate("bash.bashrc.master"); + } + + // Predefine some template vars + $tpl->setVar('jailkit_chroot', true); + $tpl->setVar('domain', $this->parent_domain['domain']); + $tpl->setVar('home_dir', $this->_get_home_dir("")); + + $tpl->setVar('use_php_path', false); + $tpl->setVar('use_php_alias', false); + + $php_bin_dir = dirname($this->parent_domain['php_cli_binary']); + + if(!file_exists($this->_get_home_dir($this->parent_domain['system_user']))) $this->_add_jailkit_user(); + + + if(($this->parent_domain['server_php_id'] > 0) && !empty($this->parent_domain['php_cli_binary'])) { + if(preg_match('/^(\/usr\/(s)?bin|\/(s)?bin)/', $php_bin_dir)) { + $tpl->setVar('use_php_path', false); + $tpl->setVar('use_php_alias', true); + $tpl->setVar('php_alias', $this->parent_domain['php_cli_binary']); + } else { + $tpl->setVar('use_php_path', true); + $tpl->setVar('use_php_alias', false); + $tpl->setVar('php_bin_dir', $php_bin_dir); + } + + if(!file_exists($this->parent_domain['document_root'] . '/' . $this->parent_domain['php_cli_binary'])) { + $app->log("The PHP cli binary " . $this->parent_domain['php_cli_binary'] . " is not available in the jail of the web " . $this->parent_domain['domain'] . " / cronjob_id: " . $this->cronjob_id . ". Check your Jailkit setup!", LOGLEVEL_DEBUG); + $tpl->setVar('use_php_path', false); + $tpl->setVar('use_php_alias', false); + } + } + + if($app->system->is_redhat_os() == true) { + $bashrc = $this->parent_domain['document_root'] . '/home/' . $this->parent_domain['system_user'] . '/.bashrc'; + } else { + $bashrc = $this->parent_domain['document_root'] . '/etc/bash.bashrc'; + } + + if(@is_file($bashrc) || @is_link($bashrc)) unlink($bashrc); + file_put_contents($bashrc, $tpl->grab()); + $app->log("Added bashrc script: " . $bashrc, LOGLEVEL_DEBUG); + + unset($tpl); + + } + + private function _delete_jailkit_if_unused($parent_domain_id) { global $app, $conf; diff --git a/server/plugins-available/cron_plugin.inc.php b/server/plugins-available/cron_plugin.inc.php index 853f222046..9186ae31c9 100644 --- a/server/plugins-available/cron_plugin.inc.php +++ b/server/plugins-available/cron_plugin.inc.php @@ -171,6 +171,7 @@ function update($event_name, $data) { $this->parent_domain = $parent_domain; + $this->_write_crontab(); $this->action = ''; @@ -207,6 +208,7 @@ function _write_crontab() { $app->uses("getconf"); $cron_config = $app->getconf->get_server_config($conf["server_id"], 'cron'); + $web_config = $app->getconf->get_server_config($conf["server_id"], 'web'); //* try to find customer's mail address @@ -249,33 +251,44 @@ function _write_crontab() { continue; } - $web_root = ''; + $web_docroot_client = ''; + + $web_domain = $this->parent_domain['domain']; + + // web folder is hardcoded to /web: + $web_folder = '/web'; + if($job['type'] == 'chrooted') { if(substr($job['command'], 0, strlen($this->parent_domain['document_root'])) == $this->parent_domain['document_root']) { //* delete the unneeded path part $job['command'] = substr($job['command'], strlen($this->parent_domain['document_root'])); } } else { - $web_root = $this->parent_domain['document_root']; + $web_docroot_client = $this->parent_domain['document_root']; } - $web_domain = $this->parent_domain['domain']; - if($this->parent_domain['php_cli_binary'] == '' || $job['type'] == 'chrooted') { - // PHP cli binary not set or default was selected or it is a chrooted web, fallback to just "php" - $web_php_cli = 'php'; - $app->log("PHP CLI binary not set for the website\'s selected PHP version or Default was selected. Falling back to \"php\" for cronjob id " . $job['id'], LOGLEVEL_DEBUG); + if(empty($this->parent_domain['php_cli_binary'])) { + // PHP cli binary not set or default was selected, fallback to "/usr/bin/php" + $web_php_cli = '/usr/bin/php'; + $app->log("PHP CLI binary not set for the website\'s selected PHP version or Default was selected. Fall back to \"/usr/bin/php\" for cronjob id " . $job['id'], LOGLEVEL_DEBUG); + if($job['type'] == 'chrooted') { + if(!file_exists($this->parent_domain['document_root'] . $web_php_cli)) { + echo $this->parent_domain['document_root'] . $web_php_cli."\n\n\n\n"; + $app->log("The PHP cli binary " . $web_php_cli . " is not available in the jail of the web " . $web_domain . " / cronjob_id: " . $job['id'] . ". Check your Jailkit setup!", LOGLEVEL_DEBUG); + } + } } else { $web_php_cli = $this->parent_domain['php_cli_binary']; } - $web_root .= '/web'; + $web_docroot_client .= $web_folder; $trans = array( - '[web_root]' => $web_root, - '{DOCROOT_CLIENT}' => $web_root, - '{DOMAIN}' => $web_domain, + '[web_root]' => $web_docroot_client, + '{DOCROOT_CLIENT}' => $web_docroot_client, + '{DOMAIN}' => $web_domain, '{SITE_PHP}' => $web_php_cli - ); + ); $job['command'] = strtr($job['command'], $trans); diff --git a/server/plugins-available/shelluser_base_plugin.inc.php b/server/plugins-available/shelluser_base_plugin.inc.php index 6b0f14fd71..f73414f7d5 100755 --- a/server/plugins-available/shelluser_base_plugin.inc.php +++ b/server/plugins-available/shelluser_base_plugin.inc.php @@ -169,36 +169,10 @@ function insert($event_name, $data) { $app->system->chown($homedir.'/.profile', $data['new']['username']); $app->system->chgrp($homedir.'/.profile', $data['new']['pgroup']); - $app->load('tpl'); - - $tpl = new tpl(); - $tpl->newTemplate("bash.bashrc.master"); - - $tpl->setVar('jailkit_chroot', false); - $tpl->setVar('domain', $web['domain']); - //$tpl->setVar('home_dir', $this->_get_home_dir("")); - - if($web['server_php_id'] > 0) { - $tpl->setVar('use_site_php', true); - $tpl->setVar('php_bin_dir', $php_bin_dir); - } else { - $tpl->setVar('use_site_php', false); + if($data['new']['chroot'] != "jailkit") { + $this->_add_bashrc_base(); } - $bashrc = $this->data['new']['dir'].'/etc/bash.bashrc'; - if(@is_file($bashrc) || @is_link($bashrc)) unlink($bashrc); - - //file_put_contents($bashrc, $tpl->grab()); - $app->system->file_put_contents($bashrc, $tpl->grab()); - unset($tpl); - - $app->log("Added bashrc script: ".$bashrc, LOGLEVEL_DEBUG); - - - - - - // Create symlinks for conveniance, SFTP user should not land in an empty dir. symlink('../../web', $homedir.'/web'); symlink('../../log', $homedir.'/log'); @@ -234,7 +208,9 @@ function update($event_name, $data) { //* Check if the resulting path is inside the docroot $web = $app->db->queryOneRecord("SELECT * FROM web_domain LEFT JOIN server_php ON web_domain.server_php_id = server_php.server_php_id WHERE `domain_id` = ?", $data["new"]["parent_domain_id"]); - //$web = $app->db->queryOneRecord("SELECT * FROM web_domain WHERE domain_id = ?", $data['new']['parent_domain_id']); + + $this->web = $web; + if(substr($data['new']['dir'],0,strlen($web['document_root'])) != $web['document_root']) { $app->log('Directory of the shell user is outside of website docroot.',LOGLEVEL_WARN); return false; @@ -332,41 +308,10 @@ function update($event_name, $data) { $app->system->chgrp($homedir.'/.profile', $data['new']['pgroup']); } - // Create .bashrc file - $app->load('tpl'); - - $tpl = new tpl(); - $tpl->newTemplate("bash.bashrc.master"); - - // This is not a Jailkit chroot - $tpl->setVar('jailkit_chroot', false); - $php_bin_dir = dirname($web['php_cli_binary']); - - // FIXME: Check if we need to add an additional field for the path environment variable that contains the path to the php binary - if($web['server_php_id'] > 0) { - if(preg_match('/^(\/usr\/(s)?bin|\/(s)?bin)/', $php_bin_dir)) - { - $tpl->setVar('use_site_php', false); - $tpl->setVar('use_php_alias', true); - $tpl->setVar('php_alias', $web['php_cli_binary']); - } else { - $tpl->setVar('use_site_php', true); - $tpl->setVar('use_php_alias', false); - $tpl->setVar('php_bin_dir', $php_bin_dir); - } - } else { - $tpl->setVar('use_site_php', false); - $tpl->setVar('use_php_alias', false); + if($data['new']['chroot'] != "jailkit") { + $this->_add_bashrc_base(); } - $bashrc = $homedir .'/.bashrc'; - if(@is_file($bashrc) || @is_link($bashrc)) unlink($bashrc); - - file_put_contents($bashrc, $tpl->grab()); - unset($tpl); - - $app->log("Added bashrc script: ".$bashrc, LOGLEVEL_DEBUG); - //* Add webfolder protection again $app->system->web_folder_protection($web['document_root'], true); } else { @@ -604,6 +549,48 @@ private function _setup_ssh_rsa() { } + function _add_bashrc_base() { + global $app; + + // Create .bashrc file + $app->load('tpl'); + + $tpl = new tpl(); + $tpl->newTemplate("bash.bashrc.master"); + + // Predefine some template vars + $tpl->setVar('jailkit_chroot', false); + $tpl->setVar('use_php_path', false); + $tpl->setVar('use_php_alias', false); + + $php_bin_dir = dirname($this->web['php_cli_binary']); + + if(($this->web['server_php_id'] > 0) && !empty($this->web['php_cli_binary'])) { + if(preg_match('/^(\/usr\/(s)?bin|\/(s)?bin)/', $php_bin_dir)) + { + $tpl->setVar('use_php_path', false); + $tpl->setVar('use_php_alias', true); + $tpl->setVar('php_alias', $this->web['php_cli_binary']); + } else { + $tpl->setVar('use_php_path', true); + $tpl->setVar('use_php_alias', false); + $tpl->setVar('php_bin_dir', $php_bin_dir); + } + + } elseif(($this->web['server_php_id'] > 0) && empty($this->web['php_cli_binary'])) { + $app->log("The PHP cli binary is not set for the selected PHP version. Affected web: " . $this->web['domain'], LOGLEVEL_DEBUG); + } + + $bashrc = $this->data['new']['dir'] . '/home/' . $this->data['new']['username'] . '/.bashrc'; + + if(@is_file($bashrc) || @is_link($bashrc)) unlink($bashrc); + + file_put_contents($bashrc, $tpl->grab()); + $app->log("Added bashrc script: " . $bashrc, LOGLEVEL_DEBUG); + unset($tpl); + + } + } // end class ?> diff --git a/server/plugins-available/shelluser_jailkit_plugin.inc.php b/server/plugins-available/shelluser_jailkit_plugin.inc.php index 285df2bbc6..0f9313eae5 100755 --- a/server/plugins-available/shelluser_jailkit_plugin.inc.php +++ b/server/plugins-available/shelluser_jailkit_plugin.inc.php @@ -82,9 +82,13 @@ function insert($event_name, $data) { } - //$web = $app->db->queryOneRecord("SELECT * FROM web_domain WHERE domain_id = ?", $data['new']['parent_domain_id']); + $web = $app->db->queryOneRecord("SELECT * FROM web_domain LEFT JOIN server_php ON web_domain.server_php_id = server_php.server_php_id WHERE `domain_id` = ?", $data["new"]["parent_domain_id"]); + $this->web = $web; + + $this->username = $data['new']['username']; + if(!$app->system->is_allowed_user($data['new']['username'], false, false) || !$app->system->is_allowed_user($data['new']['puser'], true, true) || !$app->system->is_allowed_group($data['new']['pgroup'], true, true)) { @@ -137,6 +141,8 @@ function insert($event_name, $data) { //* call the ssh-rsa update function $this->_setup_ssh_rsa(); + $this->_add_bashrc_jailkit(); + $app->system->usermod($data['new']['username'], 0, 0, '', '/usr/sbin/jk_chrootsh', '', ''); //* Unlock user @@ -191,9 +197,14 @@ function update($event_name, $data) { } if($app->system->is_user($data['new']['puser'])) { - //$web = $app->db->queryOneRecord("SELECT * FROM web_domain WHERE domain_id = ?", $data['new']['parent_domain_id']); + + $web = $app->db->queryOneRecord("SELECT * FROM web_domain LEFT JOIN server_php ON web_domain.server_php_id = server_php.server_php_id WHERE `domain_id` = ?", $data["new"]["parent_domain_id"]); + $this->web = $web; + + $this->username = $data['new']['username']; + // Get the UID of the parent user $uid = intval($app->system->getuid($data['new']['puser'])); if($uid > $this->min_uid) { @@ -225,6 +236,8 @@ function update($event_name, $data) { $this->_add_jailkit_user(); + $this->_add_bashrc_jailkit(); + //* call the ssh-rsa update function $this->_setup_ssh_rsa(); @@ -349,25 +362,6 @@ function _setup_jailkit_chroot() $this->_add_jailkit_programs($options); - $app->load('tpl'); - - $tpl = new tpl(); - $tpl->newTemplate("bash.bashrc.master"); - - $tpl->setVar('jailkit_chroot', true); - $tpl->setVar('domain', $web['domain']); - $tpl->setVar('home_dir', $this->_get_home_dir("")); - - $bashrc = $this->data['new']['dir'].'/etc/bash.bashrc'; - if(@is_file($bashrc) || @is_link($bashrc)) unlink($bashrc); - - file_put_contents($bashrc, $tpl->grab()); - - - unset($tpl); - - $app->log("Added bashrc script: ".$bashrc, LOGLEVEL_DEBUG); - $tpl = new tpl(); $tpl->newTemplate("motd.master"); @@ -396,6 +390,8 @@ function _setup_jailkit_chroot() } $app->system->update_jailkit_chroot($this->data['new']['dir'], $sections, $programs, $options); + + } // this gets last_jailkit_update out of sync with master db, but that is ok, @@ -462,13 +458,13 @@ function _add_jailkit_user() $app->system->chown($this->data['new']['dir'].$jailkit_chroot_userhome, $this->data['new']['username']); $app->system->chgrp($this->data['new']['dir'].$jailkit_chroot_userhome, $this->data['new']['pgroup']); - $app->log("Added created jailkit user home in : ".$this->data['new']['dir'].$jailkit_chroot_userhome, LOGLEVEL_DEBUG); + $app->log("Added created jailkit user home in: ".$this->data['new']['dir'].$jailkit_chroot_userhome, LOGLEVEL_DEBUG); if(!is_dir($this->data['new']['dir'].$jailkit_chroot_puserhome)) mkdir($this->data['new']['dir'].$jailkit_chroot_puserhome, 0750, true); $app->system->chown($this->data['new']['dir'].$jailkit_chroot_puserhome, $this->data['new']['puser']); $app->system->chgrp($this->data['new']['dir'].$jailkit_chroot_puserhome, $this->data['new']['pgroup']); - $app->log("Added jailkit parent user home in : ".$this->data['new']['dir'].$jailkit_chroot_puserhome, LOGLEVEL_DEBUG); + $app->log("Added jailkit parent user home in: ".$this->data['new']['dir'].$jailkit_chroot_puserhome, LOGLEVEL_DEBUG); } @@ -680,6 +676,68 @@ private function _delete_jailkit_if_unused($parent_domain_id) { $app->db->query("UPDATE `web_domain` SET `last_jailkit_update` = NOW(), `last_jailkit_hash` = NULL WHERE `document_root` = ?", $parent_domain['document_root']); } + + + function _add_bashrc_jailkit() { + global $app; + + // Create .bashrc file + $app->load('tpl'); + + $tpl = new tpl(); + + // /etc/bash.bashrc is not supported by Red Hat OS + if($app->system->is_redhat_os() == true) { + $tpl->newTemplate("bashrc_el.master"); + } else { + $tpl->newTemplate("bash.bashrc.master"); + } + + // Predefine some template vars + $tpl->setVar('jailkit_chroot', true); + $tpl->setVar('domain', $this->web['domain']); + $tpl->setVar('home_dir', $this->_get_home_dir("")); + + $tpl->setVar('use_php_path', false); + $tpl->setVar('use_php_alias', false); + + $php_bin_dir = dirname($this->web['php_cli_binary']); + + if(!file_exists($this->_get_home_dir($this->web['system_user']))) $this->_add_jailkit_user(); + + if(($this->web['server_php_id'] > 0) && !empty($this->web['php_cli_binary'])) { + if(preg_match('/^(\/usr\/(s)?bin|\/(s)?bin)/', $php_bin_dir)) { + $tpl->setVar('use_php_path', false); + $tpl->setVar('use_php_alias', true); + $tpl->setVar('php_alias', $this->web['php_cli_binary']); + } else { + $tpl->setVar('use_php_path', true); + $tpl->setVar('use_php_alias', false); + $tpl->setVar('php_bin_dir', $php_bin_dir); + } + + if(!file_exists($this->web['document_root'] . '/' . $this->web['php_cli_binary'])) { + $app->log("The PHP cli binary " . $this->web['php_cli_binary'] . " is not available in the jail of the web " . $this->web['domain'] . " / username: " . $this->username . ". Check your Jailkit setup!", LOGLEVEL_DEBUG); + $tpl->setVar('use_php_path', false); + $tpl->setVar('use_php_alias', false); + } + } + + if($app->system->is_redhat_os() == true) { + $bashrc = $this->web['document_root'] . '/home/' . $this->web['system_user'] . '/.bashrc'; + } else { + $bashrc = $this->web['document_root'] . '/etc/bash.bashrc'; + } + + if(@is_file($bashrc) || @is_link($bashrc)) unlink($bashrc); + file_put_contents($bashrc, $tpl->grab()); + $app->log("Added bashrc script: " . $bashrc, LOGLEVEL_DEBUG); + + unset($tpl); + + + } + } // end class ?> From 86f21484d2011186e080baa9f8804b3479a7a91f Mon Sep 17 00:00:00 2001 From: Michael Seevogel Date: Sun, 14 Jan 2024 12:07:32 +0100 Subject: [PATCH 279/621] remove debug line --- server/plugins-available/cron_plugin.inc.php | 1 - 1 file changed, 1 deletion(-) diff --git a/server/plugins-available/cron_plugin.inc.php b/server/plugins-available/cron_plugin.inc.php index 9186ae31c9..b0bc507b5e 100644 --- a/server/plugins-available/cron_plugin.inc.php +++ b/server/plugins-available/cron_plugin.inc.php @@ -273,7 +273,6 @@ function _write_crontab() { $app->log("PHP CLI binary not set for the website\'s selected PHP version or Default was selected. Fall back to \"/usr/bin/php\" for cronjob id " . $job['id'], LOGLEVEL_DEBUG); if($job['type'] == 'chrooted') { if(!file_exists($this->parent_domain['document_root'] . $web_php_cli)) { - echo $this->parent_domain['document_root'] . $web_php_cli."\n\n\n\n"; $app->log("The PHP cli binary " . $web_php_cli . " is not available in the jail of the web " . $web_domain . " / cronjob_id: " . $job['id'] . ". Check your Jailkit setup!", LOGLEVEL_DEBUG); } } From 3ac0d7c02bcd3915c9cac2f46c856b382baf7f56 Mon Sep 17 00:00:00 2001 From: Michael Seevogel Date: Sun, 14 Jan 2024 12:09:37 +0100 Subject: [PATCH 280/621] Backported the patches: [PATCH] Add placeholder values, update command_hint_txt to match [PATCH] Handle chrooted sites --- interface/web/sites/cron_edit.php | 23 +++++++++++++++++++++ interface/web/sites/lib/lang/en_cron.lng | 2 +- interface/web/sites/templates/cron_edit.htm | 7 +++++-- 3 files changed, 29 insertions(+), 3 deletions(-) diff --git a/interface/web/sites/cron_edit.php b/interface/web/sites/cron_edit.php index eea8bdff71..7a3e8a1461 100644 --- a/interface/web/sites/cron_edit.php +++ b/interface/web/sites/cron_edit.php @@ -78,6 +78,29 @@ function onShowEnd() { $app->tpl->setVar("edit_disabled", 0); } + $parent_domain = $app->db->queryOneRecord("SELECT `domain_id`, `system_user`, `system_group`, `domain`, `document_root`, `hd_quota`, `php_cli_binary` + FROM `web_domain` + LEFT JOIN server_php ON web_domain.server_php_id = server_php.server_php_id + WHERE `domain_id` = ?", $this->dataRecord["parent_domain_id"]); + + if(!$parent_domain["domain_id"]) { + $app->log("Parent domain not found", LOGLEVEL_WARN); + return 0; + } + + $web_docroot_client = ''; + + if($this->dataRecord['type'] != 'chrooted') { + $web_docroot_client = $this->parent_domain['document_root']; + } + + // web folder is hardcoded to /web: + $web_docroot_client .= '/web'; + + // Example values for placeholders. + $app->tpl->setVar("php_cli_binary", $parent_domain['php_cli_binary']); + $app->tpl->setVar("docroot_client", $web_docroot_client); + $app->tpl->setVar("domain", $parent_domain['domain']); parent::onShowEnd(); } diff --git a/interface/web/sites/lib/lang/en_cron.lng b/interface/web/sites/lib/lang/en_cron.lng index e912da82a5..ca98207ff5 100644 --- a/interface/web/sites/lib/lang/en_cron.lng +++ b/interface/web/sites/lib/lang/en_cron.lng @@ -19,7 +19,7 @@ $wb['run_wday_error_format'] = 'Invalid format for days of the week.'; $wb['command_error_format'] = 'Invalid command format. Please note that in case of an url call only http/https is allowed.'; $wb['unknown_fieldtype_error'] = 'An unknown field type has been used.'; $wb['server_id_error_empty'] = 'The server ID is empty.'; -$wb['command_hint_txt'] = 'e.g. /var/www/clients/clientX/webY/myscript.sh or https://www.mydomain.com/path/script.php, you can use [web_root] placeholder that is replaced by /var/www/clients/clientX/webY/web.'; +$wb['command_hint_txt'] = 'e.g. /var/www/clients/clientX/webY/myscript.sh or https://www.mydomain.com/path/script.php, you can include the placeholders above that will be replaced with their value. Hover over the variable to see it\'s expected value.'; $wb['log_output_txt'] = 'Log output'; $wb['limit_cron_url_txt'] = 'URL cron only. Please enter a URL starting with https:// as cron command.'; $wb['command_error_empty'] = 'Command is empty.'; diff --git a/interface/web/sites/templates/cron_edit.htm b/interface/web/sites/templates/cron_edit.htm index 66619831c4..2053f17104 100644 --- a/interface/web/sites/templates/cron_edit.htm +++ b/interface/web/sites/templates/cron_edit.htm @@ -51,8 +51,11 @@
- {tmpl_var name='variables_txt'}: {SITE_PHP}, {DOCROOT_CLIENT}, {DOMAIN} - + {tmpl_var name='variables_txt'}: + {SITE_PHP}, + {DOCROOT_CLIENT}, + {DOMAIN} +

{tmpl_var name='command_hint_txt'}

From 1b18d1fe1dac097d96d135bd3f0f654d75c6a1ae Mon Sep 17 00:00:00 2001 From: Herman van Rink Date: Tue, 16 Jan 2024 17:28:28 +0100 Subject: [PATCH 281/621] Avoid php warning, fixes #6629 --- server/plugins-available/bind_plugin.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/plugins-available/bind_plugin.inc.php b/server/plugins-available/bind_plugin.inc.php index 452ef1b9ae..ac71f35cc4 100644 --- a/server/plugins-available/bind_plugin.inc.php +++ b/server/plugins-available/bind_plugin.inc.php @@ -402,7 +402,7 @@ function soa_update($event_name, $data) { } //* Restart bind nameserver if update_acl is not empty, otherwise reload it - if($data['new']['update_acl'] != '') { + if(!empty($data['new']['update_acl'])) { $app->services->restartServiceDelayed('bind', 'restart'); } else { $app->services->restartServiceDelayed('bind', 'reload'); From cb23b7349cceec5c4ae06f5bac2f29aa1d88111a Mon Sep 17 00:00:00 2001 From: Michael Seevogel Date: Sun, 21 Jan 2024 16:51:28 +0100 Subject: [PATCH 282/621] Update the placeholders when changing domains However, detection of cron_type needs some work --- interface/web/sites/ajax_get_json.php | 32 ++++++++++++++++++++- interface/web/sites/cron_edit.php | 20 ++++++------- interface/web/sites/lib/lang/de_cron.lng | 2 +- interface/web/sites/templates/cron_edit.htm | 27 +++++++++++++++-- 4 files changed, 66 insertions(+), 15 deletions(-) diff --git a/interface/web/sites/ajax_get_json.php b/interface/web/sites/ajax_get_json.php index f1d8433c8a..a5fef0edb0 100644 --- a/interface/web/sites/ajax_get_json.php +++ b/interface/web/sites/ajax_get_json.php @@ -41,6 +41,7 @@ $php_type = $_GET["php_type"]; $client_group_id = $app->functions->intval($_GET['client_group_id']); $type = $_GET["type"]; +$cron_type = $_GET["cron_type"]; //if($_SESSION["s"]["user"]["typ"] == 'admin') { @@ -248,7 +249,36 @@ $json = $app->functions->json_encode($client); } -//} +if($type == 'getcronplaceholders') { + + $web = $app->db->queryOneRecord("SELECT `domain`, `document_root`, `php_cli_binary` + FROM `web_domain` + LEFT JOIN server_php ON web_domain.server_php_id = server_php.server_php_id + WHERE `domain_id` = ? AND ".$app->tform->getAuthSQL('r'), $web_id); + + + + if($cron_type != 'chrooted') { + $web_docroot_client = $web['document_root']; + } else { + $web_docroot_client = ''; + } + + if(empty($web['php_cli_binary'])) { + $web['php_cli_binary'] = "/usr/bin/php"; + } + + $web_docroot_client .= '/web'; + + $json = json_encode(array( + 'php_cli_binary' => $web['php_cli_binary'], + 'docroot_client' => $web_docroot_client, + 'domain' => $web['domain'] + )); + + + +} header('Content-type: application/json'); echo $json; diff --git a/interface/web/sites/cron_edit.php b/interface/web/sites/cron_edit.php index 7a3e8a1461..bf67ae5748 100644 --- a/interface/web/sites/cron_edit.php +++ b/interface/web/sites/cron_edit.php @@ -79,21 +79,20 @@ function onShowEnd() { } $parent_domain = $app->db->queryOneRecord("SELECT `domain_id`, `system_user`, `system_group`, `domain`, `document_root`, `hd_quota`, `php_cli_binary` - FROM `web_domain` - LEFT JOIN server_php ON web_domain.server_php_id = server_php.server_php_id - WHERE `domain_id` = ?", $this->dataRecord["parent_domain_id"]); + FROM `web_domain` + LEFT JOIN server_php ON web_domain.server_php_id = server_php.server_php_id + WHERE `domain_id` = ?", $this->dataRecord["parent_domain_id"]); - if(!$parent_domain["domain_id"]) { - $app->log("Parent domain not found", LOGLEVEL_WARN); - return 0; - } - - $web_docroot_client = ''; if($this->dataRecord['type'] != 'chrooted') { - $web_docroot_client = $this->parent_domain['document_root']; + $web_docroot_client = $parent_domain['document_root']; + } else { + $web_docroot_client = ''; } + //TODO: Fix cron type detection + $app->tpl->setVar("cron_type", $this->dataRecord['type']); + // web folder is hardcoded to /web: $web_docroot_client .= '/web'; @@ -153,6 +152,7 @@ function onSubmit() { } } + parent::onSubmit(); } diff --git a/interface/web/sites/lib/lang/de_cron.lng b/interface/web/sites/lib/lang/de_cron.lng index 260744116a..e07a2432fc 100644 --- a/interface/web/sites/lib/lang/de_cron.lng +++ b/interface/web/sites/lib/lang/de_cron.lng @@ -19,7 +19,7 @@ $wb['run_wday_error_format'] = 'Das Format für Wochentage ist nicht korrekt.'; $wb['command_error_format'] = 'Das Format für den Befehl ist nicht korrekt. Beachten Sie, dass bei einem URL Aufruf nur http und https erlaubt ist.'; $wb['unknown_fieldtype_error'] = 'Es wurde ein unbekanntes Feld verwendet.'; $wb['server_id_error_empty'] = 'Die Server-ID ist leer.'; -$wb['command_hint_txt'] = 'z. B. /var/www/clients/clientX/webY/myscript.sh oder https://www.mydomain.com/path/script.php. Der Platzhalter [web_root] wird durch /var/www/clients/clientX/webY/web ersetzt.'; +$wb['command_hint_txt'] = 'z.B. /var/www/clients/clientX/webY/myscript.sh oder https://www.mydomain.com/path/script.php, können Sie die obigen Platzhalter einfügen, die dann durch ihren Wert ersetzt werden. Bewegen Sie den Mauszeiger über die Variable, um den erwarteten Wert zu sehen.'; $wb['log_output_txt'] = 'Ausgabe loggen'; $wb['limit_cron_url_txt'] = 'Es sind nur URL cronjobs möglich. Der Cron-Befehl muss mit https:// beginnen.'; $wb['command_error_empty'] = 'Befehl ist leer.'; diff --git a/interface/web/sites/templates/cron_edit.htm b/interface/web/sites/templates/cron_edit.htm index 2053f17104..34c0ef8360 100644 --- a/interface/web/sites/templates/cron_edit.htm +++ b/interface/web/sites/templates/cron_edit.htm @@ -52,9 +52,9 @@
{tmpl_var name='variables_txt'}: - {SITE_PHP}, - {DOCROOT_CLIENT}, - {DOMAIN} + {SITE_PHP}, + {DOCROOT_CLIENT}, + {DOMAIN}

{tmpl_var name='command_hint_txt'}

@@ -73,8 +73,29 @@ +
+ + + From 3d74e935e438f9dc5a508813eef411c85ece255d Mon Sep 17 00:00:00 2001 From: Michael Seevogel Date: Mon, 22 Jan 2024 13:32:58 +0100 Subject: [PATCH 283/621] Fixed jquery controlled chroot/full placeholders --- interface/web/sites/ajax_get_json.php | 48 ++++++++++++++------- interface/web/sites/cron_edit.php | 15 +++++-- interface/web/sites/lib/lang/ar_cron.lng | 1 + interface/web/sites/lib/lang/bg_cron.lng | 1 + interface/web/sites/lib/lang/br_cron.lng | 1 + interface/web/sites/lib/lang/ca_cron.lng | 1 + interface/web/sites/lib/lang/cn_cron.lng | 1 + interface/web/sites/lib/lang/cz_cron.lng | 1 + interface/web/sites/lib/lang/de_cron.lng | 3 +- interface/web/sites/lib/lang/dk_cron.lng | 2 +- interface/web/sites/lib/lang/el_cron.lng | 2 +- interface/web/sites/lib/lang/en_cron.lng | 2 +- interface/web/sites/lib/lang/es_cron.lng | 2 +- interface/web/sites/lib/lang/fi_cron.lng | 3 +- interface/web/sites/lib/lang/fr_cron.lng | 3 +- interface/web/sites/lib/lang/hr_cron.lng | 3 +- interface/web/sites/lib/lang/hu_cron.lng | 3 +- interface/web/sites/lib/lang/id_cron.lng | 3 +- interface/web/sites/lib/lang/it_cron.lng | 3 +- interface/web/sites/lib/lang/ja_cron.lng | 3 +- interface/web/sites/lib/lang/nl_cron.lng | 2 +- interface/web/sites/lib/lang/pl_cron.lng | 2 +- interface/web/sites/lib/lang/pt_cron.lng | 2 +- interface/web/sites/lib/lang/ro_cron.lng | 2 +- interface/web/sites/lib/lang/ru_cron.lng | 2 +- interface/web/sites/lib/lang/se_cron.lng | 2 +- interface/web/sites/lib/lang/sk_cron.lng | 2 +- interface/web/sites/lib/lang/tr_cron.lng | 2 +- interface/web/sites/templates/cron_edit.htm | 7 +-- 29 files changed, 79 insertions(+), 45 deletions(-) diff --git a/interface/web/sites/ajax_get_json.php b/interface/web/sites/ajax_get_json.php index a5fef0edb0..413f1cde55 100644 --- a/interface/web/sites/ajax_get_json.php +++ b/interface/web/sites/ajax_get_json.php @@ -251,33 +251,49 @@ if($type == 'getcronplaceholders') { - $web = $app->db->queryOneRecord("SELECT `domain`, `document_root`, `php_cli_binary` - FROM `web_domain` - LEFT JOIN server_php ON web_domain.server_php_id = server_php.server_php_id - WHERE `domain_id` = ? AND ".$app->tform->getAuthSQL('r'), $web_id); + $web_docroot_client = ''; + if($web_id > 0) { + $web = $app->db->queryOneRecord("SELECT wd.sys_groupid, wd.domain, wd.document_root, sp.php_cli_binary + FROM web_domain wd + LEFT JOIN server_php sp ON wd.server_php_id = sp.server_php_id + WHERE wd.domain_id = ? AND ".$app->tform->getAuthSQL('r'), $web_id); + $php_cli_binary = $web['php_cli_binary']; - if($cron_type != 'chrooted') { - $web_docroot_client = $web['document_root']; - } else { - $web_docroot_client = ''; - } + $domain = $web['domain']; - if(empty($web['php_cli_binary'])) { - $web['php_cli_binary'] = "/usr/bin/php"; + $domain_owner = $app->db->queryOneRecord("SELECT limit_cron_type FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = ?", $web["sys_groupid"]); + + //* True when the site is assigned to a client + if(isset($domain_owner["limit_cron_type"])) { + if($domain_owner["limit_cron_type"] == 'full') { + $cron_type = 'full'; + } else { + $cron_type = 'chrooted'; + } + } else { + //* True when the site is assigned to the admin + $cron_type = 'full'; + } + + if($cron_type != 'chrooted') { + $web_docroot_client = $web['document_root']; + } } $web_docroot_client .= '/web'; + if(empty($web['php_cli_binary'])) { + $php_cli_binary = "/usr/bin/php"; + } + $json = json_encode(array( - 'php_cli_binary' => $web['php_cli_binary'], + 'php_cli_binary' => $php_cli_binary, 'docroot_client' => $web_docroot_client, - 'domain' => $web['domain'] + //'cron_type' => $cron_type, + 'domain' => $domain )); - - - } header('Content-type: application/json'); diff --git a/interface/web/sites/cron_edit.php b/interface/web/sites/cron_edit.php index bf67ae5748..ebe2c97a32 100644 --- a/interface/web/sites/cron_edit.php +++ b/interface/web/sites/cron_edit.php @@ -83,6 +83,8 @@ function onShowEnd() { LEFT JOIN server_php ON web_domain.server_php_id = server_php.server_php_id WHERE `domain_id` = ?", $this->dataRecord["parent_domain_id"]); + $php_cli_binary = $parent_domain['php_cli_binary']; + $domain = $parent_domain['domain']; if($this->dataRecord['type'] != 'chrooted') { $web_docroot_client = $parent_domain['document_root']; @@ -90,16 +92,21 @@ function onShowEnd() { $web_docroot_client = ''; } - //TODO: Fix cron type detection - $app->tpl->setVar("cron_type", $this->dataRecord['type']); + if(empty($parent_domain['php_cli_binary'])) { + $php_cli_binary = "/usr/bin/php"; + } + + if(empty($parent_domain['domain'])) { + $domain = $app->tform->wordbook["domain_not_selected_placeholder_txt"]; + } // web folder is hardcoded to /web: $web_docroot_client .= '/web'; // Example values for placeholders. - $app->tpl->setVar("php_cli_binary", $parent_domain['php_cli_binary']); + $app->tpl->setVar("php_cli_binary", $php_cli_binary); $app->tpl->setVar("docroot_client", $web_docroot_client); - $app->tpl->setVar("domain", $parent_domain['domain']); + $app->tpl->setVar("domain", $domain); parent::onShowEnd(); } diff --git a/interface/web/sites/lib/lang/ar_cron.lng b/interface/web/sites/lib/lang/ar_cron.lng index 5cdf5ee15f..74911e8d03 100644 --- a/interface/web/sites/lib/lang/ar_cron.lng +++ b/interface/web/sites/lib/lang/ar_cron.lng @@ -23,4 +23,5 @@ $wb['limit_cron_url_txt'] = 'URL cron only. Please enter a URL starting with htt $wb['command_error_empty'] = 'Command is empty.'; $wb['command_hint_txt'] = 'e.g. /var/www/clients/clientX/webY/myscript.sh or https://www.mydomain.com/path/script.php, you can use [web_root] placeholder that is replaced by /var/www/clients/clientX/webY/web.'; $wb['log_output_txt'] = 'Log output'; +$wb['domain_not_selected_placeholder_txt'] = 'No Domain selected'; ?> diff --git a/interface/web/sites/lib/lang/bg_cron.lng b/interface/web/sites/lib/lang/bg_cron.lng index 2ab58ec6d2..fedfb73393 100644 --- a/interface/web/sites/lib/lang/bg_cron.lng +++ b/interface/web/sites/lib/lang/bg_cron.lng @@ -23,4 +23,5 @@ $wb['limit_cron_url_txt'] = 'URL cron only. Please enter a URL starting with htt $wb['command_error_empty'] = 'Command is empty.'; $wb['command_hint_txt'] = 'e.g. /var/www/clients/clientX/webY/myscript.sh or https://www.mydomain.com/path/script.php, you can use [web_root] placeholder that is replaced by /var/www/clients/clientX/webY/web.'; $wb['log_output_txt'] = 'Log output'; +$wb['domain_not_selected_placeholder_txt'] = 'No Domain selected'; ?> diff --git a/interface/web/sites/lib/lang/br_cron.lng b/interface/web/sites/lib/lang/br_cron.lng index 19aa1e96dc..263b3177aa 100644 --- a/interface/web/sites/lib/lang/br_cron.lng +++ b/interface/web/sites/lib/lang/br_cron.lng @@ -24,3 +24,4 @@ $wb['log_output_txt'] = 'Gravar saída do log'; $wb['limit_cron_url_txt'] = 'Somente URL no Cron. Por favor insira uma URL iniciando com https:// como um comando no Cron.'; $wb['command_error_empty'] = 'Comando a executar está vazio.'; $wb['Cron Job'] = 'Tarefas no Cron'; +$wb['domain_not_selected_placeholder_txt'] = 'No Domain selected'; diff --git a/interface/web/sites/lib/lang/ca_cron.lng b/interface/web/sites/lib/lang/ca_cron.lng index 4124abd16a..420c3390a2 100644 --- a/interface/web/sites/lib/lang/ca_cron.lng +++ b/interface/web/sites/lib/lang/ca_cron.lng @@ -23,4 +23,5 @@ $wb['limit_cron_url_txt'] = 'Cron de type URL seulement. Merci d\'introduire une $wb['command_error_empty'] = 'Le champ Commande à exécuter est vide.'; $wb['command_hint_txt'] = 'par exemple /var/www/clients/clientX/webY/monscript.sh ou https://www.mondomaine.com/chemin/script.php, vous pouvez utiliser la constante [web_root] qui sera remplacée par /var/www/clients/clientX/webY/web.'; $wb['log_output_txt'] = 'Journaliser la sortie du cron'; +$wb['domain_not_selected_placeholder_txt'] = 'No Domain selected'; ?> diff --git a/interface/web/sites/lib/lang/cn_cron.lng b/interface/web/sites/lib/lang/cn_cron.lng index 5b517d762e..65385864c3 100644 --- a/interface/web/sites/lib/lang/cn_cron.lng +++ b/interface/web/sites/lib/lang/cn_cron.lng @@ -23,4 +23,5 @@ $wb['command_hint_txt'] = '例如,/var/www/clients/clientX/webY/myscript.sh $wb['log_output_txt'] = '记录输出'; $wb['limit_cron_url_txt'] = '仅限 URL 计划任务。请将以 https:// 开头的 URL 作为计划任务命令输入。'; $wb['command_error_empty'] = '命令为空。'; +$wb['domain_not_selected_placeholder_txt'] = 'No Domain selected'; ?> diff --git a/interface/web/sites/lib/lang/cz_cron.lng b/interface/web/sites/lib/lang/cz_cron.lng index 8588408041..b98a4cbe2a 100644 --- a/interface/web/sites/lib/lang/cz_cron.lng +++ b/interface/web/sites/lib/lang/cz_cron.lng @@ -23,3 +23,4 @@ $wb['limit_cron_url_txt'] = 'URL cron only. Please enter a URL starting with htt $wb['command_error_empty'] = 'Command is empty.'; $wb['command_hint_txt'] = 'e.g. /var/www/clients/clientX/webY/myscript.sh or http://www.mydomain.com/path/script.php, you can use [web_root] placeholder that is replaced by /var/www/clients/clientX/webY/web.'; $wb['log_output_txt'] = 'Log output'; +$wb['domain_not_selected_placeholder_txt'] = 'No Domain selected'; diff --git a/interface/web/sites/lib/lang/de_cron.lng b/interface/web/sites/lib/lang/de_cron.lng index e07a2432fc..81f1f61e7d 100644 --- a/interface/web/sites/lib/lang/de_cron.lng +++ b/interface/web/sites/lib/lang/de_cron.lng @@ -24,4 +24,5 @@ $wb['log_output_txt'] = 'Ausgabe loggen'; $wb['limit_cron_url_txt'] = 'Es sind nur URL cronjobs möglich. Der Cron-Befehl muss mit https:// beginnen.'; $wb['command_error_empty'] = 'Befehl ist leer.'; $wb['variables_txt'] = 'Variablen'; -?> +$wb['domain_not_selected_placeholder_txt'] = 'Bitte wähle eine Domain aus'; + diff --git a/interface/web/sites/lib/lang/dk_cron.lng b/interface/web/sites/lib/lang/dk_cron.lng index ac290d4076..8b27dae089 100644 --- a/interface/web/sites/lib/lang/dk_cron.lng +++ b/interface/web/sites/lib/lang/dk_cron.lng @@ -23,4 +23,4 @@ $wb['limit_cron_url_txt'] = 'URL cron only. Please enter a URL starting with htt $wb['command_error_empty'] = 'Command er tom.'; $wb['command_hint_txt'] = 'e.g. /var/www/clients/clientX/webY/myscript.sh or https://www.mydomain.com/path/script.php, you can use [web_root] placeholder that is replaced by /var/www/clients/clientX/webY/web.'; $wb['log_output_txt'] = 'Log output'; -?> +$wb['domain_not_selected_placeholder_txt'] = 'No Domain selected'; diff --git a/interface/web/sites/lib/lang/el_cron.lng b/interface/web/sites/lib/lang/el_cron.lng index 9efec9d5ff..c014de779a 100644 --- a/interface/web/sites/lib/lang/el_cron.lng +++ b/interface/web/sites/lib/lang/el_cron.lng @@ -23,4 +23,4 @@ $wb['limit_cron_url_txt'] = 'URL cron only. Please enter a URL starting with htt $wb['command_error_empty'] = 'Command is empty.'; $wb['command_hint_txt'] = 'e.g. /var/www/clients/clientX/webY/myscript.sh or https://www.mydomain.com/path/script.php, you can use [web_root] placeholder that is replaced by /var/www/clients/clientX/webY/web.'; $wb['log_output_txt'] = 'Log output'; -?> +$wb['domain_not_selected_placeholder_txt'] = 'No Domain selected'; diff --git a/interface/web/sites/lib/lang/en_cron.lng b/interface/web/sites/lib/lang/en_cron.lng index ca98207ff5..2634a1c9c4 100644 --- a/interface/web/sites/lib/lang/en_cron.lng +++ b/interface/web/sites/lib/lang/en_cron.lng @@ -24,4 +24,4 @@ $wb['log_output_txt'] = 'Log output'; $wb['limit_cron_url_txt'] = 'URL cron only. Please enter a URL starting with https:// as cron command.'; $wb['command_error_empty'] = 'Command is empty.'; $wb['variables_txt'] = 'Variables'; -?> +$wb['domain_not_selected_placeholder_txt'] = 'No Domain selected'; diff --git a/interface/web/sites/lib/lang/es_cron.lng b/interface/web/sites/lib/lang/es_cron.lng index c8e2d567b4..2a53c6f64a 100644 --- a/interface/web/sites/lib/lang/es_cron.lng +++ b/interface/web/sites/lib/lang/es_cron.lng @@ -23,4 +23,4 @@ $wb['run_wday_txt'] = 'Días de la semana'; $wb['server_id_error_empty'] = 'La ID del servidor está vacía.'; $wb['server_id_txt'] = 'Servidor'; $wb['unknown_fieldtype_error'] = 'Se ha usado un tipo de campo desconocido.'; -?> +$wb['domain_not_selected_placeholder_txt'] = 'No Domain selected'; diff --git a/interface/web/sites/lib/lang/fi_cron.lng b/interface/web/sites/lib/lang/fi_cron.lng index cb019571b4..2b34c6c755 100644 --- a/interface/web/sites/lib/lang/fi_cron.lng +++ b/interface/web/sites/lib/lang/fi_cron.lng @@ -23,4 +23,5 @@ $wb['limit_cron_url_txt'] = 'URL cron only. Please enter a URL starting with htt $wb['command_error_empty'] = 'Command is empty.'; $wb['command_hint_txt'] = 'e.g. /var/www/clients/clientX/webY/myscript.sh or https://www.mydomain.com/path/script.php, you can use [web_root] placeholder that is replaced by /var/www/clients/clientX/webY/web.'; $wb['log_output_txt'] = 'Log output'; -?> +$wb['domain_not_selected_placeholder_txt'] = 'No Domain selected'; + diff --git a/interface/web/sites/lib/lang/fr_cron.lng b/interface/web/sites/lib/lang/fr_cron.lng index 4124abd16a..c05a02cc96 100644 --- a/interface/web/sites/lib/lang/fr_cron.lng +++ b/interface/web/sites/lib/lang/fr_cron.lng @@ -23,4 +23,5 @@ $wb['limit_cron_url_txt'] = 'Cron de type URL seulement. Merci d\'introduire une $wb['command_error_empty'] = 'Le champ Commande à exécuter est vide.'; $wb['command_hint_txt'] = 'par exemple /var/www/clients/clientX/webY/monscript.sh ou https://www.mondomaine.com/chemin/script.php, vous pouvez utiliser la constante [web_root] qui sera remplacée par /var/www/clients/clientX/webY/web.'; $wb['log_output_txt'] = 'Journaliser la sortie du cron'; -?> +$wb['domain_not_selected_placeholder_txt'] = 'No Domain selected'; + diff --git a/interface/web/sites/lib/lang/hr_cron.lng b/interface/web/sites/lib/lang/hr_cron.lng index 6ae8d6d3b8..a1ae73ae42 100644 --- a/interface/web/sites/lib/lang/hr_cron.lng +++ b/interface/web/sites/lib/lang/hr_cron.lng @@ -23,4 +23,5 @@ $wb['limit_cron_url_txt'] = 'Samo za URL cron. Unesite URL koji počinje sa http $wb['command_error_empty'] = 'Naredba je prazna.'; $wb['command_hint_txt'] = 'e.g. /var/www/clients/clientX/webY/myscript.sh or https://www.mydomain.com/path/script.php, you can use [web_root] placeholder that is replaced by /var/www/clients/clientX/webY/web.'; $wb['log_output_txt'] = 'Log output'; -?> +$wb['domain_not_selected_placeholder_txt'] = 'No Domain selected'; + diff --git a/interface/web/sites/lib/lang/hu_cron.lng b/interface/web/sites/lib/lang/hu_cron.lng index 29d3f87be3..4f76cc9fe4 100644 --- a/interface/web/sites/lib/lang/hu_cron.lng +++ b/interface/web/sites/lib/lang/hu_cron.lng @@ -23,4 +23,5 @@ $wb['limit_cron_url_txt'] = 'URL cron only. Please enter a URL starting with htt $wb['command_error_empty'] = 'Command is empty.'; $wb['command_hint_txt'] = 'e.g. /var/www/clients/clientX/webY/myscript.sh or https://www.mydomain.com/path/script.php, you can use [web_root] placeholder that is replaced by /var/www/clients/clientX/webY/web.'; $wb['log_output_txt'] = 'Log output'; -?> +$wb['domain_not_selected_placeholder_txt'] = 'No Domain selected'; + diff --git a/interface/web/sites/lib/lang/id_cron.lng b/interface/web/sites/lib/lang/id_cron.lng index d5e94fae21..113ebd1d20 100644 --- a/interface/web/sites/lib/lang/id_cron.lng +++ b/interface/web/sites/lib/lang/id_cron.lng @@ -23,4 +23,5 @@ $wb['limit_cron_url_txt'] = 'URL cron only. Please enter a URL starting with htt $wb['command_error_empty'] = 'Command is empty.'; $wb['command_hint_txt'] = 'e.g. /var/www/clients/clientX/webY/myscript.sh or https://www.mydomain.com/path/script.php, you can use [web_root] placeholder that is replaced by /var/www/clients/clientX/webY/web.'; $wb['log_output_txt'] = 'Log output'; -?> +$wb['domain_not_selected_placeholder_txt'] = 'No Domain selected'; + diff --git a/interface/web/sites/lib/lang/it_cron.lng b/interface/web/sites/lib/lang/it_cron.lng index ee38450186..5d46d2acbe 100644 --- a/interface/web/sites/lib/lang/it_cron.lng +++ b/interface/web/sites/lib/lang/it_cron.lng @@ -23,4 +23,5 @@ $wb['limit_cron_url_txt'] = 'Solo URL cron. Per cortesia inserire una URL che in $wb['command_error_empty'] = 'Command vuoto.'; $wb['command_hint_txt'] = 'esempio: /var/www/clients/clientX/webY/myscript.sh o https://www.mydomain.com/path/script.php, puoi usare [web_root] come sostitutivo che viene rimpiazzato da /var/www/clients/clientX/webY/web.'; $wb['log_output_txt'] = 'Log output'; -?> +$wb['domain_not_selected_placeholder_txt'] = 'No Domain selected'; + diff --git a/interface/web/sites/lib/lang/ja_cron.lng b/interface/web/sites/lib/lang/ja_cron.lng index 5cdf5ee15f..6dcc300f31 100644 --- a/interface/web/sites/lib/lang/ja_cron.lng +++ b/interface/web/sites/lib/lang/ja_cron.lng @@ -23,4 +23,5 @@ $wb['limit_cron_url_txt'] = 'URL cron only. Please enter a URL starting with htt $wb['command_error_empty'] = 'Command is empty.'; $wb['command_hint_txt'] = 'e.g. /var/www/clients/clientX/webY/myscript.sh or https://www.mydomain.com/path/script.php, you can use [web_root] placeholder that is replaced by /var/www/clients/clientX/webY/web.'; $wb['log_output_txt'] = 'Log output'; -?> +$wb['domain_not_selected_placeholder_txt'] = 'No Domain selected'; + diff --git a/interface/web/sites/lib/lang/nl_cron.lng b/interface/web/sites/lib/lang/nl_cron.lng index c79a3c2a0d..978b12778e 100644 --- a/interface/web/sites/lib/lang/nl_cron.lng +++ b/interface/web/sites/lib/lang/nl_cron.lng @@ -23,4 +23,4 @@ $wb['limit_cron_url_txt'] = 'URL cron only. Please enter a URL starting with htt $wb['command_error_empty'] = 'Command is empty.'; $wb['command_hint_txt'] = 'e.g. /var/www/clients/clientX/webY/myscript.sh or https://www.mydomain.com/path/script.php, you can use [web_root] placeholder that is replaced by /var/www/clients/clientX/webY/web.'; $wb['log_output_txt'] = 'Log output'; -?> +$wb['domain_not_selected_placeholder_txt'] = 'No Domain selected'; diff --git a/interface/web/sites/lib/lang/pl_cron.lng b/interface/web/sites/lib/lang/pl_cron.lng index d5f60d3e34..d82036ac1a 100644 --- a/interface/web/sites/lib/lang/pl_cron.lng +++ b/interface/web/sites/lib/lang/pl_cron.lng @@ -23,4 +23,4 @@ $wb['limit_cron_url_txt'] = 'URL cron only. Please enter a URL starting with htt $wb['command_error_empty'] = 'Command is empty.'; $wb['command_hint_txt'] = 'e.g. /var/www/clients/clientX/webY/myscript.sh or https://www.mydomain.com/path/script.php, you can use [web_root] placeholder that is replaced by /var/www/clients/clientX/webY/web.'; $wb['log_output_txt'] = 'Log output'; -?> +$wb['domain_not_selected_placeholder_txt'] = 'No Domain selected'; diff --git a/interface/web/sites/lib/lang/pt_cron.lng b/interface/web/sites/lib/lang/pt_cron.lng index 618f47fc8b..1edf37c509 100644 --- a/interface/web/sites/lib/lang/pt_cron.lng +++ b/interface/web/sites/lib/lang/pt_cron.lng @@ -23,4 +23,4 @@ $wb['limit_cron_url_txt'] = 'URL cron only. Please enter a URL starting with htt $wb['command_error_empty'] = 'Command is empty.'; $wb['command_hint_txt'] = 'e.g. /var/www/clients/clientX/webY/myscript.sh or https://www.mydomain.com/path/script.php, you can use [web_root] placeholder that is replaced by /var/www/clients/clientX/webY/web.'; $wb['log_output_txt'] = 'Log output'; -?> +$wb['domain_not_selected_placeholder_txt'] = 'No Domain selected'; diff --git a/interface/web/sites/lib/lang/ro_cron.lng b/interface/web/sites/lib/lang/ro_cron.lng index 5cdf5ee15f..6757f7b4fe 100644 --- a/interface/web/sites/lib/lang/ro_cron.lng +++ b/interface/web/sites/lib/lang/ro_cron.lng @@ -23,4 +23,4 @@ $wb['limit_cron_url_txt'] = 'URL cron only. Please enter a URL starting with htt $wb['command_error_empty'] = 'Command is empty.'; $wb['command_hint_txt'] = 'e.g. /var/www/clients/clientX/webY/myscript.sh or https://www.mydomain.com/path/script.php, you can use [web_root] placeholder that is replaced by /var/www/clients/clientX/webY/web.'; $wb['log_output_txt'] = 'Log output'; -?> +$wb['domain_not_selected_placeholder_txt'] = 'No Domain selected'; diff --git a/interface/web/sites/lib/lang/ru_cron.lng b/interface/web/sites/lib/lang/ru_cron.lng index 46a5a7dac8..3c7c2fc1df 100644 --- a/interface/web/sites/lib/lang/ru_cron.lng +++ b/interface/web/sites/lib/lang/ru_cron.lng @@ -23,4 +23,4 @@ $wb['limit_cron_url_txt'] = 'Только URL может быть в задан $wb['command_error_empty'] = 'Команда отсутствует.'; $wb['command_hint_txt'] = 'Например, /var/www/clients/clientX/webY/myscript.sh или https://www.mydomain.com/path/script.php, Вы можете использовать заполнитель [web_root], который заменяется на /var/www/clients/clientX/webY/web.'; $wb['log_output_txt'] = 'Журнал вывода'; -?> +$wb['domain_not_selected_placeholder_txt'] = 'No Domain selected'; diff --git a/interface/web/sites/lib/lang/se_cron.lng b/interface/web/sites/lib/lang/se_cron.lng index de4cb1f9cb..fec186582d 100644 --- a/interface/web/sites/lib/lang/se_cron.lng +++ b/interface/web/sites/lib/lang/se_cron.lng @@ -23,4 +23,4 @@ $wb['limit_cron_url_txt'] = 'URL cron only. Please enter a URL starting with htt $wb['command_error_empty'] = 'Kommandofältet är tomt.'; $wb['command_hint_txt'] = 'e.g. /var/www/clients/clientX/webY/myscript.sh or https://www.mydomain.com/path/script.php, you can use [web_root] placeholder that is replaced by /var/www/clients/clientX/webY/web.'; $wb['log_output_txt'] = 'Log output'; -?> +$wb['domain_not_selected_placeholder_txt'] = 'No Domain selected'; diff --git a/interface/web/sites/lib/lang/sk_cron.lng b/interface/web/sites/lib/lang/sk_cron.lng index f510b7e0ad..f635611113 100644 --- a/interface/web/sites/lib/lang/sk_cron.lng +++ b/interface/web/sites/lib/lang/sk_cron.lng @@ -23,4 +23,4 @@ $wb['limit_cron_url_txt'] = 'URL cron only. Please enter a URL starting with htt $wb['command_error_empty'] = 'Command is empty.'; $wb['command_hint_txt'] = 'e.g. /var/www/clients/clientX/webY/myscript.sh or https://www.mydomain.com/path/script.php, you can use [web_root] placeholder that is replaced by /var/www/clients/clientX/webY/web.'; $wb['log_output_txt'] = 'Log output'; -?> +$wb['domain_not_selected_placeholder_txt'] = 'No Domain selected'; diff --git a/interface/web/sites/lib/lang/tr_cron.lng b/interface/web/sites/lib/lang/tr_cron.lng index 6e97152184..3970c3e1eb 100644 --- a/interface/web/sites/lib/lang/tr_cron.lng +++ b/interface/web/sites/lib/lang/tr_cron.lng @@ -23,4 +23,4 @@ $wb['command_hint_txt'] = 'Örnek: /var/www/clients/musteriX/webY/betigim.sh ya $wb['log_output_txt'] = 'Günlük çıktısı'; $wb['limit_cron_url_txt'] = 'Yalnız İnternet adresli zamanlanmış görev kullanılabilir. Lütfen zamanlanmış görev komutu olarak https:// ile başlayan bir İnternet adresi yazın.'; $wb['command_error_empty'] = 'Komut boş olamaz.'; -?> +$wb['domain_not_selected_placeholder_txt'] = 'No Domain selected'; diff --git a/interface/web/sites/templates/cron_edit.htm b/interface/web/sites/templates/cron_edit.htm index 34c0ef8360..2a8f2b5b22 100644 --- a/interface/web/sites/templates/cron_edit.htm +++ b/interface/web/sites/templates/cron_edit.htm @@ -73,7 +73,6 @@ -
@@ -87,14 +86,12 @@ function reloadCronPlaceholders() { var parentDomainId = jQuery('#parent_domain_id').val() - var cron_type = jQuery('#cron_type').val() - jQuery.getJSON('sites/ajax_get_json.php'+ '?' + Math.round(new Date().getTime()), {web_id: parentDomainId, cron_type: cron_type, 'type': 'getcronplaceholders'}, function(data) { - console.log(data); + jQuery.getJSON('sites/ajax_get_json.php'+ '?' + Math.round(new Date().getTime()), {web_id: parentDomainId, 'type': 'getcronplaceholders'}, function(data) { + //console.log(data); $("#php_cli_binary").attr('data-original-title', data.php_cli_binary); $('#docroot_client').attr('data-original-title', data.docroot_client); $('#domain').attr('data-original-title', data.domain); - }); } From 3315b7dc6e9761b0c42b300ac29dec4087a13cd2 Mon Sep 17 00:00:00 2001 From: Michael Seevogel Date: Mon, 22 Jan 2024 13:35:15 +0100 Subject: [PATCH 284/621] Removed unnecessary GET --- interface/web/sites/ajax_get_json.php | 1 - 1 file changed, 1 deletion(-) diff --git a/interface/web/sites/ajax_get_json.php b/interface/web/sites/ajax_get_json.php index 413f1cde55..4cb6280454 100644 --- a/interface/web/sites/ajax_get_json.php +++ b/interface/web/sites/ajax_get_json.php @@ -41,7 +41,6 @@ $php_type = $_GET["php_type"]; $client_group_id = $app->functions->intval($_GET['client_group_id']); $type = $_GET["type"]; -$cron_type = $_GET["cron_type"]; //if($_SESSION["s"]["user"]["typ"] == 'admin') { From fd9b8930fb1d723ce960703159007020768e62b0 Mon Sep 17 00:00:00 2001 From: Michael Seevogel Date: Mon, 22 Jan 2024 15:17:18 +0100 Subject: [PATCH 285/621] Don't check permissions of the web when a user wants to create a new cronjob --- interface/web/sites/ajax_get_json.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/interface/web/sites/ajax_get_json.php b/interface/web/sites/ajax_get_json.php index 4cb6280454..2783f01f6c 100644 --- a/interface/web/sites/ajax_get_json.php +++ b/interface/web/sites/ajax_get_json.php @@ -253,10 +253,11 @@ $web_docroot_client = ''; if($web_id > 0) { + $web = $app->db->queryOneRecord("SELECT wd.sys_groupid, wd.domain, wd.document_root, sp.php_cli_binary FROM web_domain wd LEFT JOIN server_php sp ON wd.server_php_id = sp.server_php_id - WHERE wd.domain_id = ? AND ".$app->tform->getAuthSQL('r'), $web_id); + WHERE wd.domain_id = ?", $web_id); $php_cli_binary = $web['php_cli_binary']; From 8d58b8963640ac77eef9b4730c7aacda9406b2dd Mon Sep 17 00:00:00 2001 From: Michael Seevogel Date: Mon, 22 Jan 2024 22:21:10 +0100 Subject: [PATCH 286/621] Select and load placeholder data of the first existing domain --- interface/web/sites/templates/cron_edit.htm | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/interface/web/sites/templates/cron_edit.htm b/interface/web/sites/templates/cron_edit.htm index 2a8f2b5b22..fe5b2c27a5 100644 --- a/interface/web/sites/templates/cron_edit.htm +++ b/interface/web/sites/templates/cron_edit.htm @@ -80,6 +80,12 @@
From 4058fa9cf2544a29899bd8947ef4cecb9045cb40 Mon Sep 17 00:00:00 2001 From: Michael Seevogel Date: Sun, 28 Jan 2024 16:50:20 +0100 Subject: [PATCH 289/621] Fix issue #6633 Jailkit update on every cron change Patch by WHO --- server/plugins-available/cron_jailkit_plugin.inc.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/plugins-available/cron_jailkit_plugin.inc.php b/server/plugins-available/cron_jailkit_plugin.inc.php index 5d6638b9e3..667553c219 100644 --- a/server/plugins-available/cron_jailkit_plugin.inc.php +++ b/server/plugins-available/cron_jailkit_plugin.inc.php @@ -240,7 +240,7 @@ function delete($event_name, $data) { function _setup_jailkit_chroot() { - global $app; + global $app, $conf; if (isset($this->jailkit_config) && isset($this->jailkit_config['jailkit_hardlinks'])) { if ($this->jailkit_config['jailkit_hardlinks'] == 'yes') { @@ -286,7 +286,7 @@ function _setup_jailkit_chroot() $programs = $this->jailkit_config['jailkit_chroot_app_programs'] . ' ' . $this->jailkit_config['jailkit_chroot_cron_programs']; - if ($update_hash == $parent_domain['last_jailkit_hash']) { + if ($update_hash == $this->parent_domain['last_jailkit_hash']) { return; } From 242f3c94e53570a68cdf0dbc3601bd03eaad1fc7 Mon Sep 17 00:00:00 2001 From: Michael Seevogel Date: Sun, 28 Jan 2024 21:24:16 +0100 Subject: [PATCH 290/621] Update reloadCronPlaceholders() --- interface/web/sites/templates/cron_edit.htm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/interface/web/sites/templates/cron_edit.htm b/interface/web/sites/templates/cron_edit.htm index 7f9f05ae4f..9eef8091d8 100644 --- a/interface/web/sites/templates/cron_edit.htm +++ b/interface/web/sites/templates/cron_edit.htm @@ -95,11 +95,11 @@ //console.log(data); $("#php_cli_binary").attr('data-original-title', data.php_cli_binary); $('#docroot_client').attr('data-original-title', data.docroot_client); - // Load and display a hint to the user that no domain was selected yet. Should only happen if no web_domain has been created or assigned by the user. - if(data.domain == null || data.domain == '') { - $('#domain').attr('data-original-title', "{tmpl_var name='domain_not_selected_placeholder_txt'}"); - } else { + // Update the data-original-title of the {DOMAIN} placeholder or load and display a hint to the user that no domain was selected yet. Should only happen if no web has been created or assigned by or to the user. + if(data.domain) { $('#domain').attr('data-original-title', data.domain); + } else { + $('#domain').attr('data-original-title', "{tmpl_var name='domain_not_selected_placeholder_txt'}"); } }); } From 98dafc5be8a9b33a8059b0ae6a551a245834b777 Mon Sep 17 00:00:00 2001 From: Herman van Rink Date: Tue, 30 Jan 2024 16:18:40 +0100 Subject: [PATCH 291/621] Include required errorMsg ID for submitUploadForm to process it. --- interface/web/dns/templates/dns_import.htm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interface/web/dns/templates/dns_import.htm b/interface/web/dns/templates/dns_import.htm index 9d40107c89..c1a8844900 100644 --- a/interface/web/dns/templates/dns_import.htm +++ b/interface/web/dns/templates/dns_import.htm @@ -59,7 +59,7 @@

-
+
From 5a118dda894647ab6a961d87b1b4f8cd5ce8de32 Mon Sep 17 00:00:00 2001 From: Herman van Rink Date: Tue, 30 Jan 2024 16:41:57 +0100 Subject: [PATCH 292/621] Domains module expects an ID not a string, fixes #6635 --- interface/web/dns/dns_import.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/interface/web/dns/dns_import.php b/interface/web/dns/dns_import.php index a229f3956b..754d08af53 100644 --- a/interface/web/dns/dns_import.php +++ b/interface/web/dns/dns_import.php @@ -190,16 +190,17 @@ /* We have domains in the list, so create the drop-down-list */ foreach( $domains as $domain) { $domain_select .= "\r\n"; + $domain_select .= ">" . $app->functions->idn_decode($selected_domain) . ".\r\n"; } } $app->tpl->setVar("domain_option", $domain_select); /* check if the selected domain can be used! */ - if ($domain) { - $domain_check = $app->tools_sites->checkDomainModuleDomain($domain); + if ($selected_domain) { + $domain_check = $app->tools_sites->checkDomainModuleDomain($selected_domain); if(!$domain_check) { // invalid domain selected $domain = NULL; @@ -207,6 +208,7 @@ $domain = $domain_check; } } + $domain = $selected_domain; } $lng_file = 'lib/lang/'.$app->functions->check_language($_SESSION['s']['language']).'_dns_import.lng'; From d0a97071d0bb7923db7c08ee50d34a75eeebb74f Mon Sep 17 00:00:00 2001 From: Herman van Rink Date: Tue, 30 Jan 2024 22:23:23 +0100 Subject: [PATCH 293/621] Add option to ignore NS records in zone import, #6636 --- interface/web/dns/dns_import.php | 12 +++++++++--- interface/web/dns/lib/lang/en_dns_import.lng | 1 + interface/web/dns/templates/dns_import.htm | 7 +++++++ 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/interface/web/dns/dns_import.php b/interface/web/dns/dns_import.php index a229f3956b..640ed6752a 100644 --- a/interface/web/dns/dns_import.php +++ b/interface/web/dns/dns_import.php @@ -78,6 +78,7 @@ $post_server_id = false; } +$ignore_ns_records = (isset($_POST['ignore_ns_records']))?$app->functions->intval($_POST['ignore_ns_records']):0; // Load the templates $records = $app->db->queryAllRecords("SELECT * FROM dns_template WHERE visible = 'Y'"); @@ -322,7 +323,7 @@ function fqdn_name( $owner, $origin ) { $owner = $name; $r = 0; $dns_rr = array(); - $add_default_ns = TRUE; + $ns_record_included = FALSE; $found_soa = FALSE; foreach($lines as $line){ @@ -570,7 +571,12 @@ function fqdn_name( $owner, $origin ) { $dns_rr[$r]['type'] = strtoupper($resource_type); if($dns_rr[$r]['type'] == 'NS' && fqdn_name( $dns_rr[$r]['name'], $soa['name'] ) == $soa['name']){ - $add_default_ns = FALSE; + if ($ignore_ns_records) { + unset($dns_rr[$r]); + continue; + } else { + $ns_record_included = TRUE; + } } $dns_rr[$r]['ttl'] = $app->functions->intval($dns_rr[$r]['ttl']); @@ -601,7 +607,7 @@ function fqdn_name( $owner, $origin ) { $i++; } - if ( $add_default_ns ) { + if ( $ignore_ns_records || !$ns_record_included ) { foreach ($servers as $server){ $dns_rr[$r]['name'] = $soa['name']; $dns_rr[$r]['type'] = 'NS'; diff --git a/interface/web/dns/lib/lang/en_dns_import.lng b/interface/web/dns/lib/lang/en_dns_import.lng index 0b9681b227..1811d249c8 100644 --- a/interface/web/dns/lib/lang/en_dns_import.lng +++ b/interface/web/dns/lib/lang/en_dns_import.lng @@ -22,4 +22,5 @@ $wb['ignore_record_not_class_in'] = 'Ignoring DNS record, not class IN.'; $wb['ignore_record_unknown_type'] = 'Ignoring DNS record, unknown type.'; $wb['ignore_record_invalid_owner'] = 'Ignoring DNS record, not able to validate owner name.'; $wb['zone_file_import_fail'] = 'The zone file did not import.'; +$wb['ignore_ns_records_txt'] = 'Ignore NS records'; ?> diff --git a/interface/web/dns/templates/dns_import.htm b/interface/web/dns/templates/dns_import.htm index 9d40107c89..4ebc83e421 100644 --- a/interface/web/dns/templates/dns_import.htm +++ b/interface/web/dns/templates/dns_import.htm @@ -46,6 +46,13 @@

+
+ +
+ +
+
+
From e626a146b0badcaf752522e2fe0f8a68dc71d2ff Mon Sep 17 00:00:00 2001 From: Herman van Rink Date: Tue, 30 Jan 2024 22:26:17 +0100 Subject: [PATCH 294/621] DNS import, add external NS as default, #6637 --- interface/web/admin/form/system_config.tform.php | 12 ++++++++++++ interface/web/admin/lib/lang/en_system_config.lng | 1 + .../web/admin/templates/system_config_dns_edit.htm | 7 +++++++ interface/web/dns/dns_import.php | 10 +++++++++- 4 files changed, 29 insertions(+), 1 deletion(-) diff --git a/interface/web/admin/form/system_config.tform.php b/interface/web/admin/form/system_config.tform.php index fb93fcaf47..7acd801864 100644 --- a/interface/web/admin/form/system_config.tform.php +++ b/interface/web/admin/form/system_config.tform.php @@ -487,6 +487,18 @@ 'value' => '', 'name' => 'default_slave_dnsserver' ), + 'dns_external_slave_fqdn' => array ( + 'datatype' => 'VARCHAR', + 'formtype' => 'TEXT', + 'filters' => array( + 0 => array( 'event' => 'SAVE', + 'type' => 'STRIPTAGS'), + 1 => array( 'event' => 'SAVE', + 'type' => 'STRIPNL') + ), + 'default' => '', + 'value' => '' + ), 'dns_show_zoneexport' => array ( 'datatype' => 'VARCHAR', 'formtype' => 'CHECKBOX', diff --git a/interface/web/admin/lib/lang/en_system_config.lng b/interface/web/admin/lib/lang/en_system_config.lng index 375aade367..509b927955 100644 --- a/interface/web/admin/lib/lang/en_system_config.lng +++ b/interface/web/admin/lib/lang/en_system_config.lng @@ -109,4 +109,5 @@ $wb['show_aps_menu_note_url_txt'] = 'Click here for more information.'; $wb['dns_show_zoneexport_txt'] = 'Show zone export.'; $wb['le_caa_autocreate_options_txt'] = 'Enable automatic creation of CAA record on issuing LE'; $wb['show_delete_on_forms_txt'] = 'Show delete button on edit forms'; +$wb['dns_external_slave_server_txt'] = 'External DNS servers (comma separated)'; ?> diff --git a/interface/web/admin/templates/system_config_dns_edit.htm b/interface/web/admin/templates/system_config_dns_edit.htm index 9636b4a261..0395c5b17d 100644 --- a/interface/web/admin/templates/system_config_dns_edit.htm +++ b/interface/web/admin/templates/system_config_dns_edit.htm @@ -12,6 +12,13 @@

+
+ +
+ +
+
+
diff --git a/interface/web/dns/dns_import.php b/interface/web/dns/dns_import.php index a229f3956b..3b0b50ad00 100644 --- a/interface/web/dns/dns_import.php +++ b/interface/web/dns/dns_import.php @@ -64,6 +64,8 @@ $sys_groupid = $_SESSION["s"]["user"]["default_group"]; } $domain = (isset($_POST['domain'])&&!empty($_POST['domain']))?$_POST['domain']:NULL; +$settings = $app->getconf->get_global_config('dns'); +$external_slave_servers = $settings['dns_external_slave_fqdn']; // get the correct server_id if (isset($_POST['server_id'])) { @@ -73,7 +75,6 @@ $server_id = $app->functions->intval($_POST['server_id_value']); $post_server_id = true; } else { - $settings = $app->getconf->get_global_config('dns'); $server_id = $app->functions->intval($settings['default_dnsserver']); $post_server_id = false; } @@ -261,6 +262,13 @@ function fqdn_name( $owner, $origin ) { $servers[$i]['server_name'] .= "."; } } + if (!empty($external_slave_servers)) { + $external_servers = preg_split('/[\s,]+/', $external_slave_servers); + foreach($external_servers as $e) { + $servers[]['server_name'] = rtrim($e, '.') . '.'; + } + } + $lines = file($_FILES['file']['tmp_name']); // Remove empty lines, comments, whitespace, tabs, etc. From 7f6a7e8f82528700ffe2ea168606785f40508202 Mon Sep 17 00:00:00 2001 From: Herman van Rink Date: Tue, 30 Jan 2024 22:58:16 +0100 Subject: [PATCH 295/621] Minor revert als cleanup --- interface/web/dns/dns_import.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interface/web/dns/dns_import.php b/interface/web/dns/dns_import.php index 754d08af53..fcd93aad8b 100644 --- a/interface/web/dns/dns_import.php +++ b/interface/web/dns/dns_import.php @@ -194,7 +194,7 @@ $domain_select .= " selected"; $selected_domain = $domain['domain']; } - $domain_select .= ">" . $app->functions->idn_decode($selected_domain) . ".\r\n"; + $domain_select .= ">" . $app->functions->idn_decode($domain['domain']) . ".\r\n"; } } $app->tpl->setVar("domain_option", $domain_select); From 32f023a634409ba900eb94e97efb2618a2eda6f9 Mon Sep 17 00:00:00 2001 From: Herman van Rink Date: Wed, 7 Feb 2024 13:46:30 +0100 Subject: [PATCH 296/621] Add translation strings for #6636 --- interface/web/dns/lib/lang/ar_dns_import.lng | 1 + interface/web/dns/lib/lang/bg_dns_import.lng | 1 + interface/web/dns/lib/lang/br_dns_import.lng | 1 + interface/web/dns/lib/lang/ca_dns_import.lng | 1 + interface/web/dns/lib/lang/cn_dns_import.lng | 1 + interface/web/dns/lib/lang/cz_dns_import.lng | 1 + interface/web/dns/lib/lang/de_dns_import.lng | 1 + interface/web/dns/lib/lang/dk_dns_import.lng | 1 + interface/web/dns/lib/lang/el_dns_import.lng | 1 + interface/web/dns/lib/lang/es_dns_import.lng | 1 + interface/web/dns/lib/lang/fi_dns_import.lng | 1 + interface/web/dns/lib/lang/fr_dns_import.lng | 1 + interface/web/dns/lib/lang/hr_dns_import.lng | 1 + interface/web/dns/lib/lang/hu_dns_import.lng | 1 + interface/web/dns/lib/lang/id_dns_import.lng | 1 + interface/web/dns/lib/lang/it_dns_import.lng | 1 + interface/web/dns/lib/lang/ja_dns_import.lng | 1 + interface/web/dns/lib/lang/nl_dns_import.lng | 1 + interface/web/dns/lib/lang/pl_dns_import.lng | 1 + interface/web/dns/lib/lang/pt_dns_import.lng | 1 + interface/web/dns/lib/lang/ro_dns_import.lng | 1 + interface/web/dns/lib/lang/ru_dns_import.lng | 1 + interface/web/dns/lib/lang/se_dns_import.lng | 1 + interface/web/dns/lib/lang/sk_dns_import.lng | 1 + interface/web/dns/lib/lang/tr_dns_import.lng | 1 + 25 files changed, 25 insertions(+) diff --git a/interface/web/dns/lib/lang/ar_dns_import.lng b/interface/web/dns/lib/lang/ar_dns_import.lng index 3fc63992ed..6af6a86d1f 100644 --- a/interface/web/dns/lib/lang/ar_dns_import.lng +++ b/interface/web/dns/lib/lang/ar_dns_import.lng @@ -22,4 +22,5 @@ $wb['ignore_record_not_class_in'] = 'Ignoring DNS record, not class IN.'; $wb['ignore_record_unknown_type'] = 'Ignoring DNS record, unknown type.'; $wb['ignore_record_invalid_owner'] = 'Ignoring DNS record, not able to validate owner name.'; $wb['zone_file_import_fail'] = 'The zone file did not import.'; +$wb['ignore_ns_records_txt'] = 'Ignore NS records'; ?> diff --git a/interface/web/dns/lib/lang/bg_dns_import.lng b/interface/web/dns/lib/lang/bg_dns_import.lng index 7ff3498c44..b8c83bd4de 100644 --- a/interface/web/dns/lib/lang/bg_dns_import.lng +++ b/interface/web/dns/lib/lang/bg_dns_import.lng @@ -22,4 +22,5 @@ $wb['ignore_record_not_class_in'] = 'Ignoring DNS record, not class IN.'; $wb['ignore_record_unknown_type'] = 'Ignoring DNS record, unknown type.'; $wb['ignore_record_invalid_owner'] = 'Ignoring DNS record, not able to validate owner name.'; $wb['zone_file_import_fail'] = 'The zone file did not import.'; +$wb['ignore_ns_records_txt'] = 'Ignore NS records'; ?> diff --git a/interface/web/dns/lib/lang/br_dns_import.lng b/interface/web/dns/lib/lang/br_dns_import.lng index 1bdc7774b5..605f12db14 100644 --- a/interface/web/dns/lib/lang/br_dns_import.lng +++ b/interface/web/dns/lib/lang/br_dns_import.lng @@ -22,3 +22,4 @@ $wb['ignore_record_not_class_in'] = 'Registro DNS ignorado, sem classe IN.'; $wb['ignore_record_unknown_type'] = 'Registro DNS ignorado, tipo desconhecido.'; $wb['ignore_record_invalid_owner'] = 'Registro DNS ignorado, não foi possível validar o proprietário.'; $wb['zone_file_import_fail'] = 'O arquivo de zona não foi importado.'; +$wb['ignore_ns_records_txt'] = 'Ignore NS records'; diff --git a/interface/web/dns/lib/lang/ca_dns_import.lng b/interface/web/dns/lib/lang/ca_dns_import.lng index 78c2edbf80..45075228e5 100644 --- a/interface/web/dns/lib/lang/ca_dns_import.lng +++ b/interface/web/dns/lib/lang/ca_dns_import.lng @@ -22,4 +22,5 @@ $wb['ignore_record_not_class_in'] = 'Ignoring DNS record, not class IN.'; $wb['ignore_record_unknown_type'] = 'Ignoring DNS record, unknown type.'; $wb['ignore_record_invalid_owner'] = 'Ignoring DNS record, not able to validate owner name.'; $wb['zone_file_import_fail'] = 'The zone file did not import.'; +$wb['ignore_ns_records_txt'] = 'Ignore NS records'; ?> diff --git a/interface/web/dns/lib/lang/cn_dns_import.lng b/interface/web/dns/lib/lang/cn_dns_import.lng index 22e24db0a4..3598cdeafc 100644 --- a/interface/web/dns/lib/lang/cn_dns_import.lng +++ b/interface/web/dns/lib/lang/cn_dns_import.lng @@ -22,4 +22,5 @@ $wb['ignore_record_not_class_in'] = '忽略DNS记录,不是IN类。'; $wb['ignore_record_unknown_type'] = '忽略DNS记录,未知类型。'; $wb['ignore_record_invalid_owner'] = '忽略DNS记录,无法验证所有者名称。'; $wb['zone_file_import_fail'] = '区域文件未导入。'; +$wb['ignore_ns_records_txt'] = 'Ignore NS records'; ?> diff --git a/interface/web/dns/lib/lang/cz_dns_import.lng b/interface/web/dns/lib/lang/cz_dns_import.lng index ddbcce0875..7d092cdebf 100644 --- a/interface/web/dns/lib/lang/cz_dns_import.lng +++ b/interface/web/dns/lib/lang/cz_dns_import.lng @@ -22,3 +22,4 @@ $wb['ignore_record_not_class_in'] = 'Ignoring DNS record, not class IN.'; $wb['ignore_record_unknown_type'] = 'Ignoring DNS record, unknown type.'; $wb['ignore_record_invalid_owner'] = 'Ignoring DNS record, not able to validate owner name.'; $wb['zone_file_import_fail'] = 'The zone file did not import.'; +$wb['ignore_ns_records_txt'] = 'Ignore NS records'; diff --git a/interface/web/dns/lib/lang/de_dns_import.lng b/interface/web/dns/lib/lang/de_dns_import.lng index 31db13932e..6df425972a 100644 --- a/interface/web/dns/lib/lang/de_dns_import.lng +++ b/interface/web/dns/lib/lang/de_dns_import.lng @@ -22,4 +22,5 @@ $wb['ignore_record_not_class_in'] = 'Ignoring DNS record, not class IN.'; $wb['ignore_record_unknown_type'] = 'Ignoring DNS record, unknown type.'; $wb['ignore_record_invalid_owner'] = 'Ignoring DNS record, not able to validate owner name.'; $wb['zone_file_import_fail'] = 'The zone file did not import.'; +$wb['ignore_ns_records_txt'] = 'Ignore NS records'; ?> diff --git a/interface/web/dns/lib/lang/dk_dns_import.lng b/interface/web/dns/lib/lang/dk_dns_import.lng index 93357e1194..4f474a47c2 100644 --- a/interface/web/dns/lib/lang/dk_dns_import.lng +++ b/interface/web/dns/lib/lang/dk_dns_import.lng @@ -22,4 +22,5 @@ $wb['ignore_record_not_class_in'] = 'Ignoring DNS record, not class IN.'; $wb['ignore_record_unknown_type'] = 'Ignoring DNS record, unknown type.'; $wb['ignore_record_invalid_owner'] = 'Ignoring DNS record, not able to validate owner name.'; $wb['zone_file_import_fail'] = 'The zone file did not import.'; +$wb['ignore_ns_records_txt'] = 'Ignore NS records'; ?> diff --git a/interface/web/dns/lib/lang/el_dns_import.lng b/interface/web/dns/lib/lang/el_dns_import.lng index 3fc63992ed..6af6a86d1f 100644 --- a/interface/web/dns/lib/lang/el_dns_import.lng +++ b/interface/web/dns/lib/lang/el_dns_import.lng @@ -22,4 +22,5 @@ $wb['ignore_record_not_class_in'] = 'Ignoring DNS record, not class IN.'; $wb['ignore_record_unknown_type'] = 'Ignoring DNS record, unknown type.'; $wb['ignore_record_invalid_owner'] = 'Ignoring DNS record, not able to validate owner name.'; $wb['zone_file_import_fail'] = 'The zone file did not import.'; +$wb['ignore_ns_records_txt'] = 'Ignore NS records'; ?> diff --git a/interface/web/dns/lib/lang/es_dns_import.lng b/interface/web/dns/lib/lang/es_dns_import.lng index db73b69e33..01c28aebd2 100644 --- a/interface/web/dns/lib/lang/es_dns_import.lng +++ b/interface/web/dns/lib/lang/es_dns_import.lng @@ -22,4 +22,5 @@ $wb['ignore_record_not_class_in'] = 'Ignoring DNS record, not class IN.'; $wb['ignore_record_unknown_type'] = 'Ignoring DNS record, unknown type.'; $wb['ignore_record_invalid_owner'] = 'Ignoring DNS record, not able to validate owner name.'; $wb['zone_file_import_fail'] = 'The zone file did not import.'; +$wb['ignore_ns_records_txt'] = 'Ignore NS records'; ?> diff --git a/interface/web/dns/lib/lang/fi_dns_import.lng b/interface/web/dns/lib/lang/fi_dns_import.lng index 3fc63992ed..6af6a86d1f 100644 --- a/interface/web/dns/lib/lang/fi_dns_import.lng +++ b/interface/web/dns/lib/lang/fi_dns_import.lng @@ -22,4 +22,5 @@ $wb['ignore_record_not_class_in'] = 'Ignoring DNS record, not class IN.'; $wb['ignore_record_unknown_type'] = 'Ignoring DNS record, unknown type.'; $wb['ignore_record_invalid_owner'] = 'Ignoring DNS record, not able to validate owner name.'; $wb['zone_file_import_fail'] = 'The zone file did not import.'; +$wb['ignore_ns_records_txt'] = 'Ignore NS records'; ?> diff --git a/interface/web/dns/lib/lang/fr_dns_import.lng b/interface/web/dns/lib/lang/fr_dns_import.lng index c367f542bb..bdabc3dad9 100644 --- a/interface/web/dns/lib/lang/fr_dns_import.lng +++ b/interface/web/dns/lib/lang/fr_dns_import.lng @@ -22,4 +22,5 @@ $wb['ignore_record_not_class_in'] = 'Ignoring DNS record, not class IN.'; $wb['ignore_record_unknown_type'] = 'Ignoring DNS record, unknown type.'; $wb['ignore_record_invalid_owner'] = 'Ignoring DNS record, not able to validate owner name.'; $wb['zone_file_import_fail'] = 'The zone file did not import.'; +$wb['ignore_ns_records_txt'] = 'Ignore NS records'; ?> diff --git a/interface/web/dns/lib/lang/hr_dns_import.lng b/interface/web/dns/lib/lang/hr_dns_import.lng index 59632ed64e..0d6bb2217d 100644 --- a/interface/web/dns/lib/lang/hr_dns_import.lng +++ b/interface/web/dns/lib/lang/hr_dns_import.lng @@ -22,4 +22,5 @@ $wb['ignore_record_not_class_in'] = 'Ignoring DNS record, not class IN.'; $wb['ignore_record_unknown_type'] = 'Ignoring DNS record, unknown type.'; $wb['ignore_record_invalid_owner'] = 'Ignoring DNS record, not able to validate owner name.'; $wb['zone_file_import_fail'] = 'The zone file did not import.'; +$wb['ignore_ns_records_txt'] = 'Ignore NS records'; ?> diff --git a/interface/web/dns/lib/lang/hu_dns_import.lng b/interface/web/dns/lib/lang/hu_dns_import.lng index 3fc63992ed..6af6a86d1f 100644 --- a/interface/web/dns/lib/lang/hu_dns_import.lng +++ b/interface/web/dns/lib/lang/hu_dns_import.lng @@ -22,4 +22,5 @@ $wb['ignore_record_not_class_in'] = 'Ignoring DNS record, not class IN.'; $wb['ignore_record_unknown_type'] = 'Ignoring DNS record, unknown type.'; $wb['ignore_record_invalid_owner'] = 'Ignoring DNS record, not able to validate owner name.'; $wb['zone_file_import_fail'] = 'The zone file did not import.'; +$wb['ignore_ns_records_txt'] = 'Ignore NS records'; ?> diff --git a/interface/web/dns/lib/lang/id_dns_import.lng b/interface/web/dns/lib/lang/id_dns_import.lng index 3fc63992ed..6af6a86d1f 100644 --- a/interface/web/dns/lib/lang/id_dns_import.lng +++ b/interface/web/dns/lib/lang/id_dns_import.lng @@ -22,4 +22,5 @@ $wb['ignore_record_not_class_in'] = 'Ignoring DNS record, not class IN.'; $wb['ignore_record_unknown_type'] = 'Ignoring DNS record, unknown type.'; $wb['ignore_record_invalid_owner'] = 'Ignoring DNS record, not able to validate owner name.'; $wb['zone_file_import_fail'] = 'The zone file did not import.'; +$wb['ignore_ns_records_txt'] = 'Ignore NS records'; ?> diff --git a/interface/web/dns/lib/lang/it_dns_import.lng b/interface/web/dns/lib/lang/it_dns_import.lng index 3f49ddc427..23e68ed74a 100644 --- a/interface/web/dns/lib/lang/it_dns_import.lng +++ b/interface/web/dns/lib/lang/it_dns_import.lng @@ -22,4 +22,5 @@ $wb['ignore_record_not_class_in'] = 'Ignoro record DNS non di tipo IN.'; $wb['ignore_record_unknown_type'] = 'Ignoro record DNS record di tipo sconosciuto.'; $wb['ignore_record_invalid_owner'] = 'Ignoro record DNS non essendo possibile di validare il nome del titolare.'; $wb['zone_file_import_fail'] = 'Il file di zona non è stato importato.'; +$wb['ignore_ns_records_txt'] = 'Ignore NS records'; ?> diff --git a/interface/web/dns/lib/lang/ja_dns_import.lng b/interface/web/dns/lib/lang/ja_dns_import.lng index 3fc63992ed..6af6a86d1f 100644 --- a/interface/web/dns/lib/lang/ja_dns_import.lng +++ b/interface/web/dns/lib/lang/ja_dns_import.lng @@ -22,4 +22,5 @@ $wb['ignore_record_not_class_in'] = 'Ignoring DNS record, not class IN.'; $wb['ignore_record_unknown_type'] = 'Ignoring DNS record, unknown type.'; $wb['ignore_record_invalid_owner'] = 'Ignoring DNS record, not able to validate owner name.'; $wb['zone_file_import_fail'] = 'The zone file did not import.'; +$wb['ignore_ns_records_txt'] = 'Ignore NS records'; ?> diff --git a/interface/web/dns/lib/lang/nl_dns_import.lng b/interface/web/dns/lib/lang/nl_dns_import.lng index 3fc63992ed..6af6a86d1f 100644 --- a/interface/web/dns/lib/lang/nl_dns_import.lng +++ b/interface/web/dns/lib/lang/nl_dns_import.lng @@ -22,4 +22,5 @@ $wb['ignore_record_not_class_in'] = 'Ignoring DNS record, not class IN.'; $wb['ignore_record_unknown_type'] = 'Ignoring DNS record, unknown type.'; $wb['ignore_record_invalid_owner'] = 'Ignoring DNS record, not able to validate owner name.'; $wb['zone_file_import_fail'] = 'The zone file did not import.'; +$wb['ignore_ns_records_txt'] = 'Ignore NS records'; ?> diff --git a/interface/web/dns/lib/lang/pl_dns_import.lng b/interface/web/dns/lib/lang/pl_dns_import.lng index f6b618c87b..657ae3d133 100644 --- a/interface/web/dns/lib/lang/pl_dns_import.lng +++ b/interface/web/dns/lib/lang/pl_dns_import.lng @@ -22,4 +22,5 @@ $wb['ignore_record_not_class_in'] = 'Ignoring DNS record, not class IN.'; $wb['ignore_record_unknown_type'] = 'Ignoring DNS record, unknown type.'; $wb['ignore_record_invalid_owner'] = 'Ignoring DNS record, not able to validate owner name.'; $wb['zone_file_import_fail'] = 'The zone file did not import.'; +$wb['ignore_ns_records_txt'] = 'Ignore NS records'; ?> diff --git a/interface/web/dns/lib/lang/pt_dns_import.lng b/interface/web/dns/lib/lang/pt_dns_import.lng index 3fc63992ed..6af6a86d1f 100644 --- a/interface/web/dns/lib/lang/pt_dns_import.lng +++ b/interface/web/dns/lib/lang/pt_dns_import.lng @@ -22,4 +22,5 @@ $wb['ignore_record_not_class_in'] = 'Ignoring DNS record, not class IN.'; $wb['ignore_record_unknown_type'] = 'Ignoring DNS record, unknown type.'; $wb['ignore_record_invalid_owner'] = 'Ignoring DNS record, not able to validate owner name.'; $wb['zone_file_import_fail'] = 'The zone file did not import.'; +$wb['ignore_ns_records_txt'] = 'Ignore NS records'; ?> diff --git a/interface/web/dns/lib/lang/ro_dns_import.lng b/interface/web/dns/lib/lang/ro_dns_import.lng index 3fc63992ed..6af6a86d1f 100644 --- a/interface/web/dns/lib/lang/ro_dns_import.lng +++ b/interface/web/dns/lib/lang/ro_dns_import.lng @@ -22,4 +22,5 @@ $wb['ignore_record_not_class_in'] = 'Ignoring DNS record, not class IN.'; $wb['ignore_record_unknown_type'] = 'Ignoring DNS record, unknown type.'; $wb['ignore_record_invalid_owner'] = 'Ignoring DNS record, not able to validate owner name.'; $wb['zone_file_import_fail'] = 'The zone file did not import.'; +$wb['ignore_ns_records_txt'] = 'Ignore NS records'; ?> diff --git a/interface/web/dns/lib/lang/ru_dns_import.lng b/interface/web/dns/lib/lang/ru_dns_import.lng index 95cf32c935..acc1eccd85 100644 --- a/interface/web/dns/lib/lang/ru_dns_import.lng +++ b/interface/web/dns/lib/lang/ru_dns_import.lng @@ -22,4 +22,5 @@ $wb['ignore_record_not_class_in'] = 'Ignoring DNS record, not class IN.'; $wb['ignore_record_unknown_type'] = 'Ignoring DNS record, unknown type.'; $wb['ignore_record_invalid_owner'] = 'Ignoring DNS record, not able to validate owner name.'; $wb['zone_file_import_fail'] = 'The zone file did not import.'; +$wb['ignore_ns_records_txt'] = 'Ignore NS records'; ?> diff --git a/interface/web/dns/lib/lang/se_dns_import.lng b/interface/web/dns/lib/lang/se_dns_import.lng index 1c94966002..1ae7b83cad 100644 --- a/interface/web/dns/lib/lang/se_dns_import.lng +++ b/interface/web/dns/lib/lang/se_dns_import.lng @@ -22,4 +22,5 @@ $wb['ignore_record_not_class_in'] = 'Ignoring DNS record, not class IN.'; $wb['ignore_record_unknown_type'] = 'Ignoring DNS record, unknown type.'; $wb['ignore_record_invalid_owner'] = 'Ignoring DNS record, not able to validate owner name.'; $wb['zone_file_import_fail'] = 'The zone file did not import.'; +$wb['ignore_ns_records_txt'] = 'Ignore NS records'; ?> diff --git a/interface/web/dns/lib/lang/sk_dns_import.lng b/interface/web/dns/lib/lang/sk_dns_import.lng index 3fc63992ed..6af6a86d1f 100644 --- a/interface/web/dns/lib/lang/sk_dns_import.lng +++ b/interface/web/dns/lib/lang/sk_dns_import.lng @@ -22,4 +22,5 @@ $wb['ignore_record_not_class_in'] = 'Ignoring DNS record, not class IN.'; $wb['ignore_record_unknown_type'] = 'Ignoring DNS record, unknown type.'; $wb['ignore_record_invalid_owner'] = 'Ignoring DNS record, not able to validate owner name.'; $wb['zone_file_import_fail'] = 'The zone file did not import.'; +$wb['ignore_ns_records_txt'] = 'Ignore NS records'; ?> diff --git a/interface/web/dns/lib/lang/tr_dns_import.lng b/interface/web/dns/lib/lang/tr_dns_import.lng index 8aa42a51e3..8ce62d2cc2 100644 --- a/interface/web/dns/lib/lang/tr_dns_import.lng +++ b/interface/web/dns/lib/lang/tr_dns_import.lng @@ -22,4 +22,5 @@ $wb['ignore_record_not_class_in'] = 'Ignoring DNS record, not class IN.'; $wb['ignore_record_unknown_type'] = 'Ignoring DNS record, unknown type.'; $wb['ignore_record_invalid_owner'] = 'Ignoring DNS record, not able to validate owner name.'; $wb['zone_file_import_fail'] = 'The zone file did not import.'; +$wb['ignore_ns_records_txt'] = 'Ignore NS records'; ?> From 54a6210da8f3ec98ea2fb297b4304cbb0af9dd66 Mon Sep 17 00:00:00 2001 From: Herman van Rink Date: Wed, 7 Feb 2024 13:52:27 +0100 Subject: [PATCH 297/621] Add translation strings for #6637 --- interface/web/admin/lib/lang/ar_system_config.lng | 1 + interface/web/admin/lib/lang/bg_system_config.lng | 1 + interface/web/admin/lib/lang/br_system_config.lng | 1 + interface/web/admin/lib/lang/ca_system_config.lng | 1 + interface/web/admin/lib/lang/cn_system_config.lng | 1 + interface/web/admin/lib/lang/cz_system_config.lng | 1 + interface/web/admin/lib/lang/de_system_config.lng | 1 + interface/web/admin/lib/lang/dk_system_config.lng | 1 + interface/web/admin/lib/lang/el_system_config.lng | 1 + interface/web/admin/lib/lang/es_system_config.lng | 1 + interface/web/admin/lib/lang/fi_system_config.lng | 1 + interface/web/admin/lib/lang/fr_system_config.lng | 1 + interface/web/admin/lib/lang/hr_system_config.lng | 1 + interface/web/admin/lib/lang/hu_system_config.lng | 1 + interface/web/admin/lib/lang/id_system_config.lng | 1 + interface/web/admin/lib/lang/it_system_config.lng | 1 + interface/web/admin/lib/lang/ja_system_config.lng | 1 + interface/web/admin/lib/lang/nl_system_config.lng | 1 + interface/web/admin/lib/lang/pl_system_config.lng | 1 + interface/web/admin/lib/lang/pt_system_config.lng | 1 + interface/web/admin/lib/lang/ro_system_config.lng | 1 + interface/web/admin/lib/lang/ru_system_config.lng | 1 + interface/web/admin/lib/lang/se_system_config.lng | 1 + interface/web/admin/lib/lang/sk_system_config.lng | 1 + interface/web/admin/lib/lang/tr_system_config.lng | 1 + 25 files changed, 25 insertions(+) diff --git a/interface/web/admin/lib/lang/ar_system_config.lng b/interface/web/admin/lib/lang/ar_system_config.lng index f8a3284170..720efa7e1b 100644 --- a/interface/web/admin/lib/lang/ar_system_config.lng +++ b/interface/web/admin/lib/lang/ar_system_config.lng @@ -108,4 +108,5 @@ $wb['show_aps_menu_note_url_txt'] = 'Click here for more information.'; $wb['dns_show_zoneexport_txt'] = 'Show zone export.'; $wb['le_caa_autocreate_options_txt'] = 'Enable automatic creation of CAA record on issuing LE'; $wb['show_delete_on_forms_txt'] = 'Show delete button on edit forms'; +$wb['dns_external_slave_server_txt'] = 'External DNS servers (comma separated)'; ?> diff --git a/interface/web/admin/lib/lang/bg_system_config.lng b/interface/web/admin/lib/lang/bg_system_config.lng index 46c3a37c82..bc3f41ed55 100644 --- a/interface/web/admin/lib/lang/bg_system_config.lng +++ b/interface/web/admin/lib/lang/bg_system_config.lng @@ -108,4 +108,5 @@ $wb['show_aps_menu_note_url_txt'] = 'Click here for more information.'; $wb['dns_show_zoneexport_txt'] = 'Show zone export.'; $wb['le_caa_autocreate_options_txt'] = 'Enable automatic creation of CAA record on issuing LE'; $wb['show_delete_on_forms_txt'] = 'Show delete button on edit forms'; +$wb['dns_external_slave_server_txt'] = 'External DNS servers (comma separated)'; ?> diff --git a/interface/web/admin/lib/lang/br_system_config.lng b/interface/web/admin/lib/lang/br_system_config.lng index 7de2802512..71fdef7eca 100644 --- a/interface/web/admin/lib/lang/br_system_config.lng +++ b/interface/web/admin/lib/lang/br_system_config.lng @@ -109,3 +109,4 @@ $wb['monitor_key_txt'] = 'Senha do Monitor'; $wb['dns_show_zoneexport_txt'] = 'Show zone export.'; $wb['le_caa_autocreate_options_txt'] = 'Enable automatic creation of CAA record on issuing LE'; $wb['show_delete_on_forms_txt'] = 'Show delete button on edit forms'; +$wb['dns_external_slave_server_txt'] = 'External DNS servers (comma separated)'; diff --git a/interface/web/admin/lib/lang/ca_system_config.lng b/interface/web/admin/lib/lang/ca_system_config.lng index 2ad762e232..41b9b3a8af 100644 --- a/interface/web/admin/lib/lang/ca_system_config.lng +++ b/interface/web/admin/lib/lang/ca_system_config.lng @@ -108,4 +108,5 @@ $wb['show_aps_menu_note_url_txt'] = 'Click here for more information.'; $wb['dns_show_zoneexport_txt'] = 'Show zone export.'; $wb['le_caa_autocreate_options_txt'] = 'Enable automatic creation of CAA record on issuing LE'; $wb['show_delete_on_forms_txt'] = 'Show delete button on edit forms'; +$wb['dns_external_slave_server_txt'] = 'External DNS servers (comma separated)'; ?> diff --git a/interface/web/admin/lib/lang/cn_system_config.lng b/interface/web/admin/lib/lang/cn_system_config.lng index 694472161f..0f81926fb9 100644 --- a/interface/web/admin/lib/lang/cn_system_config.lng +++ b/interface/web/admin/lib/lang/cn_system_config.lng @@ -107,4 +107,5 @@ $wb['show_aps_menu_note_txt'] = 'APS 将在不久的将来从面板中移除。' $wb['show_aps_menu_note_url_txt'] = '点击这里了解更多信息。'; $wb['dns_show_zoneexport_txt'] = '显示区域导出。'; $wb['le_caa_autocreate_options_txt'] = '在颁发 LE 时启用 CAA 记录的自动创建'; +$wb['dns_external_slave_server_txt'] = 'External DNS servers (comma separated)'; ?> diff --git a/interface/web/admin/lib/lang/cz_system_config.lng b/interface/web/admin/lib/lang/cz_system_config.lng index 5b93f9e724..49e716f604 100644 --- a/interface/web/admin/lib/lang/cz_system_config.lng +++ b/interface/web/admin/lib/lang/cz_system_config.lng @@ -109,3 +109,4 @@ $wb['monitor_key_txt'] = 'Monitor keyword'; $wb['dns_show_zoneexport_txt'] = 'Show zone export.'; $wb['le_caa_autocreate_options_txt'] = 'Enable automatic creation of CAA record on issuing LE'; $wb['show_delete_on_forms_txt'] = 'Show delete button on edit forms'; +$wb['dns_external_slave_server_txt'] = 'External DNS servers (comma separated)'; diff --git a/interface/web/admin/lib/lang/de_system_config.lng b/interface/web/admin/lib/lang/de_system_config.lng index 2c80ba6553..818c5322c5 100644 --- a/interface/web/admin/lib/lang/de_system_config.lng +++ b/interface/web/admin/lib/lang/de_system_config.lng @@ -108,4 +108,5 @@ $wb['show_aps_menu_note_url_txt'] = 'Click here for more information.'; $wb['dns_show_zoneexport_txt'] = 'Show zone export.'; $wb['le_caa_autocreate_options_txt'] = 'Automatische Erstellung des CAA-Records bei LE Ausstellung aktivieren'; $wb['show_delete_on_forms_txt'] = 'Show delete button on edit forms'; +$wb['dns_external_slave_server_txt'] = 'External DNS servers (comma separated)'; ?> diff --git a/interface/web/admin/lib/lang/dk_system_config.lng b/interface/web/admin/lib/lang/dk_system_config.lng index 7deb9e9974..925951fb22 100644 --- a/interface/web/admin/lib/lang/dk_system_config.lng +++ b/interface/web/admin/lib/lang/dk_system_config.lng @@ -108,4 +108,5 @@ $wb['show_aps_menu_note_url_txt'] = 'Click here for more information.'; $wb['dns_show_zoneexport_txt'] = 'Show zone export.'; $wb['le_caa_autocreate_options_txt'] = 'Enable automatic creation of CAA record on issuing LE'; $wb['show_delete_on_forms_txt'] = 'Show delete button on edit forms'; +$wb['dns_external_slave_server_txt'] = 'External DNS servers (comma separated)'; ?> diff --git a/interface/web/admin/lib/lang/el_system_config.lng b/interface/web/admin/lib/lang/el_system_config.lng index 5061cccec7..7aa8702843 100644 --- a/interface/web/admin/lib/lang/el_system_config.lng +++ b/interface/web/admin/lib/lang/el_system_config.lng @@ -108,4 +108,5 @@ $wb['show_aps_menu_note_url_txt'] = 'Click here for more information.'; $wb['dns_show_zoneexport_txt'] = 'Show zone export.'; $wb['le_caa_autocreate_options_txt'] = 'Enable automatic creation of CAA record on issuing LE'; $wb['show_delete_on_forms_txt'] = 'Show delete button on edit forms'; +$wb['dns_external_slave_server_txt'] = 'External DNS servers (comma separated)'; ?> diff --git a/interface/web/admin/lib/lang/es_system_config.lng b/interface/web/admin/lib/lang/es_system_config.lng index b1dec51d66..be81d53bb8 100644 --- a/interface/web/admin/lib/lang/es_system_config.lng +++ b/interface/web/admin/lib/lang/es_system_config.lng @@ -108,4 +108,5 @@ $wb['show_aps_menu_note_url_txt'] = 'Click here for more information.'; $wb['dns_show_zoneexport_txt'] = 'Show zone export.'; $wb['le_caa_autocreate_options_txt'] = 'Enable automatic creation of CAA record on issuing LE'; $wb['show_delete_on_forms_txt'] = 'Show delete button on edit forms'; +$wb['dns_external_slave_server_txt'] = 'External DNS servers (comma separated)'; ?> diff --git a/interface/web/admin/lib/lang/fi_system_config.lng b/interface/web/admin/lib/lang/fi_system_config.lng index 277d3e0cfc..7151de5db2 100644 --- a/interface/web/admin/lib/lang/fi_system_config.lng +++ b/interface/web/admin/lib/lang/fi_system_config.lng @@ -108,4 +108,5 @@ $wb['show_aps_menu_note_url_txt'] = 'Click here for more information.'; $wb['dns_show_zoneexport_txt'] = 'Show zone export.'; $wb['le_caa_autocreate_options_txt'] = 'Enable automatic creation of CAA record on issuing LE'; $wb['show_delete_on_forms_txt'] = 'Show delete button on edit forms'; +$wb['dns_external_slave_server_txt'] = 'External DNS servers (comma separated)'; ?> diff --git a/interface/web/admin/lib/lang/fr_system_config.lng b/interface/web/admin/lib/lang/fr_system_config.lng index e895ff571f..573e696db2 100644 --- a/interface/web/admin/lib/lang/fr_system_config.lng +++ b/interface/web/admin/lib/lang/fr_system_config.lng @@ -108,4 +108,5 @@ $wb['show_aps_menu_note_url_txt'] = 'Click here for more information.'; $wb['dns_show_zoneexport_txt'] = 'Show zone export.'; $wb['le_caa_autocreate_options_txt'] = 'Enable automatic creation of CAA record on issuing LE'; $wb['show_delete_on_forms_txt'] = 'Show delete button on edit forms'; +$wb['dns_external_slave_server_txt'] = 'External DNS servers (comma separated)'; ?> diff --git a/interface/web/admin/lib/lang/hr_system_config.lng b/interface/web/admin/lib/lang/hr_system_config.lng index 0acdcbc95e..24c4baa740 100644 --- a/interface/web/admin/lib/lang/hr_system_config.lng +++ b/interface/web/admin/lib/lang/hr_system_config.lng @@ -108,4 +108,5 @@ $wb['show_aps_menu_note_url_txt'] = 'Click here for more information.'; $wb['dns_show_zoneexport_txt'] = 'Show zone export.'; $wb['le_caa_autocreate_options_txt'] = 'Enable automatic creation of CAA record on issuing LE'; $wb['show_delete_on_forms_txt'] = 'Show delete button on edit forms'; +$wb['dns_external_slave_server_txt'] = 'External DNS servers (comma separated)'; ?> diff --git a/interface/web/admin/lib/lang/hu_system_config.lng b/interface/web/admin/lib/lang/hu_system_config.lng index 3afd60e8fe..c07b191866 100644 --- a/interface/web/admin/lib/lang/hu_system_config.lng +++ b/interface/web/admin/lib/lang/hu_system_config.lng @@ -108,4 +108,5 @@ $wb['show_aps_menu_note_url_txt'] = 'Click here for more information.'; $wb['dns_show_zoneexport_txt'] = 'Show zone export.'; $wb['le_caa_autocreate_options_txt'] = 'Enable automatic creation of CAA record on issuing LE'; $wb['show_delete_on_forms_txt'] = 'Show delete button on edit forms'; +$wb['dns_external_slave_server_txt'] = 'External DNS servers (comma separated)'; ?> diff --git a/interface/web/admin/lib/lang/id_system_config.lng b/interface/web/admin/lib/lang/id_system_config.lng index a2bd40eea3..33f97923d6 100644 --- a/interface/web/admin/lib/lang/id_system_config.lng +++ b/interface/web/admin/lib/lang/id_system_config.lng @@ -108,4 +108,5 @@ $wb['show_aps_menu_note_url_txt'] = 'Click here for more information.'; $wb['dns_show_zoneexport_txt'] = 'Show zone export.'; $wb['le_caa_autocreate_options_txt'] = 'Enable automatic creation of CAA record on issuing LE'; $wb['show_delete_on_forms_txt'] = 'Show delete button on edit forms'; +$wb['dns_external_slave_server_txt'] = 'External DNS servers (comma separated)'; ?> diff --git a/interface/web/admin/lib/lang/it_system_config.lng b/interface/web/admin/lib/lang/it_system_config.lng index bdff687eb5..68ed721aa6 100644 --- a/interface/web/admin/lib/lang/it_system_config.lng +++ b/interface/web/admin/lib/lang/it_system_config.lng @@ -108,4 +108,5 @@ $wb['show_aps_menu_note_url_txt'] = 'Clicca qui per maggiori informazioni.'; $wb['dns_show_zoneexport_txt'] = 'Show zone export.'; $wb['le_caa_autocreate_options_txt'] = 'Enable automatic creation of CAA record on issuing LE'; $wb['show_delete_on_forms_txt'] = 'Show delete button on edit forms'; +$wb['dns_external_slave_server_txt'] = 'External DNS servers (comma separated)'; ?> diff --git a/interface/web/admin/lib/lang/ja_system_config.lng b/interface/web/admin/lib/lang/ja_system_config.lng index c2d507d61a..e4c1352693 100644 --- a/interface/web/admin/lib/lang/ja_system_config.lng +++ b/interface/web/admin/lib/lang/ja_system_config.lng @@ -108,4 +108,5 @@ $wb['show_aps_menu_note_url_txt'] = 'Click here for more information.'; $wb['dns_show_zoneexport_txt'] = 'Show zone export.'; $wb['le_caa_autocreate_options_txt'] = 'Enable automatic creation of CAA record on issuing LE'; $wb['show_delete_on_forms_txt'] = 'Show delete button on edit forms'; +$wb['dns_external_slave_server_txt'] = 'External DNS servers (comma separated)'; ?> diff --git a/interface/web/admin/lib/lang/nl_system_config.lng b/interface/web/admin/lib/lang/nl_system_config.lng index e56855de5f..94f211d44b 100644 --- a/interface/web/admin/lib/lang/nl_system_config.lng +++ b/interface/web/admin/lib/lang/nl_system_config.lng @@ -108,4 +108,5 @@ $wb['show_aps_menu_note_url_txt'] = 'Click here for more information.'; $wb['dns_show_zoneexport_txt'] = 'Show zone export.'; $wb['le_caa_autocreate_options_txt'] = 'Enable automatic creation of CAA record on issuing LE'; $wb['show_delete_on_forms_txt'] = 'Show delete button on edit forms'; +$wb['dns_external_slave_server_txt'] = 'External DNS servers (comma separated)'; ?> diff --git a/interface/web/admin/lib/lang/pl_system_config.lng b/interface/web/admin/lib/lang/pl_system_config.lng index c99434e5ef..d3960b0f42 100644 --- a/interface/web/admin/lib/lang/pl_system_config.lng +++ b/interface/web/admin/lib/lang/pl_system_config.lng @@ -108,4 +108,5 @@ $wb['show_aps_menu_note_url_txt'] = 'Click here for more information.'; $wb['dns_show_zoneexport_txt'] = 'Show zone export.'; $wb['le_caa_autocreate_options_txt'] = 'Enable automatic creation of CAA record on issuing LE'; $wb['show_delete_on_forms_txt'] = 'Show delete button on edit forms'; +$wb['dns_external_slave_server_txt'] = 'External DNS servers (comma separated)'; ?> diff --git a/interface/web/admin/lib/lang/pt_system_config.lng b/interface/web/admin/lib/lang/pt_system_config.lng index 7513759047..6d840b4d48 100644 --- a/interface/web/admin/lib/lang/pt_system_config.lng +++ b/interface/web/admin/lib/lang/pt_system_config.lng @@ -108,4 +108,5 @@ $wb['show_aps_menu_note_url_txt'] = 'Click here for more information.'; $wb['dns_show_zoneexport_txt'] = 'Show zone export.'; $wb['le_caa_autocreate_options_txt'] = 'Enable automatic creation of CAA record on issuing LE'; $wb['show_delete_on_forms_txt'] = 'Show delete button on edit forms'; +$wb['dns_external_slave_server_txt'] = 'External DNS servers (comma separated)'; ?> diff --git a/interface/web/admin/lib/lang/ro_system_config.lng b/interface/web/admin/lib/lang/ro_system_config.lng index 0c9b600028..926d62b9fa 100644 --- a/interface/web/admin/lib/lang/ro_system_config.lng +++ b/interface/web/admin/lib/lang/ro_system_config.lng @@ -108,4 +108,5 @@ $wb['show_aps_menu_note_url_txt'] = 'Click here for more information.'; $wb['dns_show_zoneexport_txt'] = 'Show zone export.'; $wb['le_caa_autocreate_options_txt'] = 'Enable automatic creation of CAA record on issuing LE'; $wb['show_delete_on_forms_txt'] = 'Show delete button on edit forms'; +$wb['dns_external_slave_server_txt'] = 'External DNS servers (comma separated)'; ?> diff --git a/interface/web/admin/lib/lang/ru_system_config.lng b/interface/web/admin/lib/lang/ru_system_config.lng index 31e475bb00..9ef38cb6bd 100644 --- a/interface/web/admin/lib/lang/ru_system_config.lng +++ b/interface/web/admin/lib/lang/ru_system_config.lng @@ -108,4 +108,5 @@ $wb['show_aps_menu_note_url_txt'] = 'Click here for more information.'; $wb['dns_show_zoneexport_txt'] = 'Show zone export.'; $wb['le_caa_autocreate_options_txt'] = 'Enable automatic creation of CAA record on issuing LE'; $wb['show_delete_on_forms_txt'] = 'Show delete button on edit forms'; +$wb['dns_external_slave_server_txt'] = 'External DNS servers (comma separated)'; ?> diff --git a/interface/web/admin/lib/lang/se_system_config.lng b/interface/web/admin/lib/lang/se_system_config.lng index e4748e9463..2d389a2945 100644 --- a/interface/web/admin/lib/lang/se_system_config.lng +++ b/interface/web/admin/lib/lang/se_system_config.lng @@ -108,4 +108,5 @@ $wb['show_aps_menu_note_url_txt'] = 'Click here for more information.'; $wb['dns_show_zoneexport_txt'] = 'Show zone export.'; $wb['le_caa_autocreate_options_txt'] = 'Enable automatic creation of CAA record on issuing LE'; $wb['show_delete_on_forms_txt'] = 'Show delete button on edit forms'; +$wb['dns_external_slave_server_txt'] = 'External DNS servers (comma separated)'; ?> diff --git a/interface/web/admin/lib/lang/sk_system_config.lng b/interface/web/admin/lib/lang/sk_system_config.lng index dcef81a303..900679dc1d 100644 --- a/interface/web/admin/lib/lang/sk_system_config.lng +++ b/interface/web/admin/lib/lang/sk_system_config.lng @@ -108,4 +108,5 @@ $wb['show_aps_menu_note_url_txt'] = 'Click here for more information.'; $wb['dns_show_zoneexport_txt'] = 'Show zone export.'; $wb['le_caa_autocreate_options_txt'] = 'Enable automatic creation of CAA record on issuing LE'; $wb['show_delete_on_forms_txt'] = 'Show delete button on edit forms'; +$wb['dns_external_slave_server_txt'] = 'External DNS servers (comma separated)'; ?> diff --git a/interface/web/admin/lib/lang/tr_system_config.lng b/interface/web/admin/lib/lang/tr_system_config.lng index 17cf1884f5..8383f63166 100644 --- a/interface/web/admin/lib/lang/tr_system_config.lng +++ b/interface/web/admin/lib/lang/tr_system_config.lng @@ -108,4 +108,5 @@ $wb['show_aps_menu_note_url_txt'] = 'Click here for more information.'; $wb['dns_show_zoneexport_txt'] = 'Show zone export.'; $wb['le_caa_autocreate_options_txt'] = 'Enable automatic creation of CAA record on issuing LE'; $wb['show_delete_on_forms_txt'] = 'Show delete button on edit forms'; +$wb['dns_external_slave_server_txt'] = 'External DNS servers (comma separated)'; ?> From 50266744372e85f82ce694db0ec5058bbf322318 Mon Sep 17 00:00:00 2001 From: Michael Seevogel Date: Thu, 8 Feb 2024 00:17:14 +0100 Subject: [PATCH 298/621] Load tpl in _setup_jailkit_chroot Check prior creating symlinks in SFTP home directory if the symlinks already exists --- server/plugins-available/cron_jailkit_plugin.inc.php | 2 ++ server/plugins-available/shelluser_base_plugin.inc.php | 6 +++--- server/plugins-available/shelluser_jailkit_plugin.inc.php | 4 +++- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/server/plugins-available/cron_jailkit_plugin.inc.php b/server/plugins-available/cron_jailkit_plugin.inc.php index 667553c219..b51964a0b7 100644 --- a/server/plugins-available/cron_jailkit_plugin.inc.php +++ b/server/plugins-available/cron_jailkit_plugin.inc.php @@ -242,6 +242,8 @@ function _setup_jailkit_chroot() { global $app, $conf; + $app->load('tpl'); + if (isset($this->jailkit_config) && isset($this->jailkit_config['jailkit_hardlinks'])) { if ($this->jailkit_config['jailkit_hardlinks'] == 'yes') { $options = array('hardlink'); diff --git a/server/plugins-available/shelluser_base_plugin.inc.php b/server/plugins-available/shelluser_base_plugin.inc.php index f73414f7d5..a9d4357069 100755 --- a/server/plugins-available/shelluser_base_plugin.inc.php +++ b/server/plugins-available/shelluser_base_plugin.inc.php @@ -174,9 +174,9 @@ function insert($event_name, $data) { } // Create symlinks for conveniance, SFTP user should not land in an empty dir. - symlink('../../web', $homedir.'/web'); - symlink('../../log', $homedir.'/log'); - symlink('../../private', $homedir.'/private'); + if(!is_link($homedir.'/web')) symlink('../../web', $homedir.'/web'); + if(!is_link($homedir.'/log')) symlink('../../log', $homedir.'/log'); + if(!is_link($homedir.'/private')) symlink('../../private', $homedir.'/private'); //* Disable shell user temporarily if we use jailkit if($data['new']['chroot'] == 'jailkit') { diff --git a/server/plugins-available/shelluser_jailkit_plugin.inc.php b/server/plugins-available/shelluser_jailkit_plugin.inc.php index 0f9313eae5..d462e4a693 100755 --- a/server/plugins-available/shelluser_jailkit_plugin.inc.php +++ b/server/plugins-available/shelluser_jailkit_plugin.inc.php @@ -330,6 +330,8 @@ function _setup_jailkit_chroot() { global $app, $conf; + $app->load('tpl'); + if (isset($this->jailkit_config) && isset($this->jailkit_config['jailkit_hardlinks'])) { if ($this->jailkit_config['jailkit_hardlinks'] == 'yes') { $options = array('hardlink'); @@ -724,7 +726,7 @@ function _add_bashrc_jailkit() { } if($app->system->is_redhat_os() == true) { - $bashrc = $this->web['document_root'] . '/home/' . $this->web['system_user'] . '/.bashrc'; + $bashrc = $this->web['document_root'] . '/etc/bashrc'; } else { $bashrc = $this->web['document_root'] . '/etc/bash.bashrc'; } From b15761fe58b1d68f71981b9a21703ecc9bd85e6c Mon Sep 17 00:00:00 2001 From: Till Date: Thu, 8 Feb 2024 13:59:16 +0100 Subject: [PATCH 299/621] Fixes #6643 --- .../plugins-available/rspamd_plugin.inc.php | 114 +++++++++--------- 1 file changed, 58 insertions(+), 56 deletions(-) diff --git a/server/plugins-available/rspamd_plugin.inc.php b/server/plugins-available/rspamd_plugin.inc.php index c3a60d0bb9..0e40d3b71f 100644 --- a/server/plugins-available/rspamd_plugin.inc.php +++ b/server/plugins-available/rspamd_plugin.inc.php @@ -282,74 +282,76 @@ function user_settings_update($event_name, $data, $internal = false) { $app->system->mkdirpath($this->users_config_dir); } - if((!$this->isValidEmail($app->functions->idn_encode($email_address))) || !isset($data['new']['policy_id']) || intval($data['new']['policy_id']) == 0 && $type == 'spamfilter_user') { - if(is_file($settings_file)) { - unlink($settings_file); - } - } else { - - $app->load('tpl'); - - $tpl = new tpl(); - if (file_exists($conf['rootpath']."/conf-custom/install/rspamd_users.inc.conf.master")) { - $tpl->newTemplate($conf['rootpath']."/conf-custom/install/rspamd_users.inc.conf.master"); + if ($type == 'spamfilter_user'){ + if((!$this->isValidEmail($app->functions->idn_encode($email_address))) || !isset($data['new']['policy_id']) || intval($data['new']['policy_id']) == 0) { + if(is_file($settings_file)) { + unlink($settings_file); + } } else { - $tpl->newTemplate("rspamd_users.inc.conf.master"); - } - $tpl->setVar('record_identifier', 'ispc_' . $type . '_' . $entry_id); - $tpl->setVar('priority', $settings_priority); + $app->load('tpl'); - if($type === 'spamfilter_user') { - if($data[$use_data]['local'] === 'Y') { - $tpl->setVar('to_email', $app->functions->idn_encode($email_address)); + $tpl = new tpl(); + if (file_exists($conf['rootpath']."/conf-custom/install/rspamd_users.inc.conf.master")) { + $tpl->newTemplate($conf['rootpath']."/conf-custom/install/rspamd_users.inc.conf.master"); } else { - $tpl->setVar('from_email', $app->functions->idn_encode($email_address)); + $tpl->newTemplate("rspamd_users.inc.conf.master"); } - // unneded? $spamfilter appears unused - $spamfilter = $data[$use_data]; - } else { - $tpl->setVar('to_email', $app->functions->idn_encode($email_address)); - // need to get matching spamfilter user if any - // unneded? $spamfilter appears unused - $spamfilter = $app->db->queryOneRecord('SELECT * FROM spamfilter_users WHERE `email` = ?', $email_address); - } + $tpl->setVar('record_identifier', 'ispc_' . $type . '_' . $entry_id); + $tpl->setVar('priority', $settings_priority); + + if($type === 'spamfilter_user') { + if($data[$use_data]['local'] === 'Y') { + $tpl->setVar('to_email', $app->functions->idn_encode($email_address)); + } else { + $tpl->setVar('from_email', $app->functions->idn_encode($email_address)); + } + // unneded? $spamfilter appears unused + $spamfilter = $data[$use_data]; + } else { + $tpl->setVar('to_email', $app->functions->idn_encode($email_address)); - if(!isset($policy['rspamd_spam_tag_level'])) { - $policy['rspamd_spam_tag_level'] = 6.0; - } - if(!isset($policy['rspamd_spam_tag_method'])) { - $policy['rspamd_spam_tag_method'] = 'add_header'; - } - if(!isset($policy['rspamd_spam_kill_level'])) { - $policy['rspamd_spam_kill_level'] = 15.0; - } - if(!isset($policy['rspamd_virus_kill_level'])) { - $policy['rspamd_virus_kill_level'] = floatval($policy['rspamd_spam_kill_level']) + 1000; - } + // need to get matching spamfilter user if any + // unneded? $spamfilter appears unused + $spamfilter = $app->db->queryOneRecord('SELECT * FROM spamfilter_users WHERE `email` = ?', $email_address); + } - $tpl->setVar('rspamd_spam_tag_level', floatval($policy['rspamd_spam_tag_level'])); - $tpl->setVar('rspamd_spam_tag_method', $policy['rspamd_spam_tag_method']); - $tpl->setVar('rspamd_spam_kill_level', floatval($policy['rspamd_spam_kill_level'])); - $tpl->setVar('rspamd_virus_kill_level', floatval($policy['rspamd_spam_kill_level']) + 1000); + if(!isset($policy['rspamd_spam_tag_level'])) { + $policy['rspamd_spam_tag_level'] = 6.0; + } + if(!isset($policy['rspamd_spam_tag_method'])) { + $policy['rspamd_spam_tag_method'] = 'add_header'; + } + if(!isset($policy['rspamd_spam_kill_level'])) { + $policy['rspamd_spam_kill_level'] = 15.0; + } + if(!isset($policy['rspamd_virus_kill_level'])) { + $policy['rspamd_virus_kill_level'] = floatval($policy['rspamd_spam_kill_level']) + 1000; + } - if(isset($policy['spam_lover']) && $policy['spam_lover'] == 'Y') { - $tpl->setVar('spam_lover', true); - } - if(isset($policy['virus_lover']) && $policy['virus_lover'] == 'Y') { - $tpl->setVar('virus_lover', true); - } + $tpl->setVar('rspamd_spam_tag_level', floatval($policy['rspamd_spam_tag_level'])); + $tpl->setVar('rspamd_spam_tag_method', $policy['rspamd_spam_tag_method']); + $tpl->setVar('rspamd_spam_kill_level', floatval($policy['rspamd_spam_kill_level'])); + $tpl->setVar('rspamd_virus_kill_level', floatval($policy['rspamd_spam_kill_level']) + 1000); - $tpl->setVar('greylisting', $greylisting); + if(isset($policy['spam_lover']) && $policy['spam_lover'] == 'Y') { + $tpl->setVar('spam_lover', true); + } + if(isset($policy['virus_lover']) && $policy['virus_lover'] == 'Y') { + $tpl->setVar('virus_lover', true); + } - if(isset($policy['rspamd_spam_greylisting_level'])) { - $tpl->setVar('greylisting_level', floatval($policy['rspamd_spam_greylisting_level'])); - } else { - $tpl->setVar('greylisting_level', 0.1); - } + $tpl->setVar('greylisting', $greylisting); - $app->system->file_put_contents($settings_file, $tpl->grab()); + if(isset($policy['rspamd_spam_greylisting_level'])) { + $tpl->setVar('greylisting_level', floatval($policy['rspamd_spam_greylisting_level'])); + } else { + $tpl->setVar('greylisting_level', 0.1); + } + + $app->system->file_put_contents($settings_file, $tpl->grab()); + } } } From bc0facd164a13232b9344a8d7f60e925a3434d26 Mon Sep 17 00:00:00 2001 From: Till Date: Thu, 8 Feb 2024 14:14:16 +0100 Subject: [PATCH 300/621] Fixes #6593 --- install/update.php | 53 ++++++++++++++++++++-------------------------- 1 file changed, 23 insertions(+), 30 deletions(-) diff --git a/install/update.php b/install/update.php index e03b5d9de1..55b711da73 100644 --- a/install/update.php +++ b/install/update.php @@ -279,11 +279,33 @@ //* initialize the master DB, if we have a multiserver setup if($conf['mysql']['master_slave_setup'] == 'y') { + //** Get MySQL root credentials + $finished = false; + do { + $tmp_mysql_server_host = $inst->free_query('MySQL master server hostname', $conf['mysql']['master_host'],'mysql_master_hostname'); + $tmp_mysql_server_port = $inst->free_query('MySQL master server port', $conf['mysql']['master_port'],'mysql_master_port'); + $tmp_mysql_server_admin_user = $inst->free_query('MySQL master server root username', $conf['mysql']['master_admin_user'],'mysql_master_root_user'); + $tmp_mysql_server_admin_password = $inst->free_query('MySQL master server root password', $conf['mysql']['master_admin_password'],'mysql_master_root_password'); + $tmp_mysql_server_database = $inst->free_query('MySQL master server database name', $conf['mysql']['master_database'],'mysql_master_database'); + + //* Initialize the MySQL server connection + if(@mysqli_connect($tmp_mysql_server_host, $tmp_mysql_server_admin_user, $tmp_mysql_server_admin_password, $tmp_mysql_server_database, (int)$tmp_mysql_server_port)) { + $conf['mysql']['master_host'] = $tmp_mysql_server_host; + $conf['mysql']['master_port'] = $tmp_mysql_server_port; + $conf['mysql']['master_admin_user'] = $tmp_mysql_server_admin_user; + $conf['mysql']['master_admin_password'] = $tmp_mysql_server_admin_password; + $conf['mysql']['master_database'] = $tmp_mysql_server_database; + $finished = true; + } else { + swriteln($inst->lng('Unable to connect to mysql server').' '.mysqli_connect_error()); + } + } while ($finished == false); + unset($finished); // initialize the connection to the master database $inst->dbmaster = new db(); if($inst->dbmaster->linkId) $inst->dbmaster->closeConn(); - $inst->dbmaster->setDBData($conf['mysql']["master_host"], $conf['mysql']["master_ispconfig_user"], $conf['mysql']["master_ispconfig_password"], $conf['mysql']["master_port"]); + $inst->dbmaster->setDBData($conf['mysql']["master_host"], $conf['mysql']["master_admin_user"], $conf['mysql']["master_admin_password"], $conf['mysql']["master_port"]); $inst->dbmaster->setDBName($conf['mysql']["master_database"]); } else { $inst->dbmaster = $inst->db; @@ -330,35 +352,6 @@ $reconfigure_master_database_rights_answer = $inst->simple_query('Reconfigure Permissions in master database?', array('yes', 'no'), 'no','reconfigure_permissions_in_master_database'); if($reconfigure_master_database_rights_answer == 'yes') { - //** Get MySQL root credentials, to upgrade the dbmaster connection. - $finished = false; - do { - $tmp_mysql_server_host = $inst->free_query('MySQL master server hostname', $conf['mysql']['master_host'],'mysql_master_hostname'); - $tmp_mysql_server_port = $inst->free_query('MySQL master server port', $conf['mysql']['master_port'],'mysql_master_port'); - $tmp_mysql_server_admin_user = $inst->free_query('MySQL master server root username', $conf['mysql']['master_admin_user'],'mysql_master_root_user'); - $tmp_mysql_server_admin_password = $inst->free_query('MySQL master server root password', $conf['mysql']['master_admin_password'],'mysql_master_root_password'); - $tmp_mysql_server_database = $inst->free_query('MySQL master server database name', $conf['mysql']['master_database'],'mysql_master_database'); - - //* Initialize the MySQL server connection - if(@mysqli_connect($tmp_mysql_server_host, $tmp_mysql_server_admin_user, $tmp_mysql_server_admin_password, $tmp_mysql_server_database, (int)$tmp_mysql_server_port)) { - $conf['mysql']['master_host'] = $tmp_mysql_server_host; - $conf['mysql']['master_port'] = $tmp_mysql_server_port; - $conf['mysql']['master_admin_user'] = $tmp_mysql_server_admin_user; - $conf['mysql']['master_admin_password'] = $tmp_mysql_server_admin_password; - $conf['mysql']['master_database'] = $tmp_mysql_server_database; - $finished = true; - } else { - swriteln($inst->lng('Unable to connect to mysql server').' '.mysqli_connect_error()); - } - } while ($finished == false); - unset($finished); - - // initialize the connection to the master database - $inst->dbmaster = new db(); - if($inst->dbmaster->linkId) $inst->dbmaster->closeConn(); - $inst->dbmaster->setDBData($conf['mysql']["master_host"], $conf['mysql']["master_admin_user"], $conf['mysql']["master_admin_password"], $conf['mysql']["master_port"]); - $inst->dbmaster->setDBName($conf['mysql']["master_database"]); - $inst->grant_master_database_rights(); } //} From b5c22ae6430d2508f30911e2badc16d20e46ce97 Mon Sep 17 00:00:00 2001 From: Till Date: Thu, 8 Feb 2024 18:49:27 +0100 Subject: [PATCH 301/621] Fixes #6644 CAA Record *.domain.tld. can not be saved --- interface/web/dns/form/dns_caa.tform.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interface/web/dns/form/dns_caa.tform.php b/interface/web/dns/form/dns_caa.tform.php index aa297f29d7..c17f66e181 100644 --- a/interface/web/dns/form/dns_caa.tform.php +++ b/interface/web/dns/form/dns_caa.tform.php @@ -51,7 +51,7 @@ 'type' => 'TOLOWER') ), 'validators' => array ( 0 => array ( 'type' => 'REGEX', - 'regex' => '/^[a-zA-Z0-9\.\-\_]{0,255}$/', + 'regex' => '/^[a-zA-Z0-9\.\-\_\*]{0,255}$/', 'errmsg'=> 'name_error_regex'), ), 'default' => '', From 31a42f88ae7d2cd2408211285823e2887982f9d6 Mon Sep 17 00:00:00 2001 From: Till Date: Fri, 9 Feb 2024 06:43:26 +0100 Subject: [PATCH 302/621] Fixes #6641 Multiserver sync issues with some older systems --- install/sql/incremental/upd_0099.sql | 6 ++++++ install/sql/ispconfig3.sql | 10 +++++----- 2 files changed, 11 insertions(+), 5 deletions(-) create mode 100644 install/sql/incremental/upd_0099.sql diff --git a/install/sql/incremental/upd_0099.sql b/install/sql/incremental/upd_0099.sql new file mode 100644 index 0000000000..b822310c94 --- /dev/null +++ b/install/sql/incremental/upd_0099.sql @@ -0,0 +1,6 @@ +ALTER TABLE `spamfilter_policy` +CHANGE `warnvirusrecip` `warnvirusrecip` VARCHAR(1) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT 'N', +CHANGE `warnbannedrecip` `warnbannedrecip` VARCHAR(1) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT 'N', +CHANGE `warnbadhrecip` `warnbadhrecip` VARCHAR(1) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT 'N'; +ALTER TABLE `sys_ini` CHANGE `default_logo` `default_logo` TEXT CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL; +ALTER TABLE `sys_ini` CHANGE `custom_logo` `custom_logo` TEXT CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL; \ No newline at end of file diff --git a/install/sql/ispconfig3.sql b/install/sql/ispconfig3.sql index 75529ab82b..ff582262bb 100644 --- a/install/sql/ispconfig3.sql +++ b/install/sql/ispconfig3.sql @@ -1532,9 +1532,9 @@ CREATE TABLE `spamfilter_policy` ( `addr_extension_spam` varchar(64) default NULL, `addr_extension_banned` varchar(64) default NULL, `addr_extension_bad_header` varchar(64) default NULL, - `warnvirusrecip` enum('N','Y') default 'N', - `warnbannedrecip` enum('N','Y') default 'N', - `warnbadhrecip` enum('N','Y') default 'N', + `warnvirusrecip` VARCHAR(1) NULL default 'N', + `warnbannedrecip` VARCHAR(1) NULL default 'N', + `warnbadhrecip` VARCHAR(1) NULL default 'N', `newvirus_admin` varchar(64) default NULL, `virus_admin` varchar(64) default NULL, `banned_admin` varchar(64) default NULL, @@ -1741,8 +1741,8 @@ CREATE TABLE `sys_group` ( CREATE TABLE `sys_ini` ( `sysini_id` int(11) unsigned NOT NULL auto_increment, `config` longtext, - `default_logo` text NOT NULL, - `custom_logo` text NOT NULL, + `default_logo` text NULL, + `custom_logo` text NULL, PRIMARY KEY (`sysini_id`) ) DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; From 4e95e6063a508b0ffb842caca856839b6b3c54fc Mon Sep 17 00:00:00 2001 From: Till Date: Fri, 9 Feb 2024 06:47:29 +0100 Subject: [PATCH 303/621] Fixed #6633 Code Error - Jailkit Update on every cron change --- server/plugins-available/cron_jailkit_plugin.inc.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/plugins-available/cron_jailkit_plugin.inc.php b/server/plugins-available/cron_jailkit_plugin.inc.php index 08f039b371..ea3cb2d04f 100644 --- a/server/plugins-available/cron_jailkit_plugin.inc.php +++ b/server/plugins-available/cron_jailkit_plugin.inc.php @@ -229,7 +229,7 @@ function delete($event_name, $data) { function _setup_jailkit_chroot() { - global $app; + global $app, $conf; if (isset($this->jailkit_config) && isset($this->jailkit_config['jailkit_hardlinks'])) { if ($this->jailkit_config['jailkit_hardlinks'] == 'yes') { @@ -293,7 +293,7 @@ function _setup_jailkit_chroot() $programs = $this->jailkit_config['jailkit_chroot_app_programs'] . ' ' . $this->jailkit_config['jailkit_chroot_cron_programs']; - if ($update_hash == $parent_domain['last_jailkit_hash']) { + if ($update_hash == $this->parent_domain['last_jailkit_hash']) { return; } From e6cbe72d1ccfdf8c3f0250da1213c60d13c07304 Mon Sep 17 00:00:00 2001 From: Till Date: Fri, 9 Feb 2024 06:57:17 +0100 Subject: [PATCH 304/621] Fixes #6640 DKIM key not generated for IDN domain --- interface/web/mail/ajax_get_json.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/interface/web/mail/ajax_get_json.php b/interface/web/mail/ajax_get_json.php index c40c3bf401..1a87d8f96b 100644 --- a/interface/web/mail/ajax_get_json.php +++ b/interface/web/mail/ajax_get_json.php @@ -34,8 +34,10 @@ //* Check permissions for module $app->auth->check_module_permissions('mail'); +$app->uses('functions'); + $type = $_GET['type']; -$domain_id = $_GET['domain_id']; +$domain_id = $app->functions->idn_encode($_GET['domain_id']); if($type == 'create_dkim' && $domain_id != ''){ $dkim_public = $_GET['dkim_public']; From bb5020e7747458a241b4a609811d147323cc6eb7 Mon Sep 17 00:00:00 2001 From: Till Date: Fri, 9 Feb 2024 07:59:50 +0100 Subject: [PATCH 305/621] Fixes #6642 Mail user filter search hangs with javascript errors in browser --- interface/web/mailuser/templates/mail_user_filter_list.htm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interface/web/mailuser/templates/mail_user_filter_list.htm b/interface/web/mailuser/templates/mail_user_filter_list.htm index b81793b631..8ec5641cbf 100644 --- a/interface/web/mailuser/templates/mail_user_filter_list.htm +++ b/interface/web/mailuser/templates/mail_user_filter_list.htm @@ -21,7 +21,7 @@

From 97c6edcf676f46a698ce3254ede92a34a3dfe583 Mon Sep 17 00:00:00 2001 From: Herman van Rink Date: Fri, 9 Feb 2024 22:38:37 +0100 Subject: [PATCH 306/621] Add a translation string for datalog_status_d_web_backup --- interface/lib/lang/ar.lng | 1 + interface/lib/lang/bg.lng | 1 + interface/lib/lang/br.lng | 1 + interface/lib/lang/ca.lng | 1 + interface/lib/lang/cn.lng | 1 + interface/lib/lang/cz.lng | 1 + interface/lib/lang/de.lng | 1 + interface/lib/lang/dk.lng | 1 + interface/lib/lang/el.lng | 1 + interface/lib/lang/en.lng | 1 + interface/lib/lang/es.lng | 1 + interface/lib/lang/fi.lng | 1 + interface/lib/lang/fr.lng | 1 + interface/lib/lang/hr.lng | 1 + interface/lib/lang/hu.lng | 1 + interface/lib/lang/id.lng | 1 + interface/lib/lang/it.lng | 1 + interface/lib/lang/ja.lng | 1 + interface/lib/lang/nl.lng | 1 + interface/lib/lang/pl.lng | 1 + interface/lib/lang/pt.lng | 1 + interface/lib/lang/ro.lng | 1 + interface/lib/lang/ru.lng | 1 + interface/lib/lang/se.lng | 1 + interface/lib/lang/sk.lng | 1 + interface/lib/lang/tr.lng | 1 + 26 files changed, 26 insertions(+) diff --git a/interface/lib/lang/ar.lng b/interface/lib/lang/ar.lng index 3f14a97cf4..45a62165d2 100644 --- a/interface/lib/lang/ar.lng +++ b/interface/lib/lang/ar.lng @@ -180,4 +180,5 @@ $wb['datalog_status_d_client'] = 'Delete client'; $wb['datalog_status_i_domain'] = 'Create new domain'; $wb['datalog_status_u_domain'] = 'Update domain'; $wb['datalog_status_d_domain'] = 'Delete domain'; +$wb['datalog_status_d_web_backup'] = 'Delete website backup'; ?> diff --git a/interface/lib/lang/bg.lng b/interface/lib/lang/bg.lng index 4b38633661..fc4a4fc366 100644 --- a/interface/lib/lang/bg.lng +++ b/interface/lib/lang/bg.lng @@ -180,4 +180,5 @@ $wb['datalog_status_d_client'] = 'Delete client'; $wb['datalog_status_i_domain'] = 'Create new domain'; $wb['datalog_status_u_domain'] = 'Update domain'; $wb['datalog_status_d_domain'] = 'Delete domain'; +$wb['datalog_status_d_web_backup'] = 'Delete website backup'; ?> diff --git a/interface/lib/lang/br.lng b/interface/lib/lang/br.lng index 2ab5ee3c0c..bb1353a12e 100644 --- a/interface/lib/lang/br.lng +++ b/interface/lib/lang/br.lng @@ -180,4 +180,5 @@ $wb['datalog_status_d_client'] = 'Delete client'; $wb['datalog_status_i_domain'] = 'Create new domain'; $wb['datalog_status_u_domain'] = 'Update domain'; $wb['datalog_status_d_domain'] = 'Delete domain'; +$wb['datalog_status_d_web_backup'] = 'Delete website backup'; ?> diff --git a/interface/lib/lang/ca.lng b/interface/lib/lang/ca.lng index 4a5fa7c252..a4cb98b528 100644 --- a/interface/lib/lang/ca.lng +++ b/interface/lib/lang/ca.lng @@ -180,4 +180,5 @@ $wb['datalog_status_d_client'] = 'Delete client'; $wb['datalog_status_i_domain'] = 'Create new domain'; $wb['datalog_status_u_domain'] = 'Update domain'; $wb['datalog_status_d_domain'] = 'Delete domain'; +$wb['datalog_status_d_web_backup'] = 'Delete website backup'; ?> diff --git a/interface/lib/lang/cn.lng b/interface/lib/lang/cn.lng index 7f0da4e44e..12801da70f 100644 --- a/interface/lib/lang/cn.lng +++ b/interface/lib/lang/cn.lng @@ -181,4 +181,5 @@ $wb['datalog_status_d_client'] = 'Delete client'; $wb['datalog_status_i_domain'] = 'Create new domain'; $wb['datalog_status_u_domain'] = 'Update domain'; $wb['datalog_status_d_domain'] = 'Delete domain'; +$wb['datalog_status_d_web_backup'] = 'Delete website backup'; ?> diff --git a/interface/lib/lang/cz.lng b/interface/lib/lang/cz.lng index 4ed689bba9..d05e33126d 100644 --- a/interface/lib/lang/cz.lng +++ b/interface/lib/lang/cz.lng @@ -180,4 +180,5 @@ $wb['datalog_status_d_client'] = 'Delete client'; $wb['datalog_status_i_domain'] = 'Create new domain'; $wb['datalog_status_u_domain'] = 'Update domain'; $wb['datalog_status_d_domain'] = 'Delete domain'; +$wb['datalog_status_d_web_backup'] = 'Delete website backup'; ?> diff --git a/interface/lib/lang/de.lng b/interface/lib/lang/de.lng index d7537bac04..01f1bf42ac 100644 --- a/interface/lib/lang/de.lng +++ b/interface/lib/lang/de.lng @@ -180,4 +180,5 @@ $wb['datalog_status_d_client'] = 'Delete client'; $wb['datalog_status_i_domain'] = 'Create new domain'; $wb['datalog_status_u_domain'] = 'Update domain'; $wb['datalog_status_d_domain'] = 'Delete domain'; +$wb['datalog_status_d_web_backup'] = 'Delete website backup'; ?> diff --git a/interface/lib/lang/dk.lng b/interface/lib/lang/dk.lng index ec8198fa6f..56534acbd3 100644 --- a/interface/lib/lang/dk.lng +++ b/interface/lib/lang/dk.lng @@ -180,4 +180,5 @@ $wb['datalog_status_d_client'] = 'Delete client'; $wb['datalog_status_i_domain'] = 'Create new domain'; $wb['datalog_status_u_domain'] = 'Update domain'; $wb['datalog_status_d_domain'] = 'Delete domain'; +$wb['datalog_status_d_web_backup'] = 'Delete website backup'; ?> diff --git a/interface/lib/lang/el.lng b/interface/lib/lang/el.lng index e15cf3be95..8f4482b458 100644 --- a/interface/lib/lang/el.lng +++ b/interface/lib/lang/el.lng @@ -180,4 +180,5 @@ $wb['datalog_status_d_client'] = 'Delete client'; $wb['datalog_status_i_domain'] = 'Create new domain'; $wb['datalog_status_u_domain'] = 'Update domain'; $wb['datalog_status_d_domain'] = 'Delete domain'; +$wb['datalog_status_d_web_backup'] = 'Delete website backup'; ?> diff --git a/interface/lib/lang/en.lng b/interface/lib/lang/en.lng index a92268f627..03df58afc7 100644 --- a/interface/lib/lang/en.lng +++ b/interface/lib/lang/en.lng @@ -181,4 +181,5 @@ $wb['server_id_0_error_txt'] = 'Please select a valid Server. Server ID must be $wb['datalog_changes_close_txt'] = 'Close'; $wb['non_admin_error'] = 'Requires administrator level permissions'; $wb['copy_to_clipboard_txt'] = 'Copy to clipboard'; +$wb['datalog_status_d_web_backup'] = 'Delete website backup'; ?> diff --git a/interface/lib/lang/es.lng b/interface/lib/lang/es.lng index 38ef203e1c..19b21e7d68 100644 --- a/interface/lib/lang/es.lng +++ b/interface/lib/lang/es.lng @@ -180,4 +180,5 @@ $wb['datalog_status_d_client'] = 'Delete client'; $wb['datalog_status_i_domain'] = 'Create new domain'; $wb['datalog_status_u_domain'] = 'Update domain'; $wb['datalog_status_d_domain'] = 'Delete domain'; +$wb['datalog_status_d_web_backup'] = 'Delete website backup'; ?> diff --git a/interface/lib/lang/fi.lng b/interface/lib/lang/fi.lng index 55c788f77c..de12aabc71 100644 --- a/interface/lib/lang/fi.lng +++ b/interface/lib/lang/fi.lng @@ -180,4 +180,5 @@ $wb['datalog_status_d_client'] = 'Delete client'; $wb['datalog_status_i_domain'] = 'Create new domain'; $wb['datalog_status_u_domain'] = 'Update domain'; $wb['datalog_status_d_domain'] = 'Delete domain'; +$wb['datalog_status_d_web_backup'] = 'Delete website backup'; ?> diff --git a/interface/lib/lang/fr.lng b/interface/lib/lang/fr.lng index ea3bac73c3..f9e64af8fc 100644 --- a/interface/lib/lang/fr.lng +++ b/interface/lib/lang/fr.lng @@ -180,4 +180,5 @@ $wb['datalog_status_d_client'] = 'Delete client'; $wb['datalog_status_i_domain'] = 'Create new domain'; $wb['datalog_status_u_domain'] = 'Update domain'; $wb['datalog_status_d_domain'] = 'Delete domain'; +$wb['datalog_status_d_web_backup'] = 'Delete website backup'; ?> diff --git a/interface/lib/lang/hr.lng b/interface/lib/lang/hr.lng index 878f73ba20..049deefb32 100644 --- a/interface/lib/lang/hr.lng +++ b/interface/lib/lang/hr.lng @@ -180,4 +180,5 @@ $wb['datalog_status_d_client'] = 'Delete client'; $wb['datalog_status_i_domain'] = 'Create new domain'; $wb['datalog_status_u_domain'] = 'Update domain'; $wb['datalog_status_d_domain'] = 'Delete domain'; +$wb['datalog_status_d_web_backup'] = 'Delete website backup'; ?> diff --git a/interface/lib/lang/hu.lng b/interface/lib/lang/hu.lng index 72b0882326..f581f26436 100644 --- a/interface/lib/lang/hu.lng +++ b/interface/lib/lang/hu.lng @@ -180,4 +180,5 @@ $wb['datalog_status_d_client'] = 'Delete client'; $wb['datalog_status_i_domain'] = 'Create new domain'; $wb['datalog_status_u_domain'] = 'Update domain'; $wb['datalog_status_d_domain'] = 'Delete domain'; +$wb['datalog_status_d_web_backup'] = 'Delete website backup'; ?> diff --git a/interface/lib/lang/id.lng b/interface/lib/lang/id.lng index 1df46044b4..c76dbb823b 100644 --- a/interface/lib/lang/id.lng +++ b/interface/lib/lang/id.lng @@ -180,4 +180,5 @@ $wb['datalog_status_d_client'] = 'Delete client'; $wb['datalog_status_i_domain'] = 'Create new domain'; $wb['datalog_status_u_domain'] = 'Update domain'; $wb['datalog_status_d_domain'] = 'Delete domain'; +$wb['datalog_status_d_web_backup'] = 'Delete website backup'; ?> diff --git a/interface/lib/lang/it.lng b/interface/lib/lang/it.lng index db4660a246..1669828a09 100644 --- a/interface/lib/lang/it.lng +++ b/interface/lib/lang/it.lng @@ -180,4 +180,5 @@ $wb['datalog_status_d_client'] = 'Delete client'; $wb['datalog_status_i_domain'] = 'Create new domain'; $wb['datalog_status_u_domain'] = 'Update domain'; $wb['datalog_status_d_domain'] = 'Delete domain'; +$wb['datalog_status_d_web_backup'] = 'Delete website backup'; ?> diff --git a/interface/lib/lang/ja.lng b/interface/lib/lang/ja.lng index 82e5b9850e..cf7c8afb07 100644 --- a/interface/lib/lang/ja.lng +++ b/interface/lib/lang/ja.lng @@ -180,4 +180,5 @@ $wb['datalog_status_d_client'] = 'Delete client'; $wb['datalog_status_i_domain'] = 'Create new domain'; $wb['datalog_status_u_domain'] = 'Update domain'; $wb['datalog_status_d_domain'] = 'Delete domain'; +$wb['datalog_status_d_web_backup'] = 'Delete website backup'; ?> diff --git a/interface/lib/lang/nl.lng b/interface/lib/lang/nl.lng index d428d807a8..ee19d32ed9 100644 --- a/interface/lib/lang/nl.lng +++ b/interface/lib/lang/nl.lng @@ -180,4 +180,5 @@ $wb['server_id_0_error_txt'] = 'Please select a valid Server. Server ID must be $wb['datalog_changes_close_txt'] = 'Sluiten'; $wb['non_admin_error'] = 'Requires administrator level permissions'; $wb['copy_to_clipboard_txt'] = 'Kopieer naar klembord'; +$wb['datalog_status_d_web_backup'] = 'Delete website backup'; ?> diff --git a/interface/lib/lang/pl.lng b/interface/lib/lang/pl.lng index bf2231c981..2828b9aa47 100644 --- a/interface/lib/lang/pl.lng +++ b/interface/lib/lang/pl.lng @@ -180,4 +180,5 @@ $wb['datalog_status_d_client'] = 'Delete client'; $wb['datalog_status_i_domain'] = 'Create new domain'; $wb['datalog_status_u_domain'] = 'Update domain'; $wb['datalog_status_d_domain'] = 'Delete domain'; +$wb['datalog_status_d_web_backup'] = 'Delete website backup'; ?> diff --git a/interface/lib/lang/pt.lng b/interface/lib/lang/pt.lng index d7ff100bf8..b69cbf6b33 100644 --- a/interface/lib/lang/pt.lng +++ b/interface/lib/lang/pt.lng @@ -180,4 +180,5 @@ $wb['datalog_status_d_client'] = 'Delete client'; $wb['datalog_status_i_domain'] = 'Create new domain'; $wb['datalog_status_u_domain'] = 'Update domain'; $wb['datalog_status_d_domain'] = 'Delete domain'; +$wb['datalog_status_d_web_backup'] = 'Delete website backup'; ?> diff --git a/interface/lib/lang/ro.lng b/interface/lib/lang/ro.lng index 3e38f9fb65..ef472f80ac 100644 --- a/interface/lib/lang/ro.lng +++ b/interface/lib/lang/ro.lng @@ -180,4 +180,5 @@ $wb['datalog_status_d_client'] = 'Delete client'; $wb['datalog_status_i_domain'] = 'Create new domain'; $wb['datalog_status_u_domain'] = 'Update domain'; $wb['datalog_status_d_domain'] = 'Delete domain'; +$wb['datalog_status_d_web_backup'] = 'Delete website backup'; ?> diff --git a/interface/lib/lang/ru.lng b/interface/lib/lang/ru.lng index 3dca27230d..30135547dc 100644 --- a/interface/lib/lang/ru.lng +++ b/interface/lib/lang/ru.lng @@ -180,4 +180,5 @@ $wb['datalog_status_d_client'] = 'Delete client'; $wb['datalog_status_i_domain'] = 'Create new domain'; $wb['datalog_status_u_domain'] = 'Update domain'; $wb['datalog_status_d_domain'] = 'Delete domain'; +$wb['datalog_status_d_web_backup'] = 'Delete website backup'; ?> diff --git a/interface/lib/lang/se.lng b/interface/lib/lang/se.lng index 1e5e770242..7ac9dfc262 100644 --- a/interface/lib/lang/se.lng +++ b/interface/lib/lang/se.lng @@ -180,4 +180,5 @@ $wb['datalog_status_d_client'] = 'Delete client'; $wb['datalog_status_i_domain'] = 'Create new domain'; $wb['datalog_status_u_domain'] = 'Update domain'; $wb['datalog_status_d_domain'] = 'Delete domain'; +$wb['datalog_status_d_web_backup'] = 'Delete website backup'; ?> diff --git a/interface/lib/lang/sk.lng b/interface/lib/lang/sk.lng index 01f77e616a..1798b84bdc 100644 --- a/interface/lib/lang/sk.lng +++ b/interface/lib/lang/sk.lng @@ -180,4 +180,5 @@ $wb['datalog_status_d_client'] = 'Delete client'; $wb['datalog_status_i_domain'] = 'Create new domain'; $wb['datalog_status_u_domain'] = 'Update domain'; $wb['datalog_status_d_domain'] = 'Delete domain'; +$wb['datalog_status_d_web_backup'] = 'Delete website backup'; ?> diff --git a/interface/lib/lang/tr.lng b/interface/lib/lang/tr.lng index 42ca64a087..e40172353c 100644 --- a/interface/lib/lang/tr.lng +++ b/interface/lib/lang/tr.lng @@ -181,4 +181,5 @@ $wb['datalog_status_d_client'] = 'Delete client'; $wb['datalog_status_i_domain'] = 'Create new domain'; $wb['datalog_status_u_domain'] = 'Update domain'; $wb['datalog_status_d_domain'] = 'Delete domain'; +$wb['datalog_status_d_web_backup'] = 'Delete website backup'; ?> From 9b8e5e54357329ae6804b30ee1e8c747c23545aa Mon Sep 17 00:00:00 2001 From: Herman van Rink Date: Fri, 9 Feb 2024 22:47:55 +0100 Subject: [PATCH 307/621] Add a delete button to the DNS zone settings page --- interface/web/dns/dns_soa_edit.php | 8 ++++++++ interface/web/dns/templates/dns_soa_edit.htm | 4 ++++ 2 files changed, 12 insertions(+) diff --git a/interface/web/dns/dns_soa_edit.php b/interface/web/dns/dns_soa_edit.php index e17571e736..f2f10180b1 100644 --- a/interface/web/dns/dns_soa_edit.php +++ b/interface/web/dns/dns_soa_edit.php @@ -227,6 +227,14 @@ function onShowEnd() { } } + $csrf_token = $app->auth->csrf_token_get('dns_soa_del'); + $app->tpl->setVar('_csrf_id', $csrf_token['csrf_id']); + $app->tpl->setVar('_csrf_key', $csrf_token['csrf_key']); + + $global_config = $app->getconf->get_global_config(); + $app->tpl->setVar('show_delete_on_forms', $global_config['misc']['show_delete_on_forms']); + + } else { $app->tpl->setVar("edit_disabled", 0); } diff --git a/interface/web/dns/templates/dns_soa_edit.htm b/interface/web/dns/templates/dns_soa_edit.htm index 97f3385030..a23d87e8cb 100644 --- a/interface/web/dns/templates/dns_soa_edit.htm +++ b/interface/web/dns/templates/dns_soa_edit.htm @@ -173,6 +173,10 @@
+ + +
From 43b8fa5a592b6eab9f44ed51a5dd680a0d9f3d1c Mon Sep 17 00:00:00 2001 From: Herman van Rink Date: Fri, 9 Feb 2024 22:50:19 +0100 Subject: [PATCH 308/621] Add a delete button to the Web Domain edit page --- interface/web/sites/templates/web_vhost_domain_edit.htm | 6 +++++- interface/web/sites/web_vhost_domain_edit.php | 7 +++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/interface/web/sites/templates/web_vhost_domain_edit.htm b/interface/web/sites/templates/web_vhost_domain_edit.htm index 356e03e2dc..c3c004bc00 100644 --- a/interface/web/sites/templates/web_vhost_domain_edit.htm +++ b/interface/web/sites/templates/web_vhost_domain_edit.htm @@ -278,7 +278,11 @@ -
+
+ + + +
diff --git a/interface/web/sites/web_vhost_domain_edit.php b/interface/web/sites/web_vhost_domain_edit.php index be9f0911c7..81d65f2d84 100644 --- a/interface/web/sites/web_vhost_domain_edit.php +++ b/interface/web/sites/web_vhost_domain_edit.php @@ -843,6 +843,13 @@ function onShowEnd() { $app->tpl->setVar('is_pagespeed_enabled', ($web_config['nginx_enable_pagespeed'])); } + $csrf_token = $app->auth->csrf_token_get('web_vhost_domain_del'); + $app->tpl->setVar('_csrf_id', $csrf_token['csrf_id']); + $app->tpl->setVar('_csrf_key', $csrf_token['csrf_key']); + + $global_config = $app->getconf->get_global_config(); + $app->tpl->setVar('show_delete_on_forms', $global_config['misc']['show_delete_on_forms']); + $app->tpl->setVar('app_module', 'sites'); parent::onShowEnd(); From 569c550a69f45b0105d2bdb79401f27e8101d7c5 Mon Sep 17 00:00:00 2001 From: Herman van Rink Date: Fri, 9 Feb 2024 23:21:27 +0100 Subject: [PATCH 309/621] Make the client domain searchable --- interface/web/client/form/domain.tform.php | 3 ++- interface/web/client/lib/lang/en_domain.lng | 1 + interface/web/dashboard/ajax_get_json.php | 3 +++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/interface/web/client/form/domain.tform.php b/interface/web/client/form/domain.tform.php index c96af934d7..0e8d3ffa1c 100644 --- a/interface/web/client/form/domain.tform.php +++ b/interface/web/client/form/domain.tform.php @@ -107,7 +107,8 @@ 'default' => '', 'value' => '', 'width' => '30', - 'maxlength' => '255' + 'maxlength' => '255', + 'searchable' => 1, ), //################################# // END Datatable fields diff --git a/interface/web/client/lib/lang/en_domain.lng b/interface/web/client/lib/lang/en_domain.lng index a66a2258af..50dc79323a 100644 --- a/interface/web/client/lib/lang/en_domain.lng +++ b/interface/web/client/lib/lang/en_domain.lng @@ -3,4 +3,5 @@ $wb['domain_error_empty'] = 'The domain-name is empty'; $wb['domain_error_unique'] = 'The domain already exists'; $wb['domain_error_regex'] = 'This domain-name is not allowed'; $wb['Domain'] = 'Domain'; +$wb['domain_txt'] = 'Domain'; ?> diff --git a/interface/web/dashboard/ajax_get_json.php b/interface/web/dashboard/ajax_get_json.php index 4c6612888d..0bd587ce01 100644 --- a/interface/web/dashboard/ajax_get_json.php +++ b/interface/web/dashboard/ajax_get_json.php @@ -54,6 +54,9 @@ // resellers $result[] = _search('client', 'reseller', "AND limit_client != 0"); + // client domains + $result[] = _search('client', 'domain'); + // web sites $result[] = _search('sites', 'web_vhost_domain', "AND type = 'vhost'"); From 7e670185e4ed35918e1acfe06af1578e0c6fae76 Mon Sep 17 00:00:00 2001 From: Herman van Rink Date: Fri, 9 Feb 2024 23:35:13 +0100 Subject: [PATCH 310/621] Add a delete button to the Client Domain edit page --- interface/web/client/domain_edit.php | 7 +++++++ interface/web/client/templates/domain_edit.htm | 6 +++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/interface/web/client/domain_edit.php b/interface/web/client/domain_edit.php index af7b900b91..78b7d53de7 100644 --- a/interface/web/client/domain_edit.php +++ b/interface/web/client/domain_edit.php @@ -130,6 +130,13 @@ function onShowEnd() { $app->tpl->setVar($wb); + $csrf_token = $app->auth->csrf_token_get('_domain_del'); + $app->tpl->setVar('_csrf_id', $csrf_token['csrf_id']); + $app->tpl->setVar('_csrf_key', $csrf_token['csrf_key']); + + $global_config = $app->getconf->get_global_config(); + $app->tpl->setVar('show_delete_on_forms', $global_config['misc']['show_delete_on_forms']); + parent::onShowEnd(); } diff --git a/interface/web/client/templates/domain_edit.htm b/interface/web/client/templates/domain_edit.htm index 97fefc85e0..8d2da4d03f 100644 --- a/interface/web/client/templates/domain_edit.htm +++ b/interface/web/client/templates/domain_edit.htm @@ -19,7 +19,11 @@ -
+
+ + + +
\ No newline at end of file From e5a43f7eddf2a471852d5eedd4a5461121ddfb46 Mon Sep 17 00:00:00 2001 From: Herman van Rink Date: Fri, 9 Feb 2024 23:40:49 +0100 Subject: [PATCH 311/621] Add translation strings --- interface/web/client/lib/lang/ar_domain.lng | 1 + interface/web/client/lib/lang/bg_domain.lng | 1 + interface/web/client/lib/lang/br_domain.lng | 1 + interface/web/client/lib/lang/ca_domain.lng | 1 + interface/web/client/lib/lang/cn_domain.lng | 1 + interface/web/client/lib/lang/cz_domain.lng | 1 + interface/web/client/lib/lang/de_domain.lng | 1 + interface/web/client/lib/lang/dk_domain.lng | 1 + interface/web/client/lib/lang/el_domain.lng | 1 + interface/web/client/lib/lang/es_domain.lng | 1 + interface/web/client/lib/lang/fi_domain.lng | 1 + interface/web/client/lib/lang/fr_domain.lng | 1 + interface/web/client/lib/lang/hr_domain.lng | 1 + interface/web/client/lib/lang/hu_domain.lng | 1 + interface/web/client/lib/lang/id_domain.lng | 1 + interface/web/client/lib/lang/it_domain.lng | 1 + interface/web/client/lib/lang/ja_domain.lng | 1 + interface/web/client/lib/lang/nl_domain.lng | 1 + interface/web/client/lib/lang/pl_domain.lng | 1 + interface/web/client/lib/lang/pt_domain.lng | 1 + interface/web/client/lib/lang/ro_domain.lng | 1 + interface/web/client/lib/lang/ru_domain.lng | 1 + interface/web/client/lib/lang/se_domain.lng | 1 + interface/web/client/lib/lang/sk_domain.lng | 1 + interface/web/client/lib/lang/tr_domain.lng | 1 + 25 files changed, 25 insertions(+) diff --git a/interface/web/client/lib/lang/ar_domain.lng b/interface/web/client/lib/lang/ar_domain.lng index a66a2258af..50dc79323a 100644 --- a/interface/web/client/lib/lang/ar_domain.lng +++ b/interface/web/client/lib/lang/ar_domain.lng @@ -3,4 +3,5 @@ $wb['domain_error_empty'] = 'The domain-name is empty'; $wb['domain_error_unique'] = 'The domain already exists'; $wb['domain_error_regex'] = 'This domain-name is not allowed'; $wb['Domain'] = 'Domain'; +$wb['domain_txt'] = 'Domain'; ?> diff --git a/interface/web/client/lib/lang/bg_domain.lng b/interface/web/client/lib/lang/bg_domain.lng index c60ae56045..fdffdcd26a 100644 --- a/interface/web/client/lib/lang/bg_domain.lng +++ b/interface/web/client/lib/lang/bg_domain.lng @@ -3,4 +3,5 @@ $wb['domain_error_empty'] = 'Името на домейна е празно'; $wb['domain_error_unique'] = 'Домейна съществува'; $wb['domain_error_regex'] = 'Това име на домейн не е разрешен.'; $wb['Domain'] = 'Домейн'; +$wb['domain_txt'] = 'Domain'; ?> diff --git a/interface/web/client/lib/lang/br_domain.lng b/interface/web/client/lib/lang/br_domain.lng index 0ebd82d63c..cafdc79358 100644 --- a/interface/web/client/lib/lang/br_domain.lng +++ b/interface/web/client/lib/lang/br_domain.lng @@ -3,3 +3,4 @@ $wb['domain_error_empty'] = 'O domínio está vazio.'; $wb['domain_error_unique'] = 'O domínio já existe.'; $wb['domain_error_regex'] = 'O nome do domínio não é permitido.'; $wb['Domain'] = 'Domínio'; +$wb['domain_txt'] = 'Domain'; diff --git a/interface/web/client/lib/lang/ca_domain.lng b/interface/web/client/lib/lang/ca_domain.lng index f94d21bbe5..7ca7e894a1 100644 --- a/interface/web/client/lib/lang/ca_domain.lng +++ b/interface/web/client/lib/lang/ca_domain.lng @@ -3,4 +3,5 @@ $wb['domain_error_empty'] = 'Le nom de domaine est vide'; $wb['domain_error_unique'] = 'Ce nom de domaine existe déjà'; $wb['domain_error_regex'] = 'Ce nom de domaine n\'est pas autorisé'; $wb['Domain'] = 'Domaine'; +$wb['domain_txt'] = 'Domain'; ?> diff --git a/interface/web/client/lib/lang/cn_domain.lng b/interface/web/client/lib/lang/cn_domain.lng index dbdac298a6..022feb4ba4 100644 --- a/interface/web/client/lib/lang/cn_domain.lng +++ b/interface/web/client/lib/lang/cn_domain.lng @@ -3,4 +3,5 @@ $wb['domain_error_empty'] = '域名为空'; $wb['domain_error_unique'] = '域名已存在'; $wb['domain_error_regex'] = '该域名不被允许'; $wb['Domain'] = '域名'; +$wb['domain_txt'] = 'Domain'; ?> diff --git a/interface/web/client/lib/lang/cz_domain.lng b/interface/web/client/lib/lang/cz_domain.lng index 33d634d8e3..c40ae34ce2 100644 --- a/interface/web/client/lib/lang/cz_domain.lng +++ b/interface/web/client/lib/lang/cz_domain.lng @@ -3,3 +3,4 @@ $wb['domain_error_empty'] = 'Doménové jméno je prázdné'; $wb['domain_error_unique'] = 'Doména již existuje'; $wb['domain_error_regex'] = 'Toto doménové jméno je zakázáno'; $wb['Domain'] = 'Doména'; +$wb['domain_txt'] = 'Domain'; diff --git a/interface/web/client/lib/lang/de_domain.lng b/interface/web/client/lib/lang/de_domain.lng index eb4276a3f8..3b0ab87a4b 100644 --- a/interface/web/client/lib/lang/de_domain.lng +++ b/interface/web/client/lib/lang/de_domain.lng @@ -3,4 +3,5 @@ $wb['domain_error_empty'] = 'Der Domain Name darf nicht leer sein'; $wb['domain_error_unique'] = 'Die Domain existiert bereits'; $wb['domain_error_regex'] = 'Dieser Domain Name ist nicht gültig'; $wb['Domain'] = 'Domain'; +$wb['domain_txt'] = 'Domain'; ?> diff --git a/interface/web/client/lib/lang/dk_domain.lng b/interface/web/client/lib/lang/dk_domain.lng index cd9c60de58..240c9e9f29 100644 --- a/interface/web/client/lib/lang/dk_domain.lng +++ b/interface/web/client/lib/lang/dk_domain.lng @@ -3,4 +3,5 @@ $wb['domain_error_empty'] = 'Domæne-navn er tomt'; $wb['domain_error_unique'] = 'Domænet findes allerede'; $wb['domain_error_regex'] = 'Dette domæne-navn er ikke tilladt'; $wb['Domain'] = 'Domæne'; +$wb['domain_txt'] = 'Domain'; ?> diff --git a/interface/web/client/lib/lang/el_domain.lng b/interface/web/client/lib/lang/el_domain.lng index 696d10da42..624c72cd1d 100644 --- a/interface/web/client/lib/lang/el_domain.lng +++ b/interface/web/client/lib/lang/el_domain.lng @@ -3,4 +3,5 @@ $wb['domain_error_empty'] = 'Το όνομα domain δεν έχει οριστε $wb['domain_error_unique'] = 'Το όνομα domain υπάρχει'; $wb['domain_error_regex'] = 'Το όνομα domain δεν επιτρέπεται'; $wb['Domain'] = 'Domain'; +$wb['domain_txt'] = 'Domain'; ?> diff --git a/interface/web/client/lib/lang/es_domain.lng b/interface/web/client/lib/lang/es_domain.lng index 95ccf9ae23..525eee7a87 100644 --- a/interface/web/client/lib/lang/es_domain.lng +++ b/interface/web/client/lib/lang/es_domain.lng @@ -3,4 +3,5 @@ $wb['Domain'] = 'Dominio'; $wb['domain_error_empty'] = 'El nombre de dominio está vacío'; $wb['domain_error_regex'] = 'Este nombre de dominio no esta permitido'; $wb['domain_error_unique'] = 'El dominio ya existe'; +$wb['domain_txt'] = 'Domain'; ?> diff --git a/interface/web/client/lib/lang/fi_domain.lng b/interface/web/client/lib/lang/fi_domain.lng index a66a2258af..50dc79323a 100644 --- a/interface/web/client/lib/lang/fi_domain.lng +++ b/interface/web/client/lib/lang/fi_domain.lng @@ -3,4 +3,5 @@ $wb['domain_error_empty'] = 'The domain-name is empty'; $wb['domain_error_unique'] = 'The domain already exists'; $wb['domain_error_regex'] = 'This domain-name is not allowed'; $wb['Domain'] = 'Domain'; +$wb['domain_txt'] = 'Domain'; ?> diff --git a/interface/web/client/lib/lang/fr_domain.lng b/interface/web/client/lib/lang/fr_domain.lng index 03b7c14c28..d0b489518f 100644 --- a/interface/web/client/lib/lang/fr_domain.lng +++ b/interface/web/client/lib/lang/fr_domain.lng @@ -3,4 +3,5 @@ $wb['domain_error_empty'] = 'Le nom de domaine est vide'; $wb['domain_error_unique'] = 'Ce nom de domaine existe déjà'; $wb['domain_error_regex'] = 'Ce nom de domaine n’est pas autorisé'; $wb['Domain'] = 'Domaine'; +$wb['domain_txt'] = 'Domain'; ?> diff --git a/interface/web/client/lib/lang/hr_domain.lng b/interface/web/client/lib/lang/hr_domain.lng index 784ccc63b7..d557bfa631 100644 --- a/interface/web/client/lib/lang/hr_domain.lng +++ b/interface/web/client/lib/lang/hr_domain.lng @@ -3,4 +3,5 @@ $wb['domain_error_empty'] = 'Ime domene je prazno'; $wb['domain_error_unique'] = 'Domena već postoji'; $wb['domain_error_regex'] = 'Ovo ime domene ne možete upotrijebiti'; $wb['Domain'] = 'Domain'; +$wb['domain_txt'] = 'Domain'; ?> diff --git a/interface/web/client/lib/lang/hu_domain.lng b/interface/web/client/lib/lang/hu_domain.lng index a66a2258af..50dc79323a 100644 --- a/interface/web/client/lib/lang/hu_domain.lng +++ b/interface/web/client/lib/lang/hu_domain.lng @@ -3,4 +3,5 @@ $wb['domain_error_empty'] = 'The domain-name is empty'; $wb['domain_error_unique'] = 'The domain already exists'; $wb['domain_error_regex'] = 'This domain-name is not allowed'; $wb['Domain'] = 'Domain'; +$wb['domain_txt'] = 'Domain'; ?> diff --git a/interface/web/client/lib/lang/id_domain.lng b/interface/web/client/lib/lang/id_domain.lng index 2091e872f9..73ea445c79 100644 --- a/interface/web/client/lib/lang/id_domain.lng +++ b/interface/web/client/lib/lang/id_domain.lng @@ -3,4 +3,5 @@ $wb['domain_error_empty'] = 'Nama Domain kosong'; $wb['domain_error_unique'] = 'Domain sudah ada'; $wb['domain_error_regex'] = 'Nama Domain ini tidak diperbolehkan'; $wb['Domain'] = 'Domain'; +$wb['domain_txt'] = 'Domain'; ?> diff --git a/interface/web/client/lib/lang/it_domain.lng b/interface/web/client/lib/lang/it_domain.lng index dba372981a..bb7c9e6640 100644 --- a/interface/web/client/lib/lang/it_domain.lng +++ b/interface/web/client/lib/lang/it_domain.lng @@ -3,4 +3,5 @@ $wb['domain_error_empty'] = 'Nome dominio è vuoto'; $wb['domain_error_unique'] = 'Dominio già esistente'; $wb['domain_error_regex'] = 'Questo nome di dominio non è permesso'; $wb['Domain'] = 'Dominio'; +$wb['domain_txt'] = 'Domain'; ?> diff --git a/interface/web/client/lib/lang/ja_domain.lng b/interface/web/client/lib/lang/ja_domain.lng index a66a2258af..50dc79323a 100644 --- a/interface/web/client/lib/lang/ja_domain.lng +++ b/interface/web/client/lib/lang/ja_domain.lng @@ -3,4 +3,5 @@ $wb['domain_error_empty'] = 'The domain-name is empty'; $wb['domain_error_unique'] = 'The domain already exists'; $wb['domain_error_regex'] = 'This domain-name is not allowed'; $wb['Domain'] = 'Domain'; +$wb['domain_txt'] = 'Domain'; ?> diff --git a/interface/web/client/lib/lang/nl_domain.lng b/interface/web/client/lib/lang/nl_domain.lng index c1da1b741d..78c728bc47 100644 --- a/interface/web/client/lib/lang/nl_domain.lng +++ b/interface/web/client/lib/lang/nl_domain.lng @@ -3,4 +3,5 @@ $wb['domain_error_empty'] = 'De domein naam is niet ingevuld'; $wb['domain_error_unique'] = 'Het domein bestaat reeds'; $wb['domain_error_regex'] = 'Deze domein naam is niet toegestaan'; $wb['Domain'] = 'Domein'; +$wb['domain_txt'] = 'Domain'; ?> diff --git a/interface/web/client/lib/lang/pl_domain.lng b/interface/web/client/lib/lang/pl_domain.lng index 9f3e80ff64..f80dea959f 100644 --- a/interface/web/client/lib/lang/pl_domain.lng +++ b/interface/web/client/lib/lang/pl_domain.lng @@ -3,4 +3,5 @@ $wb['domain_error_empty'] = 'Nazwa domeny jest pusta'; $wb['domain_error_unique'] = 'Domena o podanej nazwie już istnieje'; $wb['domain_error_regex'] = 'Nazwa domeny jest niedopuszczalna'; $wb['Domain'] = 'Domena'; +$wb['domain_txt'] = 'Domain'; ?> diff --git a/interface/web/client/lib/lang/pt_domain.lng b/interface/web/client/lib/lang/pt_domain.lng index a66a2258af..50dc79323a 100644 --- a/interface/web/client/lib/lang/pt_domain.lng +++ b/interface/web/client/lib/lang/pt_domain.lng @@ -3,4 +3,5 @@ $wb['domain_error_empty'] = 'The domain-name is empty'; $wb['domain_error_unique'] = 'The domain already exists'; $wb['domain_error_regex'] = 'This domain-name is not allowed'; $wb['Domain'] = 'Domain'; +$wb['domain_txt'] = 'Domain'; ?> diff --git a/interface/web/client/lib/lang/ro_domain.lng b/interface/web/client/lib/lang/ro_domain.lng index a66a2258af..50dc79323a 100644 --- a/interface/web/client/lib/lang/ro_domain.lng +++ b/interface/web/client/lib/lang/ro_domain.lng @@ -3,4 +3,5 @@ $wb['domain_error_empty'] = 'The domain-name is empty'; $wb['domain_error_unique'] = 'The domain already exists'; $wb['domain_error_regex'] = 'This domain-name is not allowed'; $wb['Domain'] = 'Domain'; +$wb['domain_txt'] = 'Domain'; ?> diff --git a/interface/web/client/lib/lang/ru_domain.lng b/interface/web/client/lib/lang/ru_domain.lng index 50f0d3f2fc..a387fb970e 100644 --- a/interface/web/client/lib/lang/ru_domain.lng +++ b/interface/web/client/lib/lang/ru_domain.lng @@ -3,4 +3,5 @@ $wb['domain_error_empty'] = 'Домен пустой.'; $wb['domain_error_unique'] = 'Имя должно быть уникальным.'; $wb['domain_error_regex'] = 'Некорректное имя домена.'; $wb['Domain'] = 'Домен'; +$wb['domain_txt'] = 'Domain'; ?> diff --git a/interface/web/client/lib/lang/se_domain.lng b/interface/web/client/lib/lang/se_domain.lng index df60bbeca2..b300fb890a 100644 --- a/interface/web/client/lib/lang/se_domain.lng +++ b/interface/web/client/lib/lang/se_domain.lng @@ -3,4 +3,5 @@ $wb['domain_error_empty'] = 'Domännamnet är tomt'; $wb['domain_error_unique'] = 'Domänen finns redan'; $wb['domain_error_regex'] = 'Denna domän är ogiltig'; $wb['Domain'] = 'Domän'; +$wb['domain_txt'] = 'Domain'; ?> diff --git a/interface/web/client/lib/lang/sk_domain.lng b/interface/web/client/lib/lang/sk_domain.lng index a66a2258af..50dc79323a 100644 --- a/interface/web/client/lib/lang/sk_domain.lng +++ b/interface/web/client/lib/lang/sk_domain.lng @@ -3,4 +3,5 @@ $wb['domain_error_empty'] = 'The domain-name is empty'; $wb['domain_error_unique'] = 'The domain already exists'; $wb['domain_error_regex'] = 'This domain-name is not allowed'; $wb['Domain'] = 'Domain'; +$wb['domain_txt'] = 'Domain'; ?> diff --git a/interface/web/client/lib/lang/tr_domain.lng b/interface/web/client/lib/lang/tr_domain.lng index d0b4e228da..3f7312bf8a 100644 --- a/interface/web/client/lib/lang/tr_domain.lng +++ b/interface/web/client/lib/lang/tr_domain.lng @@ -3,4 +3,5 @@ $wb['domain_error_empty'] = 'Etki alanı boş olamaz'; $wb['domain_error_unique'] = 'Aynı etki alanı zaten var'; $wb['domain_error_regex'] = 'Bu etki alanına izin verilmiyor'; $wb['Domain'] = 'Etki Alanı'; +$wb['domain_txt'] = 'Domain'; ?> From 0b927681fba4640a09bc01d404cf3970871d02f5 Mon Sep 17 00:00:00 2001 From: Herman van Rink Date: Sat, 10 Feb 2024 21:03:15 +0100 Subject: [PATCH 312/621] Add new setting show_delete_on_forms=n to template --- install/tpl/system.ini.master | 1 + 1 file changed, 1 insertion(+) diff --git a/install/tpl/system.ini.master b/install/tpl/system.ini.master index 0c4254f87b..79baa94700 100644 --- a/install/tpl/system.ini.master +++ b/install/tpl/system.ini.master @@ -75,3 +75,4 @@ session_timeout=0 session_allow_endless=0 min_password_length=8 min_password_strength=3 +show_delete_on_forms=n From 88618ced0e859897ad53329324c717c0467b94ce Mon Sep 17 00:00:00 2001 From: Herman van Rink Date: Sat, 10 Feb 2024 23:05:45 +0100 Subject: [PATCH 313/621] Add a translation string for datalog_status_?_dns_template --- interface/lib/lang/ar.lng | 3 +++ interface/lib/lang/bg.lng | 3 +++ interface/lib/lang/br.lng | 3 +++ interface/lib/lang/ca.lng | 3 +++ interface/lib/lang/cn.lng | 3 +++ interface/lib/lang/cz.lng | 3 +++ interface/lib/lang/de.lng | 3 +++ interface/lib/lang/dk.lng | 3 +++ interface/lib/lang/el.lng | 3 +++ interface/lib/lang/en.lng | 3 +++ interface/lib/lang/es.lng | 3 +++ interface/lib/lang/fi.lng | 3 +++ interface/lib/lang/fr.lng | 3 +++ interface/lib/lang/hr.lng | 3 +++ interface/lib/lang/hu.lng | 3 +++ interface/lib/lang/id.lng | 3 +++ interface/lib/lang/it.lng | 3 +++ interface/lib/lang/ja.lng | 3 +++ interface/lib/lang/nl.lng | 3 +++ interface/lib/lang/pl.lng | 3 +++ interface/lib/lang/pt.lng | 3 +++ interface/lib/lang/ro.lng | 3 +++ interface/lib/lang/ru.lng | 3 +++ interface/lib/lang/se.lng | 3 +++ interface/lib/lang/sk.lng | 3 +++ interface/lib/lang/tr.lng | 3 +++ 26 files changed, 78 insertions(+) diff --git a/interface/lib/lang/ar.lng b/interface/lib/lang/ar.lng index 45a62165d2..d00c7dc1b3 100644 --- a/interface/lib/lang/ar.lng +++ b/interface/lib/lang/ar.lng @@ -181,4 +181,7 @@ $wb['datalog_status_i_domain'] = 'Create new domain'; $wb['datalog_status_u_domain'] = 'Update domain'; $wb['datalog_status_d_domain'] = 'Delete domain'; $wb['datalog_status_d_web_backup'] = 'Delete website backup'; +$wb['datalog_status_i_dns_template'] = 'Create DNS template'; +$wb['datalog_status_u_dns_template'] = 'Update DNS template'; +$wb['datalog_status_d_dns_template'] = 'Delete DNS template'; ?> diff --git a/interface/lib/lang/bg.lng b/interface/lib/lang/bg.lng index fc4a4fc366..35bec0ab45 100644 --- a/interface/lib/lang/bg.lng +++ b/interface/lib/lang/bg.lng @@ -181,4 +181,7 @@ $wb['datalog_status_i_domain'] = 'Create new domain'; $wb['datalog_status_u_domain'] = 'Update domain'; $wb['datalog_status_d_domain'] = 'Delete domain'; $wb['datalog_status_d_web_backup'] = 'Delete website backup'; +$wb['datalog_status_i_dns_template'] = 'Create DNS template'; +$wb['datalog_status_u_dns_template'] = 'Update DNS template'; +$wb['datalog_status_d_dns_template'] = 'Delete DNS template'; ?> diff --git a/interface/lib/lang/br.lng b/interface/lib/lang/br.lng index bb1353a12e..4195702e25 100644 --- a/interface/lib/lang/br.lng +++ b/interface/lib/lang/br.lng @@ -181,4 +181,7 @@ $wb['datalog_status_i_domain'] = 'Create new domain'; $wb['datalog_status_u_domain'] = 'Update domain'; $wb['datalog_status_d_domain'] = 'Delete domain'; $wb['datalog_status_d_web_backup'] = 'Delete website backup'; +$wb['datalog_status_i_dns_template'] = 'Create DNS template'; +$wb['datalog_status_u_dns_template'] = 'Update DNS template'; +$wb['datalog_status_d_dns_template'] = 'Delete DNS template'; ?> diff --git a/interface/lib/lang/ca.lng b/interface/lib/lang/ca.lng index a4cb98b528..2d61af651a 100644 --- a/interface/lib/lang/ca.lng +++ b/interface/lib/lang/ca.lng @@ -181,4 +181,7 @@ $wb['datalog_status_i_domain'] = 'Create new domain'; $wb['datalog_status_u_domain'] = 'Update domain'; $wb['datalog_status_d_domain'] = 'Delete domain'; $wb['datalog_status_d_web_backup'] = 'Delete website backup'; +$wb['datalog_status_i_dns_template'] = 'Create DNS template'; +$wb['datalog_status_u_dns_template'] = 'Update DNS template'; +$wb['datalog_status_d_dns_template'] = 'Delete DNS template'; ?> diff --git a/interface/lib/lang/cn.lng b/interface/lib/lang/cn.lng index 12801da70f..cbb6ace68a 100644 --- a/interface/lib/lang/cn.lng +++ b/interface/lib/lang/cn.lng @@ -182,4 +182,7 @@ $wb['datalog_status_i_domain'] = 'Create new domain'; $wb['datalog_status_u_domain'] = 'Update domain'; $wb['datalog_status_d_domain'] = 'Delete domain'; $wb['datalog_status_d_web_backup'] = 'Delete website backup'; +$wb['datalog_status_i_dns_template'] = 'Create DNS template'; +$wb['datalog_status_u_dns_template'] = 'Update DNS template'; +$wb['datalog_status_d_dns_template'] = 'Delete DNS template'; ?> diff --git a/interface/lib/lang/cz.lng b/interface/lib/lang/cz.lng index d05e33126d..880f4fea11 100644 --- a/interface/lib/lang/cz.lng +++ b/interface/lib/lang/cz.lng @@ -181,4 +181,7 @@ $wb['datalog_status_i_domain'] = 'Create new domain'; $wb['datalog_status_u_domain'] = 'Update domain'; $wb['datalog_status_d_domain'] = 'Delete domain'; $wb['datalog_status_d_web_backup'] = 'Delete website backup'; +$wb['datalog_status_i_dns_template'] = 'Create DNS template'; +$wb['datalog_status_u_dns_template'] = 'Update DNS template'; +$wb['datalog_status_d_dns_template'] = 'Delete DNS template'; ?> diff --git a/interface/lib/lang/de.lng b/interface/lib/lang/de.lng index 01f1bf42ac..885feb171b 100644 --- a/interface/lib/lang/de.lng +++ b/interface/lib/lang/de.lng @@ -181,4 +181,7 @@ $wb['datalog_status_i_domain'] = 'Create new domain'; $wb['datalog_status_u_domain'] = 'Update domain'; $wb['datalog_status_d_domain'] = 'Delete domain'; $wb['datalog_status_d_web_backup'] = 'Delete website backup'; +$wb['datalog_status_i_dns_template'] = 'Create DNS template'; +$wb['datalog_status_u_dns_template'] = 'Update DNS template'; +$wb['datalog_status_d_dns_template'] = 'Delete DNS template'; ?> diff --git a/interface/lib/lang/dk.lng b/interface/lib/lang/dk.lng index 56534acbd3..6082b1a391 100644 --- a/interface/lib/lang/dk.lng +++ b/interface/lib/lang/dk.lng @@ -181,4 +181,7 @@ $wb['datalog_status_i_domain'] = 'Create new domain'; $wb['datalog_status_u_domain'] = 'Update domain'; $wb['datalog_status_d_domain'] = 'Delete domain'; $wb['datalog_status_d_web_backup'] = 'Delete website backup'; +$wb['datalog_status_i_dns_template'] = 'Create DNS template'; +$wb['datalog_status_u_dns_template'] = 'Update DNS template'; +$wb['datalog_status_d_dns_template'] = 'Delete DNS template'; ?> diff --git a/interface/lib/lang/el.lng b/interface/lib/lang/el.lng index 8f4482b458..fb45cd8b68 100644 --- a/interface/lib/lang/el.lng +++ b/interface/lib/lang/el.lng @@ -181,4 +181,7 @@ $wb['datalog_status_i_domain'] = 'Create new domain'; $wb['datalog_status_u_domain'] = 'Update domain'; $wb['datalog_status_d_domain'] = 'Delete domain'; $wb['datalog_status_d_web_backup'] = 'Delete website backup'; +$wb['datalog_status_i_dns_template'] = 'Create DNS template'; +$wb['datalog_status_u_dns_template'] = 'Update DNS template'; +$wb['datalog_status_d_dns_template'] = 'Delete DNS template'; ?> diff --git a/interface/lib/lang/en.lng b/interface/lib/lang/en.lng index 03df58afc7..866a1249de 100644 --- a/interface/lib/lang/en.lng +++ b/interface/lib/lang/en.lng @@ -182,4 +182,7 @@ $wb['datalog_changes_close_txt'] = 'Close'; $wb['non_admin_error'] = 'Requires administrator level permissions'; $wb['copy_to_clipboard_txt'] = 'Copy to clipboard'; $wb['datalog_status_d_web_backup'] = 'Delete website backup'; +$wb['datalog_status_i_dns_template'] = 'Create DNS template'; +$wb['datalog_status_u_dns_template'] = 'Update DNS template'; +$wb['datalog_status_d_dns_template'] = 'Delete DNS template'; ?> diff --git a/interface/lib/lang/es.lng b/interface/lib/lang/es.lng index 19b21e7d68..bc2ead77a8 100644 --- a/interface/lib/lang/es.lng +++ b/interface/lib/lang/es.lng @@ -181,4 +181,7 @@ $wb['datalog_status_i_domain'] = 'Create new domain'; $wb['datalog_status_u_domain'] = 'Update domain'; $wb['datalog_status_d_domain'] = 'Delete domain'; $wb['datalog_status_d_web_backup'] = 'Delete website backup'; +$wb['datalog_status_i_dns_template'] = 'Create DNS template'; +$wb['datalog_status_u_dns_template'] = 'Update DNS template'; +$wb['datalog_status_d_dns_template'] = 'Delete DNS template'; ?> diff --git a/interface/lib/lang/fi.lng b/interface/lib/lang/fi.lng index de12aabc71..b8f1c502fc 100644 --- a/interface/lib/lang/fi.lng +++ b/interface/lib/lang/fi.lng @@ -181,4 +181,7 @@ $wb['datalog_status_i_domain'] = 'Create new domain'; $wb['datalog_status_u_domain'] = 'Update domain'; $wb['datalog_status_d_domain'] = 'Delete domain'; $wb['datalog_status_d_web_backup'] = 'Delete website backup'; +$wb['datalog_status_i_dns_template'] = 'Create DNS template'; +$wb['datalog_status_u_dns_template'] = 'Update DNS template'; +$wb['datalog_status_d_dns_template'] = 'Delete DNS template'; ?> diff --git a/interface/lib/lang/fr.lng b/interface/lib/lang/fr.lng index f9e64af8fc..273cc125dc 100644 --- a/interface/lib/lang/fr.lng +++ b/interface/lib/lang/fr.lng @@ -181,4 +181,7 @@ $wb['datalog_status_i_domain'] = 'Create new domain'; $wb['datalog_status_u_domain'] = 'Update domain'; $wb['datalog_status_d_domain'] = 'Delete domain'; $wb['datalog_status_d_web_backup'] = 'Delete website backup'; +$wb['datalog_status_i_dns_template'] = 'Create DNS template'; +$wb['datalog_status_u_dns_template'] = 'Update DNS template'; +$wb['datalog_status_d_dns_template'] = 'Delete DNS template'; ?> diff --git a/interface/lib/lang/hr.lng b/interface/lib/lang/hr.lng index 049deefb32..bf52fe0be5 100644 --- a/interface/lib/lang/hr.lng +++ b/interface/lib/lang/hr.lng @@ -181,4 +181,7 @@ $wb['datalog_status_i_domain'] = 'Create new domain'; $wb['datalog_status_u_domain'] = 'Update domain'; $wb['datalog_status_d_domain'] = 'Delete domain'; $wb['datalog_status_d_web_backup'] = 'Delete website backup'; +$wb['datalog_status_i_dns_template'] = 'Create DNS template'; +$wb['datalog_status_u_dns_template'] = 'Update DNS template'; +$wb['datalog_status_d_dns_template'] = 'Delete DNS template'; ?> diff --git a/interface/lib/lang/hu.lng b/interface/lib/lang/hu.lng index f581f26436..732e078f8a 100644 --- a/interface/lib/lang/hu.lng +++ b/interface/lib/lang/hu.lng @@ -181,4 +181,7 @@ $wb['datalog_status_i_domain'] = 'Create new domain'; $wb['datalog_status_u_domain'] = 'Update domain'; $wb['datalog_status_d_domain'] = 'Delete domain'; $wb['datalog_status_d_web_backup'] = 'Delete website backup'; +$wb['datalog_status_i_dns_template'] = 'Create DNS template'; +$wb['datalog_status_u_dns_template'] = 'Update DNS template'; +$wb['datalog_status_d_dns_template'] = 'Delete DNS template'; ?> diff --git a/interface/lib/lang/id.lng b/interface/lib/lang/id.lng index c76dbb823b..970f7d8396 100644 --- a/interface/lib/lang/id.lng +++ b/interface/lib/lang/id.lng @@ -181,4 +181,7 @@ $wb['datalog_status_i_domain'] = 'Create new domain'; $wb['datalog_status_u_domain'] = 'Update domain'; $wb['datalog_status_d_domain'] = 'Delete domain'; $wb['datalog_status_d_web_backup'] = 'Delete website backup'; +$wb['datalog_status_i_dns_template'] = 'Create DNS template'; +$wb['datalog_status_u_dns_template'] = 'Update DNS template'; +$wb['datalog_status_d_dns_template'] = 'Delete DNS template'; ?> diff --git a/interface/lib/lang/it.lng b/interface/lib/lang/it.lng index 1669828a09..235c86e836 100644 --- a/interface/lib/lang/it.lng +++ b/interface/lib/lang/it.lng @@ -181,4 +181,7 @@ $wb['datalog_status_i_domain'] = 'Create new domain'; $wb['datalog_status_u_domain'] = 'Update domain'; $wb['datalog_status_d_domain'] = 'Delete domain'; $wb['datalog_status_d_web_backup'] = 'Delete website backup'; +$wb['datalog_status_i_dns_template'] = 'Create DNS template'; +$wb['datalog_status_u_dns_template'] = 'Update DNS template'; +$wb['datalog_status_d_dns_template'] = 'Delete DNS template'; ?> diff --git a/interface/lib/lang/ja.lng b/interface/lib/lang/ja.lng index cf7c8afb07..657b6128b1 100644 --- a/interface/lib/lang/ja.lng +++ b/interface/lib/lang/ja.lng @@ -181,4 +181,7 @@ $wb['datalog_status_i_domain'] = 'Create new domain'; $wb['datalog_status_u_domain'] = 'Update domain'; $wb['datalog_status_d_domain'] = 'Delete domain'; $wb['datalog_status_d_web_backup'] = 'Delete website backup'; +$wb['datalog_status_i_dns_template'] = 'Create DNS template'; +$wb['datalog_status_u_dns_template'] = 'Update DNS template'; +$wb['datalog_status_d_dns_template'] = 'Delete DNS template'; ?> diff --git a/interface/lib/lang/nl.lng b/interface/lib/lang/nl.lng index ee19d32ed9..577c0ec70a 100644 --- a/interface/lib/lang/nl.lng +++ b/interface/lib/lang/nl.lng @@ -181,4 +181,7 @@ $wb['datalog_changes_close_txt'] = 'Sluiten'; $wb['non_admin_error'] = 'Requires administrator level permissions'; $wb['copy_to_clipboard_txt'] = 'Kopieer naar klembord'; $wb['datalog_status_d_web_backup'] = 'Delete website backup'; +$wb['datalog_status_i_dns_template'] = 'Create DNS template'; +$wb['datalog_status_u_dns_template'] = 'Update DNS template'; +$wb['datalog_status_d_dns_template'] = 'Delete DNS template'; ?> diff --git a/interface/lib/lang/pl.lng b/interface/lib/lang/pl.lng index 2828b9aa47..e33f45575e 100644 --- a/interface/lib/lang/pl.lng +++ b/interface/lib/lang/pl.lng @@ -181,4 +181,7 @@ $wb['datalog_status_i_domain'] = 'Create new domain'; $wb['datalog_status_u_domain'] = 'Update domain'; $wb['datalog_status_d_domain'] = 'Delete domain'; $wb['datalog_status_d_web_backup'] = 'Delete website backup'; +$wb['datalog_status_i_dns_template'] = 'Create DNS template'; +$wb['datalog_status_u_dns_template'] = 'Update DNS template'; +$wb['datalog_status_d_dns_template'] = 'Delete DNS template'; ?> diff --git a/interface/lib/lang/pt.lng b/interface/lib/lang/pt.lng index b69cbf6b33..95fb1f2ddb 100644 --- a/interface/lib/lang/pt.lng +++ b/interface/lib/lang/pt.lng @@ -181,4 +181,7 @@ $wb['datalog_status_i_domain'] = 'Create new domain'; $wb['datalog_status_u_domain'] = 'Update domain'; $wb['datalog_status_d_domain'] = 'Delete domain'; $wb['datalog_status_d_web_backup'] = 'Delete website backup'; +$wb['datalog_status_i_dns_template'] = 'Create DNS template'; +$wb['datalog_status_u_dns_template'] = 'Update DNS template'; +$wb['datalog_status_d_dns_template'] = 'Delete DNS template'; ?> diff --git a/interface/lib/lang/ro.lng b/interface/lib/lang/ro.lng index ef472f80ac..6ec3d59702 100644 --- a/interface/lib/lang/ro.lng +++ b/interface/lib/lang/ro.lng @@ -181,4 +181,7 @@ $wb['datalog_status_i_domain'] = 'Create new domain'; $wb['datalog_status_u_domain'] = 'Update domain'; $wb['datalog_status_d_domain'] = 'Delete domain'; $wb['datalog_status_d_web_backup'] = 'Delete website backup'; +$wb['datalog_status_i_dns_template'] = 'Create DNS template'; +$wb['datalog_status_u_dns_template'] = 'Update DNS template'; +$wb['datalog_status_d_dns_template'] = 'Delete DNS template'; ?> diff --git a/interface/lib/lang/ru.lng b/interface/lib/lang/ru.lng index 30135547dc..0bf578468e 100644 --- a/interface/lib/lang/ru.lng +++ b/interface/lib/lang/ru.lng @@ -181,4 +181,7 @@ $wb['datalog_status_i_domain'] = 'Create new domain'; $wb['datalog_status_u_domain'] = 'Update domain'; $wb['datalog_status_d_domain'] = 'Delete domain'; $wb['datalog_status_d_web_backup'] = 'Delete website backup'; +$wb['datalog_status_i_dns_template'] = 'Create DNS template'; +$wb['datalog_status_u_dns_template'] = 'Update DNS template'; +$wb['datalog_status_d_dns_template'] = 'Delete DNS template'; ?> diff --git a/interface/lib/lang/se.lng b/interface/lib/lang/se.lng index 7ac9dfc262..c175f9e54c 100644 --- a/interface/lib/lang/se.lng +++ b/interface/lib/lang/se.lng @@ -181,4 +181,7 @@ $wb['datalog_status_i_domain'] = 'Create new domain'; $wb['datalog_status_u_domain'] = 'Update domain'; $wb['datalog_status_d_domain'] = 'Delete domain'; $wb['datalog_status_d_web_backup'] = 'Delete website backup'; +$wb['datalog_status_i_dns_template'] = 'Create DNS template'; +$wb['datalog_status_u_dns_template'] = 'Update DNS template'; +$wb['datalog_status_d_dns_template'] = 'Delete DNS template'; ?> diff --git a/interface/lib/lang/sk.lng b/interface/lib/lang/sk.lng index 1798b84bdc..e39f39a92f 100644 --- a/interface/lib/lang/sk.lng +++ b/interface/lib/lang/sk.lng @@ -181,4 +181,7 @@ $wb['datalog_status_i_domain'] = 'Create new domain'; $wb['datalog_status_u_domain'] = 'Update domain'; $wb['datalog_status_d_domain'] = 'Delete domain'; $wb['datalog_status_d_web_backup'] = 'Delete website backup'; +$wb['datalog_status_i_dns_template'] = 'Create DNS template'; +$wb['datalog_status_u_dns_template'] = 'Update DNS template'; +$wb['datalog_status_d_dns_template'] = 'Delete DNS template'; ?> diff --git a/interface/lib/lang/tr.lng b/interface/lib/lang/tr.lng index e40172353c..8a0661a6af 100644 --- a/interface/lib/lang/tr.lng +++ b/interface/lib/lang/tr.lng @@ -182,4 +182,7 @@ $wb['datalog_status_i_domain'] = 'Create new domain'; $wb['datalog_status_u_domain'] = 'Update domain'; $wb['datalog_status_d_domain'] = 'Delete domain'; $wb['datalog_status_d_web_backup'] = 'Delete website backup'; +$wb['datalog_status_i_dns_template'] = 'Create DNS template'; +$wb['datalog_status_u_dns_template'] = 'Update DNS template'; +$wb['datalog_status_d_dns_template'] = 'Delete DNS template'; ?> From 4f6eb2c277e6d06e24ed7b974d3535f911b697b1 Mon Sep 17 00:00:00 2001 From: Michael Seevogel Date: Sun, 11 Feb 2024 00:13:37 +0100 Subject: [PATCH 314/621] Transform the domain placeholder in command_format function --- interface/lib/classes/validate_cron.inc.php | 24 ++++++++++++++++++- interface/web/sites/templates/cron_edit.htm | 8 +++---- server/plugins-available/cron_plugin.inc.php | 11 +++++++-- .../shelluser_jailkit_plugin.inc.php | 1 + 4 files changed, 37 insertions(+), 7 deletions(-) diff --git a/interface/lib/classes/validate_cron.inc.php b/interface/lib/classes/validate_cron.inc.php index 888fdd5cb7..c99f13ef52 100644 --- a/interface/lib/classes/validate_cron.inc.php +++ b/interface/lib/classes/validate_cron.inc.php @@ -45,15 +45,37 @@ function get_error($errmsg) { Validator function to check if a given cron command is in correct form (url only). */ function command_format($field_name, $field_value, $validator) { + global $app, $page; + if(preg_match("'^(\w+):\/\/'", $field_value, $matches)) { + if(preg_match("/\{DOMAIN\}/", $field_value)) { + if(isset($app->remoting_lib->primary_id)) { + $domain = $app->remoting_lib->dataRecord; + } else { + $domain = $page->dataRecord; + } + + if($domain['parent_domain_id'] > 0){ + $parent_domain = $app->db->queryOneRecord("SELECT `domain` FROM `web_domain` WHERE `domain_id` = ?", $domain['parent_domain_id']); + } + + $trans = array( + '{DOMAIN}' => $parent_domain['domain'] + ); + + $field_value = strtr($field_value, $trans); + } $parsed = parse_url($field_value); + if($parsed === false) return $this->get_error($validator['errmsg']); if($parsed["scheme"] != "http" && $parsed["scheme"] != "https") return $this->get_error($validator['errmsg']); + if(preg_match("'^([a-z0-9][a-z0-9\-]{0,62}\.)+([A-Za-z0-9\-]{2,63})$'i", $parsed["host"]) == false) return $this->get_error($validator['errmsg']); + - if(preg_match("'^([a-z0-9][a-z0-9_\-]{0,62}\.)+([A-Za-z0-9\-]{2,63})$'i", $parsed["host"]) == false) return $this->get_error($validator['errmsg']); } + if(strpos($field_value, "\n") !== false || strpos($field_value, "\r") !== false || strpos($field_value, chr(0)) !== false) { return $this->get_error($validator['errmsg']); } diff --git a/interface/web/sites/templates/cron_edit.htm b/interface/web/sites/templates/cron_edit.htm index 9eef8091d8..20417849fb 100644 --- a/interface/web/sites/templates/cron_edit.htm +++ b/interface/web/sites/templates/cron_edit.htm @@ -1,7 +1,8 @@
+ -
{tmpl_var name='parent_domain_id'}
@@ -12,6 +13,7 @@
+
@@ -70,8 +72,6 @@ {tmpl_var name='active'}
- -
@@ -85,7 +85,7 @@ jQuery('#parent_domain_id').trigger('change'); }); // Reload cron placeholders if a different domain was selected - jQuery('#parent_domain_id').change(function(){ + jQuery('#parent_domain_id').change(function() { reloadCronPlaceholders(); }); diff --git a/server/plugins-available/cron_plugin.inc.php b/server/plugins-available/cron_plugin.inc.php index b0bc507b5e..c11b4b06af 100644 --- a/server/plugins-available/cron_plugin.inc.php +++ b/server/plugins-available/cron_plugin.inc.php @@ -231,6 +231,7 @@ function _write_crontab() { $cron_line = str_replace(" ", "", $job['run_min']) . "\t" . str_replace(" ", "", $job['run_hour']) . "\t" . str_replace(" ", "", $job['run_mday']) . "\t" . str_replace(" ", "", $job['run_month']) . "\t" . str_replace(" ", "", $job['run_wday']); } + $web_domain = $this->parent_domain['domain']; $log_target = ""; $log_wget_target = '/dev/null'; $log_root = ''; @@ -242,8 +243,16 @@ function _write_crontab() { $log_wget_target = $log_root . '/cron_wget.log'; } + + $cron_line .= "\t{$this->parent_domain['system_user']}"; //* running as user if($job['type'] == 'url') { + $trans = array( + '{DOMAIN}' => $web_domain + ); + + $job['command'] = strtr($job['command'], $trans); + $cron_line .= "\t{$cron_config['wget']} --no-check-certificate --user-agent='Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:47.0) Gecko/20100101 Firefox/47.0' -q -t 1 -T 7200 -O " . $log_wget_target . " " . escapeshellarg($job['command']) . " " . $log_target; } else { if(strpos($job['command'], "\n") !== false || strpos($job['command'], "\r") !== false || strpos($job['command'], chr(0)) !== false) { @@ -253,8 +262,6 @@ function _write_crontab() { $web_docroot_client = ''; - $web_domain = $this->parent_domain['domain']; - // web folder is hardcoded to /web: $web_folder = '/web'; diff --git a/server/plugins-available/shelluser_jailkit_plugin.inc.php b/server/plugins-available/shelluser_jailkit_plugin.inc.php index d462e4a693..05e0315f0a 100755 --- a/server/plugins-available/shelluser_jailkit_plugin.inc.php +++ b/server/plugins-available/shelluser_jailkit_plugin.inc.php @@ -726,6 +726,7 @@ function _add_bashrc_jailkit() { } if($app->system->is_redhat_os() == true) { + //$bashrc = $this->web['document_root'] . '/home/' . $this->web['system_user'] . '/.bashrc'; $bashrc = $this->web['document_root'] . '/etc/bashrc'; } else { $bashrc = $this->web['document_root'] . '/etc/bash.bashrc'; From b78a8eb5bf2811b3e82ce2858f5350c41b431dd6 Mon Sep 17 00:00:00 2001 From: Michael Seevogel Date: Sun, 11 Feb 2024 00:15:52 +0100 Subject: [PATCH 315/621] Revert div --- interface/web/sites/templates/cron_edit.htm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interface/web/sites/templates/cron_edit.htm b/interface/web/sites/templates/cron_edit.htm index 20417849fb..68bc8669ca 100644 --- a/interface/web/sites/templates/cron_edit.htm +++ b/interface/web/sites/templates/cron_edit.htm @@ -2,7 +2,7 @@ -
{tmpl_var name='parent_domain_id'}
From b571cfe7c7dfc20ae7b356ed34c3c02fdbbe02b2 Mon Sep 17 00:00:00 2001 From: Herman van Rink Date: Sun, 11 Feb 2024 17:33:31 +0100 Subject: [PATCH 316/621] Avoid running checkzone for each rr when deleting a soa, #6647 --- interface/lib/classes/db_mysql.inc.php | 7 ++++--- interface/web/dns/dns_soa_del.php | 5 +++-- server/plugins-available/bind_plugin.inc.php | 7 ++++++- 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/interface/lib/classes/db_mysql.inc.php b/interface/lib/classes/db_mysql.inc.php index 9a7cf7129f..2e893e8508 100644 --- a/interface/lib/classes/db_mysql.inc.php +++ b/interface/lib/classes/db_mysql.inc.php @@ -686,7 +686,7 @@ public function getDatabaseSize($database_name) { } //** Function to fill the datalog with a full differential record. - public function datalogSave($db_table, $action, $primary_field, $primary_id, $record_old, $record_new, $force_update = false) { + public function datalogSave($db_table, $action, $primary_field, $primary_id, $record_old, $record_new, $force_update = false, $options = []) { global $app; // Insert backticks only for incomplete table names. @@ -712,6 +712,7 @@ public function datalogSave($db_table, $action, $primary_field, $primary_id, $re $server_id = (isset($record_old['server_id']) && $record_old['server_id'] > 0)?$record_old['server_id']:0; if(isset($record_new['server_id'])) $server_id = $record_new['server_id']; + $diffrec_full['options'] = $options; if($diff_num > 0) { $diffstr = serialize($diffrec_full); @@ -810,7 +811,7 @@ public function datalogUpdate($tablename, $update_data, $index_field, $index_val } //** Deletes a record and saves the changes into the datalog - public function datalogDelete($tablename, $index_field, $index_value) { + public function datalogDelete($tablename, $index_field, $index_value, $options = []) { global $app; // Check fields @@ -820,7 +821,7 @@ public function datalogDelete($tablename, $index_field, $index_value) { $old_rec = $this->queryOneRecord("SELECT * FROM ?? WHERE ?? = ?", $tablename, $index_field, $index_value); $this->query("DELETE FROM ?? WHERE ?? = ?", $tablename, $index_field, $index_value); $new_rec = array(); - $this->datalogSave($tablename, 'DELETE', $index_field, $index_value, $old_rec, $new_rec); + $this->datalogSave($tablename, 'DELETE', $index_field, $index_value, $old_rec, $new_rec, FALSE, $options); return true; } diff --git a/interface/web/dns/dns_soa_del.php b/interface/web/dns/dns_soa_del.php index fee2138f85..2d18a2d4ff 100644 --- a/interface/web/dns/dns_soa_del.php +++ b/interface/web/dns/dns_soa_del.php @@ -55,10 +55,11 @@ function onBeforeDelete() { if($app->tform->checkPerm($this->id, 'd') == false) $app->error($app->lng('error_no_delete_permission')); - // Delete all records that belog to this zone. + // Delete all records that belong to this zone. $records = $app->db->queryAllRecords("SELECT id FROM dns_rr WHERE zone = ?", $this->id); + $options = ['deleting_dns_soa' => TRUE]; foreach($records as $rec) { - $app->db->datalogDelete('dns_rr', 'id', $rec['id']); + $app->db->datalogDelete('dns_rr', 'id', $rec['id'], $options); } } diff --git a/server/plugins-available/bind_plugin.inc.php b/server/plugins-available/bind_plugin.inc.php index ac71f35cc4..1485fb0f32 100644 --- a/server/plugins-available/bind_plugin.inc.php +++ b/server/plugins-available/bind_plugin.inc.php @@ -352,7 +352,7 @@ function soa_update($event_name, $data) { $loglevel = @($dns_config['disable_bind_log'] === 'y') ? LOGLEVEL_DEBUG : LOGLEVEL_WARN; $app->log("Writing BIND domain file failed: ".$filename." ".implode(' ', $out), $loglevel); if(is_array($out) && !empty($out)){ - $app->log('Reason for Bind restart failure: '.implode("\n", $out), $loglevel); + $app->log('Reason for Bind zone check failure: '.implode("\n", $out), $loglevel); $app->dbmaster->datalogError(implode("\n", $out)); } if ($old_zonefile != '') { @@ -524,6 +524,11 @@ function rr_update($event_name, $data) { function rr_delete($event_name, $data) { global $app, $conf; + if (!empty($data['options']['deleting_dns_soa']) && $data['options']['deleting_dns_soa'] == TRUE) { + $app->log("Skipping zone update since it's alse being deleted", LOGLEVEL_DEBUG); + return; + } + //* Get the data of the soa and call soa_update $tmp = $app->db->queryOneRecord("SELECT * FROM dns_soa WHERE id = ?", $data['old']['zone']); $data["new"] = $tmp; From 7600829c0c0bb94221e3755edcacc784fdb30529 Mon Sep 17 00:00:00 2001 From: Till Brehm Date: Sun, 11 Feb 2024 21:34:49 +0000 Subject: [PATCH 317/621] Update CONTRIBUTING.md --- CONTRIBUTING.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 3a4a7de71f..420c6951ed 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -3,6 +3,8 @@ ISPConfig is a open source project and community contributions are very welcome. This document is under development and will be continuously improved. +Please do not refactor any existing code and do not change the signature or the behaviour of central functions or libraries. Such changes may only be made by the core development team. We have had many bad experiences with such changes affecting the stability of ISPConfig, so we no longer accept submissions containing such changes. Merge requests containing such changes will be closed and not merged. + # Issues * Before opening a new issue, use the search function to check if there isn't a bug report / feature request already. * If you are reporting a bug, please share your OS and PHP (CLI) version. From efd0e0dfd321dad20a156af677a40d47508f4a26 Mon Sep 17 00:00:00 2001 From: Till Brehm Date: Sun, 11 Feb 2024 21:35:24 +0000 Subject: [PATCH 318/621] Update CONTRIBUTING.md --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 420c6951ed..ec6003ea89 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -3,7 +3,7 @@ ISPConfig is a open source project and community contributions are very welcome. This document is under development and will be continuously improved. -Please do not refactor any existing code and do not change the signature or the behaviour of central functions or libraries. Such changes may only be made by the core development team. We have had many bad experiences with such changes affecting the stability of ISPConfig, so we no longer accept submissions containing such changes. Merge requests containing such changes will be closed and not merged. +Please do not refactor existing code and do not change the signature or the behaviour of central functions or libraries. Such changes may only be made by the core development team. We have had many bad experiences with such changes affecting the stability of ISPConfig, so we no longer accept submissions containing such changes. Merge requests containing such changes will be closed and not merged. # Issues * Before opening a new issue, use the search function to check if there isn't a bug report / feature request already. From 0d83850b962a4b89bf93a1ca024946ea69b288c4 Mon Sep 17 00:00:00 2001 From: Herman van Rink Date: Wed, 14 Feb 2024 13:29:09 +0100 Subject: [PATCH 319/621] Revert "Avoid running checkzone for each rr when deleting a soa, #6647" This reverts commit b571cfe7c7dfc20ae7b356ed34c3c02fdbbe02b2. Too complex, alterative suggested --- interface/lib/classes/db_mysql.inc.php | 7 +++---- interface/web/dns/dns_soa_del.php | 5 ++--- server/plugins-available/bind_plugin.inc.php | 7 +------ 3 files changed, 6 insertions(+), 13 deletions(-) diff --git a/interface/lib/classes/db_mysql.inc.php b/interface/lib/classes/db_mysql.inc.php index 2e893e8508..9a7cf7129f 100644 --- a/interface/lib/classes/db_mysql.inc.php +++ b/interface/lib/classes/db_mysql.inc.php @@ -686,7 +686,7 @@ public function getDatabaseSize($database_name) { } //** Function to fill the datalog with a full differential record. - public function datalogSave($db_table, $action, $primary_field, $primary_id, $record_old, $record_new, $force_update = false, $options = []) { + public function datalogSave($db_table, $action, $primary_field, $primary_id, $record_old, $record_new, $force_update = false) { global $app; // Insert backticks only for incomplete table names. @@ -712,7 +712,6 @@ public function datalogSave($db_table, $action, $primary_field, $primary_id, $re $server_id = (isset($record_old['server_id']) && $record_old['server_id'] > 0)?$record_old['server_id']:0; if(isset($record_new['server_id'])) $server_id = $record_new['server_id']; - $diffrec_full['options'] = $options; if($diff_num > 0) { $diffstr = serialize($diffrec_full); @@ -811,7 +810,7 @@ public function datalogUpdate($tablename, $update_data, $index_field, $index_val } //** Deletes a record and saves the changes into the datalog - public function datalogDelete($tablename, $index_field, $index_value, $options = []) { + public function datalogDelete($tablename, $index_field, $index_value) { global $app; // Check fields @@ -821,7 +820,7 @@ public function datalogDelete($tablename, $index_field, $index_value, $options = $old_rec = $this->queryOneRecord("SELECT * FROM ?? WHERE ?? = ?", $tablename, $index_field, $index_value); $this->query("DELETE FROM ?? WHERE ?? = ?", $tablename, $index_field, $index_value); $new_rec = array(); - $this->datalogSave($tablename, 'DELETE', $index_field, $index_value, $old_rec, $new_rec, FALSE, $options); + $this->datalogSave($tablename, 'DELETE', $index_field, $index_value, $old_rec, $new_rec); return true; } diff --git a/interface/web/dns/dns_soa_del.php b/interface/web/dns/dns_soa_del.php index 2d18a2d4ff..fee2138f85 100644 --- a/interface/web/dns/dns_soa_del.php +++ b/interface/web/dns/dns_soa_del.php @@ -55,11 +55,10 @@ function onBeforeDelete() { if($app->tform->checkPerm($this->id, 'd') == false) $app->error($app->lng('error_no_delete_permission')); - // Delete all records that belong to this zone. + // Delete all records that belog to this zone. $records = $app->db->queryAllRecords("SELECT id FROM dns_rr WHERE zone = ?", $this->id); - $options = ['deleting_dns_soa' => TRUE]; foreach($records as $rec) { - $app->db->datalogDelete('dns_rr', 'id', $rec['id'], $options); + $app->db->datalogDelete('dns_rr', 'id', $rec['id']); } } diff --git a/server/plugins-available/bind_plugin.inc.php b/server/plugins-available/bind_plugin.inc.php index 1485fb0f32..ac71f35cc4 100644 --- a/server/plugins-available/bind_plugin.inc.php +++ b/server/plugins-available/bind_plugin.inc.php @@ -352,7 +352,7 @@ function soa_update($event_name, $data) { $loglevel = @($dns_config['disable_bind_log'] === 'y') ? LOGLEVEL_DEBUG : LOGLEVEL_WARN; $app->log("Writing BIND domain file failed: ".$filename." ".implode(' ', $out), $loglevel); if(is_array($out) && !empty($out)){ - $app->log('Reason for Bind zone check failure: '.implode("\n", $out), $loglevel); + $app->log('Reason for Bind restart failure: '.implode("\n", $out), $loglevel); $app->dbmaster->datalogError(implode("\n", $out)); } if ($old_zonefile != '') { @@ -524,11 +524,6 @@ function rr_update($event_name, $data) { function rr_delete($event_name, $data) { global $app, $conf; - if (!empty($data['options']['deleting_dns_soa']) && $data['options']['deleting_dns_soa'] == TRUE) { - $app->log("Skipping zone update since it's alse being deleted", LOGLEVEL_DEBUG); - return; - } - //* Get the data of the soa and call soa_update $tmp = $app->db->queryOneRecord("SELECT * FROM dns_soa WHERE id = ?", $data['old']['zone']); $data["new"] = $tmp; From 385e219c8a9bb02d4d3fd76fad8c2f41d28f814e Mon Sep 17 00:00:00 2001 From: Herman van Rink Date: Wed, 14 Feb 2024 13:31:53 +0100 Subject: [PATCH 320/621] Fix string errors --- interface/web/dns/dns_soa_del.php | 2 +- server/plugins-available/bind_plugin.inc.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/interface/web/dns/dns_soa_del.php b/interface/web/dns/dns_soa_del.php index fee2138f85..2f2b3331c8 100644 --- a/interface/web/dns/dns_soa_del.php +++ b/interface/web/dns/dns_soa_del.php @@ -55,7 +55,7 @@ function onBeforeDelete() { if($app->tform->checkPerm($this->id, 'd') == false) $app->error($app->lng('error_no_delete_permission')); - // Delete all records that belog to this zone. + // Delete all records that belong to this zone. $records = $app->db->queryAllRecords("SELECT id FROM dns_rr WHERE zone = ?", $this->id); foreach($records as $rec) { $app->db->datalogDelete('dns_rr', 'id', $rec['id']); diff --git a/server/plugins-available/bind_plugin.inc.php b/server/plugins-available/bind_plugin.inc.php index ac71f35cc4..99ae03ace8 100644 --- a/server/plugins-available/bind_plugin.inc.php +++ b/server/plugins-available/bind_plugin.inc.php @@ -352,7 +352,7 @@ function soa_update($event_name, $data) { $loglevel = @($dns_config['disable_bind_log'] === 'y') ? LOGLEVEL_DEBUG : LOGLEVEL_WARN; $app->log("Writing BIND domain file failed: ".$filename." ".implode(' ', $out), $loglevel); if(is_array($out) && !empty($out)){ - $app->log('Reason for Bind restart failure: '.implode("\n", $out), $loglevel); + $app->log('Reason for Bind zone check failure: '.implode("\n", $out), $loglevel); $app->dbmaster->datalogError(implode("\n", $out)); } if ($old_zonefile != '') { From eff523095fbaa05a3c502551a0a60b6490dd2544 Mon Sep 17 00:00:00 2001 From: Herman van Rink Date: Wed, 14 Feb 2024 15:09:06 +0100 Subject: [PATCH 321/621] Avoid running checkzone for each rr when inserting/deleting a soa by deactivating the zone first, #6647 --- interface/lib/classes/dns_wizard.inc.php | 5 ++++- interface/web/dns/dns_import.php | 5 ++++- interface/web/dns/dns_soa_del.php | 2 ++ server/plugins-available/bind_plugin.inc.php | 13 ++++++++++--- 4 files changed, 20 insertions(+), 5 deletions(-) diff --git a/interface/lib/classes/dns_wizard.inc.php b/interface/lib/classes/dns_wizard.inc.php index 9b81748d23..c9c1af2e66 100644 --- a/interface/lib/classes/dns_wizard.inc.php +++ b/interface/lib/classes/dns_wizard.inc.php @@ -268,7 +268,7 @@ function create(array $data) "expire" => $expire, "minimum" => $minimum, "ttl" => $ttl, - "active" => 'Y', + "active" => 'N', // Activated later when all DNS records are added. "xfer" => $xfer, "also_notify" => $also_notify, "update_acl" => $update_acl, @@ -301,6 +301,9 @@ function create(array $data) } } + // Activate the DNS zone. + $app->db->datalogUpdate('dns_soa', array('active' => 'Y'), 'id', $dns_soa_id); + return 'ok'; } else { diff --git a/interface/web/dns/dns_import.php b/interface/web/dns/dns_import.php index d422983c0c..22a5367f6e 100644 --- a/interface/web/dns/dns_import.php +++ b/interface/web/dns/dns_import.php @@ -677,7 +677,7 @@ function fqdn_name( $owner, $origin ) { "expire" => $soa['expire'], "minimum" => $soa['minimum'], "ttl" => $soa['ttl'], - "active" => 'Y', + "active" => 'N', // Activated later when all DNS records are added. "xfer" => $xfer ); $dns_soa_id = $app->db->datalogInsert('dns_soa', $insert_data, 'id'); @@ -710,6 +710,9 @@ function fqdn_name( $owner, $origin ) { $dns_rr_id = $app->db->datalogInsert('dns_rr', $insert_data, 'id'); } + // Activate the DNS zone. + $app->db->datalogUpdate('dns_soa', array('active' => 'Y'), 'id', $dns_soa_id); + $msg[] = $wb['zone_file_successfully_imported_txt']; } elseif (is_array($dns_rr)) { $error[] = $wb['zone_file_import_fail']; diff --git a/interface/web/dns/dns_soa_del.php b/interface/web/dns/dns_soa_del.php index 2f2b3331c8..e04b11620d 100644 --- a/interface/web/dns/dns_soa_del.php +++ b/interface/web/dns/dns_soa_del.php @@ -55,6 +55,8 @@ function onBeforeDelete() { if($app->tform->checkPerm($this->id, 'd') == false) $app->error($app->lng('error_no_delete_permission')); + $app->db->datalogUpdate('dns_soa', array("active" => 'N'), 'id', $this->id); + // Delete all records that belong to this zone. $records = $app->db->queryAllRecords("SELECT id FROM dns_rr WHERE zone = ?", $this->id); foreach($records as $rec) { diff --git a/server/plugins-available/bind_plugin.inc.php b/server/plugins-available/bind_plugin.inc.php index 99ae03ace8..9be9278269 100644 --- a/server/plugins-available/bind_plugin.inc.php +++ b/server/plugins-available/bind_plugin.inc.php @@ -352,7 +352,7 @@ function soa_update($event_name, $data) { $loglevel = @($dns_config['disable_bind_log'] === 'y') ? LOGLEVEL_DEBUG : LOGLEVEL_WARN; $app->log("Writing BIND domain file failed: ".$filename." ".implode(' ', $out), $loglevel); if(is_array($out) && !empty($out)){ - $app->log('Reason for Bind zone check failure: '.implode("\n", $out), $loglevel); + $app->log('Reason for Bind zone check failure: '.implode("\n", $out), $loglevel); $app->dbmaster->datalogError(implode("\n", $out)); } if ($old_zonefile != '') { @@ -505,7 +505,10 @@ function rr_insert($event_name, $data) { $data["new"] = $tmp; $data["old"] = $tmp; $this->action = 'update'; - $this->soa_update($event_name, $data); + + if (isset($data['new']['active']) && $data['new']['active'] == 'Y') { + $this->soa_update($event_name, $data); + } } @@ -525,11 +528,15 @@ function rr_delete($event_name, $data) { global $app, $conf; //* Get the data of the soa and call soa_update + //* In a singel server setup the record in dns_soa will already be gone ... so this will give an empty array. $tmp = $app->db->queryOneRecord("SELECT * FROM dns_soa WHERE id = ?", $data['old']['zone']); $data["new"] = $tmp; $data["old"] = $tmp; $this->action = 'update'; - $this->soa_update($event_name, $data); + + if (isset($data['new']['active']) && $data['new']['active'] == 'Y') { + $this->soa_update($event_name, $data); + } } From 9a5340cb8df363cb7195dfe4733110d4ccb88a71 Mon Sep 17 00:00:00 2001 From: Till Brehm Date: Thu, 15 Feb 2024 17:56:56 +0000 Subject: [PATCH 322/621] Update file rspamd_worker-controller.inc.master --- server/conf/rspamd_worker-controller.inc.master | 1 - 1 file changed, 1 deletion(-) diff --git a/server/conf/rspamd_worker-controller.inc.master b/server/conf/rspamd_worker-controller.inc.master index 75b744c883..70ccd93c82 100644 --- a/server/conf/rspamd_worker-controller.inc.master +++ b/server/conf/rspamd_worker-controller.inc.master @@ -1,6 +1,5 @@ # Included from top-level .conf file -type = "controller"; count = 1; password = ""; secure_ip = "127.0.0.1"; From 4fe0372f7dd44159654e65860709b32912c7374f Mon Sep 17 00:00:00 2001 From: Johannes Koschier Date: Fri, 23 Feb 2024 13:27:37 +0000 Subject: [PATCH 323/621] fix dns rr sort filter #6358 --- interface/web/dns/templates/dns_a_list.htm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interface/web/dns/templates/dns_a_list.htm b/interface/web/dns/templates/dns_a_list.htm index d08f7a58fc..fbfe0f4503 100644 --- a/interface/web/dns/templates/dns_a_list.htm +++ b/interface/web/dns/templates/dns_a_list.htm @@ -73,7 +73,7 @@
From 9d62b68a3ed76fd077f99421e06225829b8c1730 Mon Sep 17 00:00:00 2001 From: Johannes Koschier Date: Fri, 23 Feb 2024 14:25:18 +0000 Subject: [PATCH 324/621] only cosmetic fix - double quotes --- interface/web/dns/templates/dns_a_list.htm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interface/web/dns/templates/dns_a_list.htm b/interface/web/dns/templates/dns_a_list.htm index fbfe0f4503..f39c1b9253 100644 --- a/interface/web/dns/templates/dns_a_list.htm +++ b/interface/web/dns/templates/dns_a_list.htm @@ -73,7 +73,7 @@ From 57642ad86c3e47440de9898a73d4755d9c434ec4 Mon Sep 17 00:00:00 2001 From: Hairy Date: Sun, 25 Feb 2024 17:37:06 -0700 Subject: [PATCH 325/621] Adds support for VS IDE to gitignore file \ Closes #6652 --- .gitignore | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 334dbbc502..2a7eb80d50 100644 --- a/.gitignore +++ b/.gitignore @@ -50,4 +50,7 @@ Temporary Items # Visual Studio code coverage results *.coverage -*.coveragexml \ No newline at end of file +*.coveragexml + +# Visual Studio IDE cache/options directory +.vs/ From e2597d4d2bcd38c634c066f13f589d0175ad9aef Mon Sep 17 00:00:00 2001 From: Judah MW Date: Mon, 26 Feb 2024 17:04:23 +0100 Subject: [PATCH 326/621] 6628: Fix web backup dir permissions to allow web user mod/delete --- server/lib/classes/backup.inc.php | 7 +++++++ server/plugins-available/apache2_plugin.inc.php | 2 +- server/plugins-available/nginx_plugin.inc.php | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/server/lib/classes/backup.inc.php b/server/lib/classes/backup.inc.php index 7f072aacf1..07ecdf11d0 100644 --- a/server/lib/classes/backup.inc.php +++ b/server/lib/classes/backup.inc.php @@ -632,7 +632,14 @@ public static function downloadBackup($backup_format, $password, $backup_dir, $f elseif(file_exists($backup_dir.'/'.$filename) && file_exists($domain['document_root'].'/backup/') && !stristr($backup_dir.'/'.$filename, '..') && !stristr($backup_dir.'/'.$filename, 'etc')) { $success = copy($backup_dir.'/'.$filename, $domain['document_root'].'/backup/'.$filename); } + if (file_exists($domain['document_root'].'/backup') && fileowner($domain['document_root'].'/backup') === 0) { + // Fix old web backup dir permissions from before #6628 + chown($domain['document_root'].'/backup', $domain['system_user']); + chgrp($domain['document_root'].'/backup', $domain['system_group']); + $app->log('Fixed old directory permissions from root:root to '.$domain['system_user'].':'.$domain['system_group'].' for backup dir '.$domain['document_root'].'/backup/', LOGLEVEL_DEBUG); + } if (file_exists($domain['document_root'].'/backup/'.$filename)) { + // Change backup file permissions chgrp($domain['document_root'].'/backup/'.$filename, $domain['system_group']); chown($domain['document_root'].'/backup/'.$filename, $domain['system_user']); chmod($domain['document_root'].'/backup/'.$filename,0600); diff --git a/server/plugins-available/apache2_plugin.inc.php b/server/plugins-available/apache2_plugin.inc.php index 5f97ce6454..c30e83bcc6 100644 --- a/server/plugins-available/apache2_plugin.inc.php +++ b/server/plugins-available/apache2_plugin.inc.php @@ -717,7 +717,7 @@ function update($event_name, $data) { if(!is_dir($data['new']['document_root'].'/cgi-bin')) $app->system->mkdirpath($data['new']['document_root'].'/cgi-bin'); if(!is_dir($data['new']['document_root'].'/tmp')) $app->system->mkdirpath($data['new']['document_root'].'/tmp', 0770); if(!is_dir($data['new']['document_root'].'/webdav')) $app->system->mkdirpath($data['new']['document_root'].'/webdav'); - if(!is_dir($data['new']['document_root'].'/backup')) $app->system->mkdirpath($data['new']['document_root'].'/backup'); + if(!is_dir($data['new']['document_root'].'/backup')) $app->system->mkdirpath($data['new']['document_root'].'/backup', 0755, $username, $groupname); if(!is_dir($data['new']['document_root'].'/.ssh')) { $app->system->mkdirpath($data['new']['document_root'].'/.ssh'); diff --git a/server/plugins-available/nginx_plugin.inc.php b/server/plugins-available/nginx_plugin.inc.php index 5ab2bcba33..c4ab7c2665 100644 --- a/server/plugins-available/nginx_plugin.inc.php +++ b/server/plugins-available/nginx_plugin.inc.php @@ -561,7 +561,7 @@ function update($event_name, $data) { if(!is_dir($data['new']['document_root'].'/ssl')) $app->system->mkdirpath($data['new']['document_root'].'/ssl'); if(!is_dir($data['new']['document_root'].'/cgi-bin')) $app->system->mkdirpath($data['new']['document_root'].'/cgi-bin'); if(!is_dir($data['new']['document_root'].'/tmp')) $app->system->mkdirpath($data['new']['document_root'].'/tmp'); - if(!is_dir($data['new']['document_root'].'/backup')) $app->system->mkdirpath($data['new']['document_root'].'/backup'); + if(!is_dir($data['new']['document_root'].'/backup')) $app->system->mkdirpath($data['new']['document_root'].'/backup', 0755, $username, $groupname); if(!is_dir($data['new']['document_root'].'/.ssh')) { $app->system->mkdirpath($data['new']['document_root'].'/.ssh'); From c3aa4483b4a4009696d76de30bd2abe96a4a4bd6 Mon Sep 17 00:00:00 2001 From: Till Brehm Date: Tue, 27 Feb 2024 20:55:04 +0000 Subject: [PATCH 327/621] Fixed active checkbox in DMARD record wizard --- interface/web/dns/dns_dmarc_edit.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interface/web/dns/dns_dmarc_edit.php b/interface/web/dns/dns_dmarc_edit.php index c2c54c6659..bada56d85a 100644 --- a/interface/web/dns/dns_dmarc_edit.php +++ b/interface/web/dns/dns_dmarc_edit.php @@ -94,7 +94,7 @@ function onShowEnd() { $this->id = 1; $old_data = strtolower($rec['data']); $app->tpl->setVar("data", $old_data, true); - //if ($rec['active'] == 'Y') $app->tpl->setVar("active", "CHECKED"); else $app->tpl->setVar("active", "UNCHECKED"); + if ($rec['active'] == 'Y') $app->tpl->setVar("active", ''); else $app->tpl->setVar("active", ''); $dmarc_rua = ''; $dmarc_ruf = ''; $dmac_rf = ''; From a2879c114c8e60b204ebaa4ffd565938d7b764e3 Mon Sep 17 00:00:00 2001 From: Johannes Koschier Date: Thu, 29 Feb 2024 18:42:04 +0000 Subject: [PATCH 328/621] should fix #6658 - prevent change only policy_name to trigger all policy user rewritten --- interface/web/mail/spamfilter_policy_edit.php | 1 + 1 file changed, 1 insertion(+) diff --git a/interface/web/mail/spamfilter_policy_edit.php b/interface/web/mail/spamfilter_policy_edit.php index e8dd7f7473..18d31beddd 100644 --- a/interface/web/mail/spamfilter_policy_edit.php +++ b/interface/web/mail/spamfilter_policy_edit.php @@ -93,6 +93,7 @@ function onSubmit() { function onAfterUpdate() { $this->record_has_changed = false; foreach($this->dataRecord as $key => $val) { + if ($key == 'policy_name') { continue; } // Don't trigger update of all spamfilter users if only policy_name is changed if(isset($this->oldDataRecord[$key]) && @$this->oldDataRecord[$key] != $val) { // Record has changed $this->record_has_changed = true; From d2b8a4ea1762d0af35e9b7e343be82fa6bf0cb28 Mon Sep 17 00:00:00 2001 From: Michael Seevogel Date: Mon, 4 Mar 2024 15:53:22 +0100 Subject: [PATCH 329/621] Update of branch: - Use alternatives for jailed shell accounts in Debian/Ubuntu systems instead of an alias - Made the file /etc/bash.bashrc obsolete - command_format updated so that the domain placeholder can be used for wget commands - Introduction of the .bashrc.d directory for shell users so that they can extend their Bash environment more flexibly and easily via resource files - Minor refactoring and other changes --- interface/lib/classes/validate_cron.inc.php | 13 +- interface/web/sites/ajax_get_json.php | 4 +- interface/web/sites/cron_edit.php | 2 +- interface/web/sites/lib/lang/ar_cron.lng | 2 +- interface/web/sites/lib/lang/bg_cron.lng | 2 +- interface/web/sites/lib/lang/br_cron.lng | 2 +- interface/web/sites/lib/lang/ca_cron.lng | 2 +- interface/web/sites/lib/lang/cn_cron.lng | 2 +- interface/web/sites/lib/lang/cz_cron.lng | 2 +- interface/web/sites/lib/lang/dk_cron.lng | 2 +- interface/web/sites/lib/lang/el_cron.lng | 2 +- interface/web/sites/lib/lang/en_cron.lng | 2 +- interface/web/sites/lib/lang/es_cron.lng | 2 +- interface/web/sites/lib/lang/fi_cron.lng | 2 +- interface/web/sites/lib/lang/fr_cron.lng | 2 +- interface/web/sites/lib/lang/hr_cron.lng | 2 +- interface/web/sites/lib/lang/hu_cron.lng | 2 +- interface/web/sites/lib/lang/id_cron.lng | 2 +- interface/web/sites/lib/lang/it_cron.lng | 2 +- interface/web/sites/lib/lang/ja_cron.lng | 2 +- interface/web/sites/lib/lang/nl_cron.lng | 2 +- interface/web/sites/lib/lang/pl_cron.lng | 2 +- interface/web/sites/lib/lang/pt_cron.lng | 2 +- interface/web/sites/lib/lang/ro_cron.lng | 2 +- interface/web/sites/lib/lang/ru_cron.lng | 2 +- interface/web/sites/lib/lang/se_cron.lng | 2 +- interface/web/sites/lib/lang/sk_cron.lng | 2 +- interface/web/sites/lib/lang/tr_cron.lng | 2 +- server/conf/bash.bashrc.master | 9 -- server/conf/bashrc_el.master | 132 ----------------- server/conf/bashrc_user_deb.master | 137 ++++++++++++++++++ server/conf/bashrc_user_generic.master | 35 +++++ server/conf/bashrc_user_redhat.master | 52 +++++++ server/lib/classes/system.inc.php | 21 +++ .../cron_jailkit_plugin.inc.php | 40 +++-- .../shelluser_base_plugin.inc.php | 54 +++++-- .../shelluser_jailkit_plugin.inc.php | 78 ++++++---- 37 files changed, 395 insertions(+), 232 deletions(-) delete mode 100644 server/conf/bashrc_el.master create mode 100644 server/conf/bashrc_user_deb.master create mode 100644 server/conf/bashrc_user_generic.master create mode 100644 server/conf/bashrc_user_redhat.master diff --git a/interface/lib/classes/validate_cron.inc.php b/interface/lib/classes/validate_cron.inc.php index c99f13ef52..be28a87d4c 100644 --- a/interface/lib/classes/validate_cron.inc.php +++ b/interface/lib/classes/validate_cron.inc.php @@ -48,15 +48,17 @@ function command_format($field_name, $field_value, $validator) { global $app, $page; if(preg_match("'^(\w+):\/\/'", $field_value, $matches)) { - if(preg_match("/\{DOMAIN\}/", $field_value)) { + //* Add the {DOMAIN} placeholder to the validation process + if(preg_match("/{DOMAIN}/", $field_value)) { + if(isset($app->remoting_lib->primary_id)) { - $domain = $app->remoting_lib->dataRecord; + $cronjob = $app->remoting_lib->dataRecord; } else { - $domain = $page->dataRecord; + $cronjob = $page->dataRecord; } - if($domain['parent_domain_id'] > 0){ - $parent_domain = $app->db->queryOneRecord("SELECT `domain` FROM `web_domain` WHERE `domain_id` = ?", $domain['parent_domain_id']); + if($cronjob['parent_domain_id'] > 0) { + $parent_domain = $app->db->queryOneRecord("SELECT `domain` FROM `web_domain` WHERE `domain_id` = ?", $cronjob['parent_domain_id']); } $trans = array( @@ -64,6 +66,7 @@ function command_format($field_name, $field_value, $validator) { ); $field_value = strtr($field_value, $trans); + } $parsed = parse_url($field_value); diff --git a/interface/web/sites/ajax_get_json.php b/interface/web/sites/ajax_get_json.php index 6fd7d09185..914371ab73 100644 --- a/interface/web/sites/ajax_get_json.php +++ b/interface/web/sites/ajax_get_json.php @@ -264,7 +264,7 @@ $domain_owner = $app->db->queryOneRecord("SELECT limit_cron_type FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = ?", $web["sys_groupid"]); - //* True when the site is assigned to a client + //* True if the site is assigned to a client if(isset($domain_owner["limit_cron_type"])) { if($domain_owner["limit_cron_type"] == 'full') { $cron_type = 'full'; @@ -272,7 +272,7 @@ $cron_type = 'chrooted'; } } else { - //* True when the site is assigned to the admin + //* True if the site is assigned to the admin $cron_type = 'full'; } diff --git a/interface/web/sites/cron_edit.php b/interface/web/sites/cron_edit.php index ebe2c97a32..ab3f34d7e0 100644 --- a/interface/web/sites/cron_edit.php +++ b/interface/web/sites/cron_edit.php @@ -80,7 +80,7 @@ function onShowEnd() { $parent_domain = $app->db->queryOneRecord("SELECT `domain_id`, `system_user`, `system_group`, `domain`, `document_root`, `hd_quota`, `php_cli_binary` FROM `web_domain` - LEFT JOIN server_php ON web_domain.server_php_id = server_php.server_php_id + LEFT JOIN server_php ON web_domain.server_php_id = server_php.server_php_id WHERE `domain_id` = ?", $this->dataRecord["parent_domain_id"]); $php_cli_binary = $parent_domain['php_cli_binary']; diff --git a/interface/web/sites/lib/lang/ar_cron.lng b/interface/web/sites/lib/lang/ar_cron.lng index 74911e8d03..fb114d1a5b 100644 --- a/interface/web/sites/lib/lang/ar_cron.lng +++ b/interface/web/sites/lib/lang/ar_cron.lng @@ -23,5 +23,5 @@ $wb['limit_cron_url_txt'] = 'URL cron only. Please enter a URL starting with htt $wb['command_error_empty'] = 'Command is empty.'; $wb['command_hint_txt'] = 'e.g. /var/www/clients/clientX/webY/myscript.sh or https://www.mydomain.com/path/script.php, you can use [web_root] placeholder that is replaced by /var/www/clients/clientX/webY/web.'; $wb['log_output_txt'] = 'Log output'; -$wb['domain_not_selected_placeholder_txt'] = 'No Domain selected'; +$wb['domain_not_selected_placeholder_txt'] = 'No domain selected'; ?> diff --git a/interface/web/sites/lib/lang/bg_cron.lng b/interface/web/sites/lib/lang/bg_cron.lng index fedfb73393..c4877f8972 100644 --- a/interface/web/sites/lib/lang/bg_cron.lng +++ b/interface/web/sites/lib/lang/bg_cron.lng @@ -23,5 +23,5 @@ $wb['limit_cron_url_txt'] = 'URL cron only. Please enter a URL starting with htt $wb['command_error_empty'] = 'Command is empty.'; $wb['command_hint_txt'] = 'e.g. /var/www/clients/clientX/webY/myscript.sh or https://www.mydomain.com/path/script.php, you can use [web_root] placeholder that is replaced by /var/www/clients/clientX/webY/web.'; $wb['log_output_txt'] = 'Log output'; -$wb['domain_not_selected_placeholder_txt'] = 'No Domain selected'; +$wb['domain_not_selected_placeholder_txt'] = 'No domain selected'; ?> diff --git a/interface/web/sites/lib/lang/br_cron.lng b/interface/web/sites/lib/lang/br_cron.lng index 263b3177aa..bf26c58310 100644 --- a/interface/web/sites/lib/lang/br_cron.lng +++ b/interface/web/sites/lib/lang/br_cron.lng @@ -24,4 +24,4 @@ $wb['log_output_txt'] = 'Gravar saída do log'; $wb['limit_cron_url_txt'] = 'Somente URL no Cron. Por favor insira uma URL iniciando com https:// como um comando no Cron.'; $wb['command_error_empty'] = 'Comando a executar está vazio.'; $wb['Cron Job'] = 'Tarefas no Cron'; -$wb['domain_not_selected_placeholder_txt'] = 'No Domain selected'; +$wb['domain_not_selected_placeholder_txt'] = 'No domain selected'; diff --git a/interface/web/sites/lib/lang/ca_cron.lng b/interface/web/sites/lib/lang/ca_cron.lng index 420c3390a2..8d04a71e03 100644 --- a/interface/web/sites/lib/lang/ca_cron.lng +++ b/interface/web/sites/lib/lang/ca_cron.lng @@ -23,5 +23,5 @@ $wb['limit_cron_url_txt'] = 'Cron de type URL seulement. Merci d\'introduire une $wb['command_error_empty'] = 'Le champ Commande à exécuter est vide.'; $wb['command_hint_txt'] = 'par exemple /var/www/clients/clientX/webY/monscript.sh ou https://www.mondomaine.com/chemin/script.php, vous pouvez utiliser la constante [web_root] qui sera remplacée par /var/www/clients/clientX/webY/web.'; $wb['log_output_txt'] = 'Journaliser la sortie du cron'; -$wb['domain_not_selected_placeholder_txt'] = 'No Domain selected'; +$wb['domain_not_selected_placeholder_txt'] = 'No domain selected'; ?> diff --git a/interface/web/sites/lib/lang/cn_cron.lng b/interface/web/sites/lib/lang/cn_cron.lng index 65385864c3..f689a930cf 100644 --- a/interface/web/sites/lib/lang/cn_cron.lng +++ b/interface/web/sites/lib/lang/cn_cron.lng @@ -23,5 +23,5 @@ $wb['command_hint_txt'] = '例如,/var/www/clients/clientX/webY/myscript.sh $wb['log_output_txt'] = '记录输出'; $wb['limit_cron_url_txt'] = '仅限 URL 计划任务。请将以 https:// 开头的 URL 作为计划任务命令输入。'; $wb['command_error_empty'] = '命令为空。'; -$wb['domain_not_selected_placeholder_txt'] = 'No Domain selected'; +$wb['domain_not_selected_placeholder_txt'] = 'No domain selected'; ?> diff --git a/interface/web/sites/lib/lang/cz_cron.lng b/interface/web/sites/lib/lang/cz_cron.lng index b98a4cbe2a..5144015d6f 100644 --- a/interface/web/sites/lib/lang/cz_cron.lng +++ b/interface/web/sites/lib/lang/cz_cron.lng @@ -23,4 +23,4 @@ $wb['limit_cron_url_txt'] = 'URL cron only. Please enter a URL starting with htt $wb['command_error_empty'] = 'Command is empty.'; $wb['command_hint_txt'] = 'e.g. /var/www/clients/clientX/webY/myscript.sh or http://www.mydomain.com/path/script.php, you can use [web_root] placeholder that is replaced by /var/www/clients/clientX/webY/web.'; $wb['log_output_txt'] = 'Log output'; -$wb['domain_not_selected_placeholder_txt'] = 'No Domain selected'; +$wb['domain_not_selected_placeholder_txt'] = 'No domain selected'; diff --git a/interface/web/sites/lib/lang/dk_cron.lng b/interface/web/sites/lib/lang/dk_cron.lng index 8b27dae089..798cb4ea49 100644 --- a/interface/web/sites/lib/lang/dk_cron.lng +++ b/interface/web/sites/lib/lang/dk_cron.lng @@ -23,4 +23,4 @@ $wb['limit_cron_url_txt'] = 'URL cron only. Please enter a URL starting with htt $wb['command_error_empty'] = 'Command er tom.'; $wb['command_hint_txt'] = 'e.g. /var/www/clients/clientX/webY/myscript.sh or https://www.mydomain.com/path/script.php, you can use [web_root] placeholder that is replaced by /var/www/clients/clientX/webY/web.'; $wb['log_output_txt'] = 'Log output'; -$wb['domain_not_selected_placeholder_txt'] = 'No Domain selected'; +$wb['domain_not_selected_placeholder_txt'] = 'No domain selected'; diff --git a/interface/web/sites/lib/lang/el_cron.lng b/interface/web/sites/lib/lang/el_cron.lng index c014de779a..fe49854430 100644 --- a/interface/web/sites/lib/lang/el_cron.lng +++ b/interface/web/sites/lib/lang/el_cron.lng @@ -23,4 +23,4 @@ $wb['limit_cron_url_txt'] = 'URL cron only. Please enter a URL starting with htt $wb['command_error_empty'] = 'Command is empty.'; $wb['command_hint_txt'] = 'e.g. /var/www/clients/clientX/webY/myscript.sh or https://www.mydomain.com/path/script.php, you can use [web_root] placeholder that is replaced by /var/www/clients/clientX/webY/web.'; $wb['log_output_txt'] = 'Log output'; -$wb['domain_not_selected_placeholder_txt'] = 'No Domain selected'; +$wb['domain_not_selected_placeholder_txt'] = 'No domain selected'; diff --git a/interface/web/sites/lib/lang/en_cron.lng b/interface/web/sites/lib/lang/en_cron.lng index 2634a1c9c4..ecd146deea 100644 --- a/interface/web/sites/lib/lang/en_cron.lng +++ b/interface/web/sites/lib/lang/en_cron.lng @@ -24,4 +24,4 @@ $wb['log_output_txt'] = 'Log output'; $wb['limit_cron_url_txt'] = 'URL cron only. Please enter a URL starting with https:// as cron command.'; $wb['command_error_empty'] = 'Command is empty.'; $wb['variables_txt'] = 'Variables'; -$wb['domain_not_selected_placeholder_txt'] = 'No Domain selected'; +$wb['domain_not_selected_placeholder_txt'] = 'No domain selected'; diff --git a/interface/web/sites/lib/lang/es_cron.lng b/interface/web/sites/lib/lang/es_cron.lng index 2a53c6f64a..ccf7753b68 100644 --- a/interface/web/sites/lib/lang/es_cron.lng +++ b/interface/web/sites/lib/lang/es_cron.lng @@ -23,4 +23,4 @@ $wb['run_wday_txt'] = 'Días de la semana'; $wb['server_id_error_empty'] = 'La ID del servidor está vacía.'; $wb['server_id_txt'] = 'Servidor'; $wb['unknown_fieldtype_error'] = 'Se ha usado un tipo de campo desconocido.'; -$wb['domain_not_selected_placeholder_txt'] = 'No Domain selected'; +$wb['domain_not_selected_placeholder_txt'] = 'No domain selected'; diff --git a/interface/web/sites/lib/lang/fi_cron.lng b/interface/web/sites/lib/lang/fi_cron.lng index 2b34c6c755..b45f2e8849 100644 --- a/interface/web/sites/lib/lang/fi_cron.lng +++ b/interface/web/sites/lib/lang/fi_cron.lng @@ -23,5 +23,5 @@ $wb['limit_cron_url_txt'] = 'URL cron only. Please enter a URL starting with htt $wb['command_error_empty'] = 'Command is empty.'; $wb['command_hint_txt'] = 'e.g. /var/www/clients/clientX/webY/myscript.sh or https://www.mydomain.com/path/script.php, you can use [web_root] placeholder that is replaced by /var/www/clients/clientX/webY/web.'; $wb['log_output_txt'] = 'Log output'; -$wb['domain_not_selected_placeholder_txt'] = 'No Domain selected'; +$wb['domain_not_selected_placeholder_txt'] = 'No domain selected'; diff --git a/interface/web/sites/lib/lang/fr_cron.lng b/interface/web/sites/lib/lang/fr_cron.lng index c05a02cc96..407b246a11 100644 --- a/interface/web/sites/lib/lang/fr_cron.lng +++ b/interface/web/sites/lib/lang/fr_cron.lng @@ -23,5 +23,5 @@ $wb['limit_cron_url_txt'] = 'Cron de type URL seulement. Merci d\'introduire une $wb['command_error_empty'] = 'Le champ Commande à exécuter est vide.'; $wb['command_hint_txt'] = 'par exemple /var/www/clients/clientX/webY/monscript.sh ou https://www.mondomaine.com/chemin/script.php, vous pouvez utiliser la constante [web_root] qui sera remplacée par /var/www/clients/clientX/webY/web.'; $wb['log_output_txt'] = 'Journaliser la sortie du cron'; -$wb['domain_not_selected_placeholder_txt'] = 'No Domain selected'; +$wb['domain_not_selected_placeholder_txt'] = 'No domain selected'; diff --git a/interface/web/sites/lib/lang/hr_cron.lng b/interface/web/sites/lib/lang/hr_cron.lng index a1ae73ae42..a847d94087 100644 --- a/interface/web/sites/lib/lang/hr_cron.lng +++ b/interface/web/sites/lib/lang/hr_cron.lng @@ -23,5 +23,5 @@ $wb['limit_cron_url_txt'] = 'Samo za URL cron. Unesite URL koji počinje sa http $wb['command_error_empty'] = 'Naredba je prazna.'; $wb['command_hint_txt'] = 'e.g. /var/www/clients/clientX/webY/myscript.sh or https://www.mydomain.com/path/script.php, you can use [web_root] placeholder that is replaced by /var/www/clients/clientX/webY/web.'; $wb['log_output_txt'] = 'Log output'; -$wb['domain_not_selected_placeholder_txt'] = 'No Domain selected'; +$wb['domain_not_selected_placeholder_txt'] = 'No domain selected'; diff --git a/interface/web/sites/lib/lang/hu_cron.lng b/interface/web/sites/lib/lang/hu_cron.lng index 4f76cc9fe4..fce63b11f0 100644 --- a/interface/web/sites/lib/lang/hu_cron.lng +++ b/interface/web/sites/lib/lang/hu_cron.lng @@ -23,5 +23,5 @@ $wb['limit_cron_url_txt'] = 'URL cron only. Please enter a URL starting with htt $wb['command_error_empty'] = 'Command is empty.'; $wb['command_hint_txt'] = 'e.g. /var/www/clients/clientX/webY/myscript.sh or https://www.mydomain.com/path/script.php, you can use [web_root] placeholder that is replaced by /var/www/clients/clientX/webY/web.'; $wb['log_output_txt'] = 'Log output'; -$wb['domain_not_selected_placeholder_txt'] = 'No Domain selected'; +$wb['domain_not_selected_placeholder_txt'] = 'No domain selected'; diff --git a/interface/web/sites/lib/lang/id_cron.lng b/interface/web/sites/lib/lang/id_cron.lng index 113ebd1d20..c001dfb28f 100644 --- a/interface/web/sites/lib/lang/id_cron.lng +++ b/interface/web/sites/lib/lang/id_cron.lng @@ -23,5 +23,5 @@ $wb['limit_cron_url_txt'] = 'URL cron only. Please enter a URL starting with htt $wb['command_error_empty'] = 'Command is empty.'; $wb['command_hint_txt'] = 'e.g. /var/www/clients/clientX/webY/myscript.sh or https://www.mydomain.com/path/script.php, you can use [web_root] placeholder that is replaced by /var/www/clients/clientX/webY/web.'; $wb['log_output_txt'] = 'Log output'; -$wb['domain_not_selected_placeholder_txt'] = 'No Domain selected'; +$wb['domain_not_selected_placeholder_txt'] = 'No domain selected'; diff --git a/interface/web/sites/lib/lang/it_cron.lng b/interface/web/sites/lib/lang/it_cron.lng index 5d46d2acbe..7227cab4e6 100644 --- a/interface/web/sites/lib/lang/it_cron.lng +++ b/interface/web/sites/lib/lang/it_cron.lng @@ -23,5 +23,5 @@ $wb['limit_cron_url_txt'] = 'Solo URL cron. Per cortesia inserire una URL che in $wb['command_error_empty'] = 'Command vuoto.'; $wb['command_hint_txt'] = 'esempio: /var/www/clients/clientX/webY/myscript.sh o https://www.mydomain.com/path/script.php, puoi usare [web_root] come sostitutivo che viene rimpiazzato da /var/www/clients/clientX/webY/web.'; $wb['log_output_txt'] = 'Log output'; -$wb['domain_not_selected_placeholder_txt'] = 'No Domain selected'; +$wb['domain_not_selected_placeholder_txt'] = 'No domain selected'; diff --git a/interface/web/sites/lib/lang/ja_cron.lng b/interface/web/sites/lib/lang/ja_cron.lng index 6dcc300f31..cb02ffe8c6 100644 --- a/interface/web/sites/lib/lang/ja_cron.lng +++ b/interface/web/sites/lib/lang/ja_cron.lng @@ -23,5 +23,5 @@ $wb['limit_cron_url_txt'] = 'URL cron only. Please enter a URL starting with htt $wb['command_error_empty'] = 'Command is empty.'; $wb['command_hint_txt'] = 'e.g. /var/www/clients/clientX/webY/myscript.sh or https://www.mydomain.com/path/script.php, you can use [web_root] placeholder that is replaced by /var/www/clients/clientX/webY/web.'; $wb['log_output_txt'] = 'Log output'; -$wb['domain_not_selected_placeholder_txt'] = 'No Domain selected'; +$wb['domain_not_selected_placeholder_txt'] = 'No domain selected'; diff --git a/interface/web/sites/lib/lang/nl_cron.lng b/interface/web/sites/lib/lang/nl_cron.lng index 978b12778e..587cb4d5ce 100644 --- a/interface/web/sites/lib/lang/nl_cron.lng +++ b/interface/web/sites/lib/lang/nl_cron.lng @@ -23,4 +23,4 @@ $wb['limit_cron_url_txt'] = 'URL cron only. Please enter a URL starting with htt $wb['command_error_empty'] = 'Command is empty.'; $wb['command_hint_txt'] = 'e.g. /var/www/clients/clientX/webY/myscript.sh or https://www.mydomain.com/path/script.php, you can use [web_root] placeholder that is replaced by /var/www/clients/clientX/webY/web.'; $wb['log_output_txt'] = 'Log output'; -$wb['domain_not_selected_placeholder_txt'] = 'No Domain selected'; +$wb['domain_not_selected_placeholder_txt'] = 'Geen domein geselecteerd'; diff --git a/interface/web/sites/lib/lang/pl_cron.lng b/interface/web/sites/lib/lang/pl_cron.lng index d82036ac1a..7212a3a213 100644 --- a/interface/web/sites/lib/lang/pl_cron.lng +++ b/interface/web/sites/lib/lang/pl_cron.lng @@ -23,4 +23,4 @@ $wb['limit_cron_url_txt'] = 'URL cron only. Please enter a URL starting with htt $wb['command_error_empty'] = 'Command is empty.'; $wb['command_hint_txt'] = 'e.g. /var/www/clients/clientX/webY/myscript.sh or https://www.mydomain.com/path/script.php, you can use [web_root] placeholder that is replaced by /var/www/clients/clientX/webY/web.'; $wb['log_output_txt'] = 'Log output'; -$wb['domain_not_selected_placeholder_txt'] = 'No Domain selected'; +$wb['domain_not_selected_placeholder_txt'] = 'No domain selected'; diff --git a/interface/web/sites/lib/lang/pt_cron.lng b/interface/web/sites/lib/lang/pt_cron.lng index 1edf37c509..a6b06a5305 100644 --- a/interface/web/sites/lib/lang/pt_cron.lng +++ b/interface/web/sites/lib/lang/pt_cron.lng @@ -23,4 +23,4 @@ $wb['limit_cron_url_txt'] = 'URL cron only. Please enter a URL starting with htt $wb['command_error_empty'] = 'Command is empty.'; $wb['command_hint_txt'] = 'e.g. /var/www/clients/clientX/webY/myscript.sh or https://www.mydomain.com/path/script.php, you can use [web_root] placeholder that is replaced by /var/www/clients/clientX/webY/web.'; $wb['log_output_txt'] = 'Log output'; -$wb['domain_not_selected_placeholder_txt'] = 'No Domain selected'; +$wb['domain_not_selected_placeholder_txt'] = 'No domain selected'; diff --git a/interface/web/sites/lib/lang/ro_cron.lng b/interface/web/sites/lib/lang/ro_cron.lng index 6757f7b4fe..8a8d2aa79f 100644 --- a/interface/web/sites/lib/lang/ro_cron.lng +++ b/interface/web/sites/lib/lang/ro_cron.lng @@ -23,4 +23,4 @@ $wb['limit_cron_url_txt'] = 'URL cron only. Please enter a URL starting with htt $wb['command_error_empty'] = 'Command is empty.'; $wb['command_hint_txt'] = 'e.g. /var/www/clients/clientX/webY/myscript.sh or https://www.mydomain.com/path/script.php, you can use [web_root] placeholder that is replaced by /var/www/clients/clientX/webY/web.'; $wb['log_output_txt'] = 'Log output'; -$wb['domain_not_selected_placeholder_txt'] = 'No Domain selected'; +$wb['domain_not_selected_placeholder_txt'] = 'No domain selected'; diff --git a/interface/web/sites/lib/lang/ru_cron.lng b/interface/web/sites/lib/lang/ru_cron.lng index 3c7c2fc1df..1774ba5c64 100644 --- a/interface/web/sites/lib/lang/ru_cron.lng +++ b/interface/web/sites/lib/lang/ru_cron.lng @@ -23,4 +23,4 @@ $wb['limit_cron_url_txt'] = 'Только URL может быть в задан $wb['command_error_empty'] = 'Команда отсутствует.'; $wb['command_hint_txt'] = 'Например, /var/www/clients/clientX/webY/myscript.sh или https://www.mydomain.com/path/script.php, Вы можете использовать заполнитель [web_root], который заменяется на /var/www/clients/clientX/webY/web.'; $wb['log_output_txt'] = 'Журнал вывода'; -$wb['domain_not_selected_placeholder_txt'] = 'No Domain selected'; +$wb['domain_not_selected_placeholder_txt'] = 'No domain selected'; diff --git a/interface/web/sites/lib/lang/se_cron.lng b/interface/web/sites/lib/lang/se_cron.lng index fec186582d..7ecf078210 100644 --- a/interface/web/sites/lib/lang/se_cron.lng +++ b/interface/web/sites/lib/lang/se_cron.lng @@ -23,4 +23,4 @@ $wb['limit_cron_url_txt'] = 'URL cron only. Please enter a URL starting with htt $wb['command_error_empty'] = 'Kommandofältet är tomt.'; $wb['command_hint_txt'] = 'e.g. /var/www/clients/clientX/webY/myscript.sh or https://www.mydomain.com/path/script.php, you can use [web_root] placeholder that is replaced by /var/www/clients/clientX/webY/web.'; $wb['log_output_txt'] = 'Log output'; -$wb['domain_not_selected_placeholder_txt'] = 'No Domain selected'; +$wb['domain_not_selected_placeholder_txt'] = 'No domain selected'; diff --git a/interface/web/sites/lib/lang/sk_cron.lng b/interface/web/sites/lib/lang/sk_cron.lng index f635611113..7c9341d813 100644 --- a/interface/web/sites/lib/lang/sk_cron.lng +++ b/interface/web/sites/lib/lang/sk_cron.lng @@ -23,4 +23,4 @@ $wb['limit_cron_url_txt'] = 'URL cron only. Please enter a URL starting with htt $wb['command_error_empty'] = 'Command is empty.'; $wb['command_hint_txt'] = 'e.g. /var/www/clients/clientX/webY/myscript.sh or https://www.mydomain.com/path/script.php, you can use [web_root] placeholder that is replaced by /var/www/clients/clientX/webY/web.'; $wb['log_output_txt'] = 'Log output'; -$wb['domain_not_selected_placeholder_txt'] = 'No Domain selected'; +$wb['domain_not_selected_placeholder_txt'] = 'No domain selected'; diff --git a/interface/web/sites/lib/lang/tr_cron.lng b/interface/web/sites/lib/lang/tr_cron.lng index 3970c3e1eb..c41267b922 100644 --- a/interface/web/sites/lib/lang/tr_cron.lng +++ b/interface/web/sites/lib/lang/tr_cron.lng @@ -23,4 +23,4 @@ $wb['command_hint_txt'] = 'Örnek: /var/www/clients/musteriX/webY/betigim.sh ya $wb['log_output_txt'] = 'Günlük çıktısı'; $wb['limit_cron_url_txt'] = 'Yalnız İnternet adresli zamanlanmış görev kullanılabilir. Lütfen zamanlanmış görev komutu olarak https:// ile başlayan bir İnternet adresi yazın.'; $wb['command_error_empty'] = 'Komut boş olamaz.'; -$wb['domain_not_selected_placeholder_txt'] = 'No Domain selected'; +$wb['domain_not_selected_placeholder_txt'] = 'No domain selected'; diff --git a/server/conf/bash.bashrc.master b/server/conf/bash.bashrc.master index 9393bd9b50..b6577569de 100644 --- a/server/conf/bash.bashrc.master +++ b/server/conf/bash.bashrc.master @@ -12,7 +12,6 @@ fi ## Change machine hostname to site domain ## export HOSTNAME= - @@ -62,11 +61,3 @@ fi #alias la='ls -A' #alias l='ls -CF' - -# Overwrite the PHP cli binaries by using $PATH: -export PATH=:$PATH - - -alias php="" - - diff --git a/server/conf/bashrc_el.master b/server/conf/bashrc_el.master deleted file mode 100644 index 7282b03f5d..0000000000 --- a/server/conf/bashrc_el.master +++ /dev/null @@ -1,132 +0,0 @@ -# /etc/bashrc - -# Taken from EL9 - -# System wide functions and aliases -# Environment stuff goes in /etc/profile - -# It's NOT a good idea to change this file unless you know what you -# are doing. It's much better to create a custom.sh shell script in -# /etc/profile.d/ to make custom changes to your environment, as this -# will prevent the need for merging in future updates. - - - -# Set some more environment variables, they are likely not set in Jailkit setups for EL. -export TERM="xterm" -export LESSOPEN="||/usr/bin/lesspipe.sh %s" - -dircolors -b >/dev/null - - - - -# Prevent doublesourcing -if [ -z "$BASHRCSOURCED" ]; then - BASHRCSOURCED="Y" - - # are we an interactive shell? - if [ "$PS1" ]; then - if [ -z "$PROMPT_COMMAND" ]; then - case $TERM in - xterm*|vte*) - if [ -e /etc/sysconfig/bash-prompt-xterm ]; then - PROMPT_COMMAND=/etc/sysconfig/bash-prompt-xterm - else - PROMPT_COMMAND='printf "\033]0;%s@%s:%s\007" "${USER}" "${HOSTNAME%%.*}" "${PWD/#$HOME/\~}"' - fi - ;; - screen*) - if [ -e /etc/sysconfig/bash-prompt-screen ]; then - PROMPT_COMMAND=/etc/sysconfig/bash-prompt-screen - else - PROMPT_COMMAND='printf "\033k%s@%s:%s\033\\" "${USER}" "${HOSTNAME%%.*}" "${PWD/#$HOME/\~}"' - fi - ;; - *) - [ -e /etc/sysconfig/bash-prompt-default ] && PROMPT_COMMAND=/etc/sysconfig/bash-prompt-default - ;; - esac - fi - # Turn on parallel history - shopt -s histappend - history -a - # Turn on checkwinsize - shopt -s checkwinsize - [ "$PS1" = "\\s-\\v\\\$ " ] && PS1="[\u@\h \W]\\$ " - # You might want to have e.g. tty in prompt (e.g. more virtual machines) - # and console windows - # If you want to do so, just add e.g. - # if [ "$PS1" ]; then - # PS1="[\u@\h:\l \W]\\$ " - # fi - # to your custom modification shell script in /etc/profile.d/ directory - fi - - if ! shopt -q login_shell ; then # We're not a login shell - # Need to redefine pathmunge, it gets undefined at the end of /etc/profile - pathmunge () { - case ":${PATH}:" in - *:"$1":*) - ;; - *) - if [ "$2" = "after" ] ; then - PATH=$PATH:$1 - else - PATH=$1:$PATH - fi - esac - } - - # Set default umask for non-login shell only if it is set to 0 - [ `umask` -eq 0 ] && umask 022 - - SHELL=/bin/bash - # Only display echos from profile.d scripts if we are no login shell - # and interactive - otherwise just process them to set envvars - for i in /etc/profile.d/*.sh; do - if [ -r "$i" ]; then - if [ "$PS1" ]; then - . "$i" - else - . "$i" >/dev/null - fi - fi - done - - unset i - unset -f pathmunge - fi - -fi - - -## Hack for Jailkit User to change back to the logged in user ## -if [ -n "$LOGNAME" ]; then - if [ "$LOGNAME" != $USER ]; then - export HOME=$LOGNAME - export USER=$LOGNAME - export USERNAME=$LOGNAME - cd $HOME - fi -fi - -## Change machine hostname to site domain ## -export HOSTNAME= - - - - -# Overwrite the PHP cli binaries by using $PATH: -export PATH=:$PATH - - -alias php="" - - -### Hack to source a custom bashrc -#if [ -f ~/.bashrc_ispcuser ]; then -# . ~/.bashrc_ispcuser -#fi - -# vim:ts=4:sw=4 diff --git a/server/conf/bashrc_user_deb.master b/server/conf/bashrc_user_deb.master new file mode 100644 index 0000000000..10b4b94da2 --- /dev/null +++ b/server/conf/bashrc_user_deb.master @@ -0,0 +1,137 @@ +# ~/.bashrc: executed by bash(1) for non-login shells. +# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) +# for examples + +# If not running interactively, don't do anything +case $- in + *i*) ;; + *) return;; +esac + +# don't put duplicate lines or lines starting with space in the history. +# See bash(1) for more options +HISTCONTROL=ignoreboth + +# append to the history file, don't overwrite it +shopt -s histappend + +# for setting history length see HISTSIZE and HISTFILESIZE in bash(1) +HISTSIZE=1000 +HISTFILESIZE=2000 + +# check the window size after each command and, if necessary, +# update the values of LINES and COLUMNS. +shopt -s checkwinsize + +# If set, the pattern "**" used in a pathname expansion context will +# match all files and zero or more directories and subdirectories. +#shopt -s globstar + +# make less more friendly for non-text input files, see lesspipe(1) +#[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)" + +# set variable identifying the chroot you work in (used in the prompt below) +if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then + debian_chroot=$(cat /etc/debian_chroot) +fi + +# set a fancy prompt (non-color, unless we know we "want" color) +case "$TERM" in + xterm-color|*-256color) color_prompt=yes;; +esac + +# uncomment for a colored prompt, if the terminal has the capability; turned +# off by default to not distract the user: the focus in a terminal window +# should be on the output of commands, not on the prompt +#force_color_prompt=yes + +if [ -n "$force_color_prompt" ]; then + if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then + # We have color support; assume it's compliant with Ecma-48 + # (ISO/IEC-6429). (Lack of such support is extremely rare, and such + # a case would tend to support setf rather than setaf.) + color_prompt=yes + else + color_prompt= + fi +fi + +if [ "$color_prompt" = yes ]; then + PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ ' +else + PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ ' +fi +unset color_prompt force_color_prompt + +# If this is an xterm set the title to user@host:dir +case "$TERM" in +xterm*|rxvt*) + PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1" + ;; +*) + ;; +esac + +# enable color support of ls and also add handy aliases +if [ -x /usr/bin/dircolors ]; then + test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)" + alias ls='ls --color=auto' + #alias dir='dir --color=auto' + #alias vdir='vdir --color=auto' + + #alias grep='grep --color=auto' + #alias fgrep='fgrep --color=auto' + #alias egrep='egrep --color=auto' +fi + +# colored GCC warnings and errors +#export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01' + +# some more ls aliases +#alias ll='ls -l' +#alias la='ls -A' +#alias l='ls -CF' + + + +# Overwrite the PHP cli binaries by using $PATH: +export PATH=:$PATH + + +alias php="" + + + +# Alias definitions. +# You may want to put all your additions into a separate file like +# ~/.bash_aliases, instead of adding them here directly. +# See /usr/share/doc/bash-doc/examples in the bash-doc package. + +if [ -f ~/.bash_aliases ]; then + . ~/.bash_aliases +fi + +# enable programmable completion features (you don't need to enable +# this, if it's already enabled in /etc/bash.bashrc and /etc/profile +# sources /etc/bash.bashrc). +if ! shopt -oq posix; then + if [ -f /usr/share/bash-completion/bash_completion ]; then + . /usr/share/bash-completion/bash_completion + elif [ -f /etc/bash_completion ]; then + . /etc/bash_completion + fi +fi + + +# Source custom bashrc files +if [ -d ~/.bashrc.d ] +then + for brc in ~/.bashrc.d/* + do + if [ -f "$brc" ]; then + . "$brc" + fi + done +fi + +unset brc diff --git a/server/conf/bashrc_user_generic.master b/server/conf/bashrc_user_generic.master new file mode 100644 index 0000000000..563ebefdb2 --- /dev/null +++ b/server/conf/bashrc_user_generic.master @@ -0,0 +1,35 @@ + +## Hack for Jailkit User to change back to the logged in user ## +if [ -n "$LOGNAME" ]; then + if [ "$LOGNAME" != $USER ]; then + export HOME=$LOGNAME + export USER=$LOGNAME + export USERNAME=$LOGNAME + cd $HOME + fi +fi + +## Change machine hostname to site domain ## +export HOSTNAME= + + + +# Overwrite the PHP cli binaries by using $PATH: +export PATH=:$PATH + + +alias php="" + + +# Source custom bashrc files +if [ -d ~/.bashrc.d ] +then + for brc in ~/.bashrc.d/* + do + if [ -f "$brc" ]; then + . "$brc" + fi + done +fi + +unset brc diff --git a/server/conf/bashrc_user_redhat.master b/server/conf/bashrc_user_redhat.master new file mode 100644 index 0000000000..0d5b7ef607 --- /dev/null +++ b/server/conf/bashrc_user_redhat.master @@ -0,0 +1,52 @@ +# .bashrc + +# Source global definitions +if [ -f /etc/bashrc ]; then + . /etc/bashrc +fi + + +## Hack for Jailkit User to change back to the logged in user ## +if [ -n "$LOGNAME" ]; then + if [ "$LOGNAME" != $USER ]; then + export HOME=$LOGNAME + export USER=$LOGNAME + export USERNAME=$LOGNAME + cd $HOME + fi +fi + +## Change machine hostname to site domain ## +export HOSTNAME= + + + +# Overwrite the PHP cli binaries by using $PATH: +export PATH=:$PATH + + +alias php="" + + +# User specific environment +if ! [[ "$PATH" =~ "$HOME/.local/bin:$HOME/bin:" ]] +then + PATH="$HOME/.local/bin:$HOME/bin:$PATH" +fi +export PATH + +# Uncomment the following line if you don't like systemctl's auto-paging feature: +# export SYSTEMD_PAGER= + +# Source custom bashrc files +if [ -d ~/.bashrc.d ] +then + for brc in ~/.bashrc.d/* + do + if [ -f "$brc" ]; then + . "$brc" + fi + done +fi + +unset brc diff --git a/server/lib/classes/system.inc.php b/server/lib/classes/system.inc.php index 5ba578a023..0947afced7 100644 --- a/server/lib/classes/system.inc.php +++ b/server/lib/classes/system.inc.php @@ -2358,6 +2358,27 @@ public function is_redhat_os() { } } + public function get_os_type() { + global $app; + + + $dist = "undetected"; + + if(file_exists('/etc/redhat-release') && (filesize('/etc/redhat-release') > 0)) { + $dist = "redhat"; + } elseif(file_exists('/etc/debian_version') && (filesize('/etc/debian_version') > 0)) { + $dist = "debian"; + } elseif(strstr(trim(file_get_contents('/etc/issue')), 'Ubuntu') || (is_file('/etc/os-release') && stristr(file_get_contents('/etc/os-release'), 'Ubuntu'))) { + $dist = "ubuntu"; + } elseif(file_exists('/etc/SuSE-release') && (filesize('/etc/SuSE-release') > 0)) { + $dist = "suse"; + } elseif(file_exists('/etc/gentoo-release') && (filesize('/etc/gentoo-release') > 0)) { + $dist = "gentoo"; + } + + return $dist; + } + public function is_allowed_path($path) { global $app; diff --git a/server/plugins-available/cron_jailkit_plugin.inc.php b/server/plugins-available/cron_jailkit_plugin.inc.php index b51964a0b7..4b50b561d5 100644 --- a/server/plugins-available/cron_jailkit_plugin.inc.php +++ b/server/plugins-available/cron_jailkit_plugin.inc.php @@ -124,7 +124,7 @@ function insert($event_name, $data) { $this->_add_jailkit_user(); - $this->_add_bashrc_jailkit(); + $this->_setup_php_jailkit(); $command .= 'usermod -U ? 2>/dev/null'; $app->system->exec_safe($command, $parent_domain["system_user"]); @@ -198,7 +198,7 @@ function update($event_name, $data) { $this->_add_jailkit_user(); - $this->_add_bashrc_jailkit(); + $this->_setup_php_jailkit(); $this->_update_website_security_level(); @@ -369,7 +369,7 @@ function _update_website_security_level() { } } - function _add_bashrc_jailkit() { + function _setup_php_jailkit() { global $app; // Create .bashrc file @@ -377,15 +377,16 @@ function _add_bashrc_jailkit() { $tpl = new tpl(); - // /etc/bash.bashrc is not supported by Red Hat OS - if($app->system->is_redhat_os() == true) { - $tpl->newTemplate("bashrc_el.master"); + if($app->system->get_os_type() == "debian" || $app->system->get_os_type() == "ubuntu") { + $tpl->newTemplate("bashrc_user_deb.master"); + } elseif($app->system->get_os_type() == "redhat") { + $tpl->newTemplate("bashrc_user_redhat.master"); } else { - $tpl->newTemplate("bash.bashrc.master"); + $tpl->newTemplate("bashrc_user_generic.master"); } // Predefine some template vars - $tpl->setVar('jailkit_chroot', true); + $tpl->setVar('jailkit_chroot', 'y'); $tpl->setVar('domain', $this->parent_domain['domain']); $tpl->setVar('home_dir', $this->_get_home_dir("")); @@ -394,9 +395,6 @@ function _add_bashrc_jailkit() { $php_bin_dir = dirname($this->parent_domain['php_cli_binary']); - if(!file_exists($this->_get_home_dir($this->parent_domain['system_user']))) $this->_add_jailkit_user(); - - if(($this->parent_domain['server_php_id'] > 0) && !empty($this->parent_domain['php_cli_binary'])) { if(preg_match('/^(\/usr\/(s)?bin|\/(s)?bin)/', $php_bin_dir)) { $tpl->setVar('use_php_path', false); @@ -412,14 +410,24 @@ function _add_bashrc_jailkit() { $app->log("The PHP cli binary " . $this->parent_domain['php_cli_binary'] . " is not available in the jail of the web " . $this->parent_domain['domain'] . " / cronjob_id: " . $this->cronjob_id . ". Check your Jailkit setup!", LOGLEVEL_DEBUG); $tpl->setVar('use_php_path', false); $tpl->setVar('use_php_alias', false); + if(is_link($this->parent_domain['document_root'] . '/etc/alternatives/php')) + { + unlink($this->parent_domain['document_root'] . '/etc/alternatives/php'); + } + } else { + if($app->system->get_os_type() == "debian" || $app->system->get_os_type() == "ubuntu") { + if(is_link($this->parent_domain['document_root'] . '/etc/alternatives/php') || is_file($this->parent_domain['document_root'] . '/etc/alternatives/php')) + { + unlink($this->parent_domain['document_root'] . '/etc/alternatives/php'); + symlink($this->parent_domain['php_cli_binary'], $this->parent_domain['document_root'] . '/etc/alternatives/php'); + } else { + symlink($this->parent_domain['php_cli_binary'], $this->parent_domain['document_root'] . '/etc/alternatives/php'); + } + } } } - if($app->system->is_redhat_os() == true) { - $bashrc = $this->parent_domain['document_root'] . '/home/' . $this->parent_domain['system_user'] . '/.bashrc'; - } else { - $bashrc = $this->parent_domain['document_root'] . '/etc/bash.bashrc'; - } + $bashrc = $this->parent_domain['document_root'] . '/home/' .$this->parent_domain['system_user'] . '/.bashrc'; if(@is_file($bashrc) || @is_link($bashrc)) unlink($bashrc); file_put_contents($bashrc, $tpl->grab()); diff --git a/server/plugins-available/shelluser_base_plugin.inc.php b/server/plugins-available/shelluser_base_plugin.inc.php index a9d4357069..5a911d0659 100755 --- a/server/plugins-available/shelluser_base_plugin.inc.php +++ b/server/plugins-available/shelluser_base_plugin.inc.php @@ -81,7 +81,9 @@ function insert($event_name, $data) { //* Check if the resulting path is inside the docroot $web = $app->db->queryOneRecord("SELECT * FROM web_domain LEFT JOIN server_php ON web_domain.server_php_id = server_php.server_php_id WHERE `domain_id` = ?", $data["new"]["parent_domain_id"]); - //$web = $app->db->queryOneRecord("SELECT * FROM web_domain WHERE domain_id = ?", $data['new']['parent_domain_id']); + + $this->web = $web; + if(substr($data['new']['dir'],0,strlen($web['document_root'])) != $web['document_root']) { $app->log('Directory of the shell user is outside of website docroot.',LOGLEVEL_WARN); return false; @@ -134,9 +136,18 @@ function insert($event_name, $data) { $app->system->chown($homedir,$data['new']['puser'],false); $app->system->chgrp($homedir,$data['new']['pgroup'],false); } + $command = 'useradd -d ? -g ? -o'; // non unique $command .= ' -s ? -u ? ?'; $app->system->exec_safe($command, $homedir, $data['new']['pgroup'], $data['new']['shell'], $uid, $data['new']['username']); + + //* Create .bashrc.d directory + if(!is_dir($homedir.'/.bashrc.d')){ + $app->file->mkdirs($homedir.'/.bashrc.d', '0750'); + $app->system->chown($homedir.'/.bashrc.d', $data['new']['username']); + $app->system->chgrp($homedir.'/.bashrc.d', $data['new']['pgroup']); + } + $app->log("Executed command: ".$command, LOGLEVEL_DEBUG); $app->log("Added shelluser: ".$data['new']['username'], LOGLEVEL_DEBUG); @@ -169,10 +180,15 @@ function insert($event_name, $data) { $app->system->chown($homedir.'/.profile', $data['new']['username']); $app->system->chgrp($homedir.'/.profile', $data['new']['pgroup']); - if($data['new']['chroot'] != "jailkit") { - $this->_add_bashrc_base(); + //* Create .bashrc.d directory + if(!is_dir($homedir.'/.bashrc.d')){ + $app->file->mkdirs($homedir.'/.bashrc.d', '0750'); + $app->system->chown($homedir.'/.bashrc.d', $data['new']['username']); + $app->system->chgrp($homedir.'/.bashrc.d', $data['new']['pgroup']); } + $this->_add_user_bashrc(); + // Create symlinks for conveniance, SFTP user should not land in an empty dir. if(!is_link($homedir.'/web')) symlink('../../web', $homedir.'/web'); if(!is_link($homedir.'/log')) symlink('../../log', $homedir.'/log'); @@ -296,7 +312,7 @@ function update($event_name, $data) { if(!is_file($data['new']['dir']).'/.bash_history') { $app->system->touch($homedir.'/.bash_history'); $app->system->chmod($homedir.'/.bash_history', 0750); - $app->system->chown($homedir.'/.bash_history', $data['new']['username']); + $app->system->chown($homedir.'/.bash_history', $data['new']['puser']); $app->system->chgrp($homedir.'/.bash_history', $data['new']['pgroup']); } @@ -304,14 +320,19 @@ function update($event_name, $data) { if(!is_file($data['new']['dir']).'/.profile') { $app->system->touch($homedir.'/.profile'); $app->system->chmod($homedir.'/.profile', 0644); - $app->system->chown($homedir.'/.profile', $data['new']['username']); + $app->system->chown($homedir.'/.profile', $data['new']['puser']); $app->system->chgrp($homedir.'/.profile', $data['new']['pgroup']); } - if($data['new']['chroot'] != "jailkit") { - $this->_add_bashrc_base(); + //* Create .bashrc.d directory + if(!is_dir($homedir.'/.bashrc.d')){ + $app->file->mkdirs($homedir.'/.bashrc.d', '0750'); + $app->system->chown($homedir.'/.bashrc.d', $data['new']['puser']); + $app->system->chgrp($homedir.'/.bashrc.d', $data['new']['pgroup']); } + $this->_add_user_bashrc(); + //* Add webfolder protection again $app->system->web_folder_protection($web['document_root'], true); } else { @@ -549,25 +570,32 @@ private function _setup_ssh_rsa() { } - function _add_bashrc_base() { + function _add_user_bashrc() { global $app; // Create .bashrc file $app->load('tpl'); + $tpl = new tpl(); - $tpl->newTemplate("bash.bashrc.master"); // Predefine some template vars - $tpl->setVar('jailkit_chroot', false); + $tpl->setVar('jailkit_chroot', 'n'); $tpl->setVar('use_php_path', false); $tpl->setVar('use_php_alias', false); + if($app->system->get_os_type() == "debian" || $app->system->get_os_type() == "ubuntu") { + $tpl->newTemplate("bashrc_user_deb.master"); + } elseif($app->system->get_os_type() == "redhat") { + $tpl->newTemplate("bashrc_user_redhat.master"); + } else { + $tpl->newTemplate("bashrc_user_generic.master"); + } + $php_bin_dir = dirname($this->web['php_cli_binary']); if(($this->web['server_php_id'] > 0) && !empty($this->web['php_cli_binary'])) { - if(preg_match('/^(\/usr\/(s)?bin|\/(s)?bin)/', $php_bin_dir)) - { + if(preg_match('/^(\/usr\/(s)?bin|\/(s)?bin)/', $php_bin_dir)) { $tpl->setVar('use_php_path', false); $tpl->setVar('use_php_alias', true); $tpl->setVar('php_alias', $this->web['php_cli_binary']); @@ -586,6 +614,8 @@ function _add_bashrc_base() { if(@is_file($bashrc) || @is_link($bashrc)) unlink($bashrc); file_put_contents($bashrc, $tpl->grab()); + $app->system->chown($bashrc, $this->data['new']['username']); + $app->system->chgrp($bashrc, $this->data['new']['pgroup']); $app->log("Added bashrc script: " . $bashrc, LOGLEVEL_DEBUG); unset($tpl); diff --git a/server/plugins-available/shelluser_jailkit_plugin.inc.php b/server/plugins-available/shelluser_jailkit_plugin.inc.php index 05e0315f0a..8ffe6b1715 100755 --- a/server/plugins-available/shelluser_jailkit_plugin.inc.php +++ b/server/plugins-available/shelluser_jailkit_plugin.inc.php @@ -141,7 +141,7 @@ function insert($event_name, $data) { //* call the ssh-rsa update function $this->_setup_ssh_rsa(); - $this->_add_bashrc_jailkit(); + $this->_setup_php_jailkit(); $app->system->usermod($data['new']['username'], 0, 0, '', '/usr/sbin/jk_chrootsh', '', ''); @@ -236,7 +236,7 @@ function update($event_name, $data) { $this->_add_jailkit_user(); - $this->_add_bashrc_jailkit(); + $this->_setup_php_jailkit(); //* call the ssh-rsa update function $this->_setup_ssh_rsa(); @@ -345,7 +345,6 @@ function _setup_jailkit_chroot() } $web = $app->db->queryOneRecord("SELECT domain, last_jailkit_hash FROM web_domain WHERE domain_id = ?", $this->data['new']["parent_domain_id"]); - //$web = $app->db->queryOneRecord("SELECT * FROM web_domain LEFT JOIN server_php ON web_domain.server_php_id = server_php.server_php_id WHERE `domain_id` = ?", $data["new"]["parent_domain_id"]); $last_updated = preg_split('/[\s,]+/', $this->jailkit_config['jailkit_chroot_app_sections'] .' '.$this->jailkit_config['jailkit_chroot_app_programs'] @@ -680,65 +679,84 @@ private function _delete_jailkit_if_unused($parent_domain_id) { - function _add_bashrc_jailkit() { + function _setup_php_jailkit() { global $app; + $app->uses('system'); + // Create .bashrc file $app->load('tpl'); $tpl = new tpl(); - - // /etc/bash.bashrc is not supported by Red Hat OS - if($app->system->is_redhat_os() == true) { - $tpl->newTemplate("bashrc_el.master"); - } else { - $tpl->newTemplate("bash.bashrc.master"); - } + $tpl_deb_user_bashrc = new tpl(); // Predefine some template vars - $tpl->setVar('jailkit_chroot', true); + $tpl->setVar('jailkit_chroot', 'y'); $tpl->setVar('domain', $this->web['domain']); $tpl->setVar('home_dir', $this->_get_home_dir("")); - $tpl->setVar('use_php_path', false); $tpl->setVar('use_php_alias', false); - $php_bin_dir = dirname($this->web['php_cli_binary']); + if($app->system->get_os_type() == "debian" || $app->system->get_os_type() == "ubuntu") { + $tpl->newTemplate("bashrc_user_deb.master"); + } elseif($app->system->get_os_type() == "redhat") { + $tpl->newTemplate("bashrc_user_redhat.master"); + } else { + $tpl->newTemplate("bashrc_user_generic.master"); + } + - if(!file_exists($this->_get_home_dir($this->web['system_user']))) $this->_add_jailkit_user(); + $php_bin_dir = dirname($this->web['php_cli_binary']); if(($this->web['server_php_id'] > 0) && !empty($this->web['php_cli_binary'])) { - if(preg_match('/^(\/usr\/(s)?bin|\/(s)?bin)/', $php_bin_dir)) { - $tpl->setVar('use_php_path', false); - $tpl->setVar('use_php_alias', true); - $tpl->setVar('php_alias', $this->web['php_cli_binary']); - } else { - $tpl->setVar('use_php_path', true); - $tpl->setVar('use_php_alias', false); - $tpl->setVar('php_bin_dir', $php_bin_dir); + if($app->system->get_os_type() != "debian" || $app->system->get_os_type() != "ubuntu") { + if(preg_match('/^(\/usr\/(s)?bin|\/(s)?bin)/', $php_bin_dir)) { + $tpl->setVar('use_php_path', false); + $tpl->setVar('use_php_alias', true); + $tpl->setVar('php_alias', $this->web['php_cli_binary']); + } else { + $tpl->setVar('use_php_path', true); + $tpl->setVar('use_php_alias', false); + $tpl->setVar('php_bin_dir', $php_bin_dir); + } } if(!file_exists($this->web['document_root'] . '/' . $this->web['php_cli_binary'])) { - $app->log("The PHP cli binary " . $this->web['php_cli_binary'] . " is not available in the jail of the web " . $this->web['domain'] . " / username: " . $this->username . ". Check your Jailkit setup!", LOGLEVEL_DEBUG); + $app->log("The PHP cli binary " . $this->web['php_cli_binary'] . " is not available in the jail of the web " . $this->web['domain'] . " / SSH/SFTP user: " . $this->username . ". Check your Jailkit setup!", LOGLEVEL_DEBUG); $tpl->setVar('use_php_path', false); $tpl->setVar('use_php_alias', false); + if(is_link($this->web['document_root'] . '/etc/alternatives/php')) + { + unlink($this->web['document_root'] . '/etc/alternatives/php'); + } + } else { + if($app->system->get_os_type() == "debian" || $app->system->get_os_type() == "ubuntu") { + if(is_link($this->web['document_root'] . '/etc/alternatives/php') || is_file($this->web['document_root'] . '/etc/alternatives/php')) + { + unlink($this->web['document_root'] . '/etc/alternatives/php'); + symlink($this->web['php_cli_binary'], $this->web['document_root'] . '/etc/alternatives/php'); + } else { + symlink($this->web['php_cli_binary'], $this->web['document_root'] . '/etc/alternatives/php'); + } + } + } } - if($app->system->is_redhat_os() == true) { - //$bashrc = $this->web['document_root'] . '/home/' . $this->web['system_user'] . '/.bashrc'; - $bashrc = $this->web['document_root'] . '/etc/bashrc'; - } else { - $bashrc = $this->web['document_root'] . '/etc/bash.bashrc'; - } + $bashrc = $this->web['document_root'] . '/home/' . $this->data['new']['username'] . '/.bashrc'; if(@is_file($bashrc) || @is_link($bashrc)) unlink($bashrc); file_put_contents($bashrc, $tpl->grab()); + $app->system->chown($bashrc, $this->data['new']['username']); + $app->system->chgrp($bashrc, $this->data['new']['pgroup']); + $app->log("Added bashrc script: " . $bashrc, LOGLEVEL_DEBUG); unset($tpl); + + } } // end class From 9b774ded06ac9fc8fc8bd7518c0175a1100cb6dc Mon Sep 17 00:00:00 2001 From: Michael Seevogel Date: Tue, 5 Mar 2024 12:24:51 +0100 Subject: [PATCH 330/621] Fix amount of colspan in two list views --- interface/web/admin/templates/server_list.htm | 8 ++++---- interface/web/mail/templates/backup_stats_list.htm | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/interface/web/admin/templates/server_list.htm b/interface/web/admin/templates/server_list.htm index 313fad7ff1..ca2600b491 100644 --- a/interface/web/admin/templates/server_list.htm +++ b/interface/web/admin/templates/server_list.htm @@ -51,16 +51,16 @@

- + - +
{tmpl_var name="run_wday"} {tmpl_var name="command"} -
+
- +
- +
- +
{tmpl_var name='globalsearch_noresults_text_txt'}{tmpl_var name='globalsearch_noresults_text_txt'}
- -
\ No newline at end of file + + diff --git a/interface/web/mail/templates/backup_stats_list.htm b/interface/web/mail/templates/backup_stats_list.htm index 285246c5e8..a1c002146e 100644 --- a/interface/web/mail/templates/backup_stats_list.htm +++ b/interface/web/mail/templates/backup_stats_list.htm @@ -31,12 +31,12 @@

- + - + From 741d0267364e5c9c6d3be6e85c30e598478d4313 Mon Sep 17 00:00:00 2001 From: Michael Seevogel Date: Tue, 5 Mar 2024 12:48:11 +0100 Subject: [PATCH 331/621] Fix server_php_list.htm as well --- .../web/admin/templates/server_php_list.htm | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/interface/web/admin/templates/server_php_list.htm b/interface/web/admin/templates/server_php_list.htm index 5f6fae91db..2f9a3f922e 100644 --- a/interface/web/admin/templates/server_php_list.htm +++ b/interface/web/admin/templates/server_php_list.htm @@ -4,12 +4,12 @@

{tmpl_var name="toolsarea_head_txt"}

- + - - - + + +

@@ -50,16 +50,16 @@

- + - +
{tmpl_var name='globalsearch_noresults_text_txt'}{tmpl_var name='globalsearch_noresults_text_txt'}
- - + + From 473329675205a1fdeba382e2078a0d7a7d531c66 Mon Sep 17 00:00:00 2001 From: Michael Seevogel Date: Tue, 5 Mar 2024 12:54:55 +0100 Subject: [PATCH 332/621] Few more colspan fixes --- interface/web/sites/templates/backup_stats_list.htm | 4 ++-- interface/web/sites/templates/user_quota_stats_list.htm | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/interface/web/sites/templates/backup_stats_list.htm b/interface/web/sites/templates/backup_stats_list.htm index 2941608423..487ea19549 100644 --- a/interface/web/sites/templates/backup_stats_list.htm +++ b/interface/web/sites/templates/backup_stats_list.htm @@ -31,12 +31,12 @@

- + - + diff --git a/interface/web/sites/templates/user_quota_stats_list.htm b/interface/web/sites/templates/user_quota_stats_list.htm index c7265c0111..7201ac3ec5 100644 --- a/interface/web/sites/templates/user_quota_stats_list.htm +++ b/interface/web/sites/templates/user_quota_stats_list.htm @@ -47,16 +47,16 @@

- {tmpl_var name='globalsearch_noresults_text_txt'} + {tmpl_var name='globalsearch_noresults_text_txt'} - + - + From e61c86a9d1a1f4a5c978ceafd3b139880168cf2e Mon Sep 17 00:00:00 2001 From: Michael Seevogel Date: Tue, 5 Mar 2024 15:18:13 +0100 Subject: [PATCH 333/621] Update German translations --- .../mail/lib/lang/de_backup_stats_list.lng | 2 +- interface/web/mail/lib/lang/de_mail_alias.lng | 12 +- .../web/mail/lib/lang/de_mail_alias_list.lng | 6 +- .../web/mail/lib/lang/de_mail_aliasdomain.lng | 8 +- .../lib/lang/de_mail_aliasdomain_list.lng | 4 +- .../web/mail/lib/lang/de_mail_blacklist.lng | 8 +- .../mail/lib/lang/de_mail_blacklist_list.lng | 4 +- .../web/mail/lib/lang/de_mail_domain.lng | 12 +- .../lib/lang/de_mail_domain_admin_list.lng | 2 +- .../mail/lib/lang/de_mail_domain_catchall.lng | 4 +- .../lib/lang/de_mail_domain_catchall_list.lng | 2 +- .../web/mail/lib/lang/de_mail_domain_list.lng | 2 +- .../web/mail/lib/lang/de_mail_forward.lng | 14 +-- .../mail/lib/lang/de_mail_forward_list.lng | 4 +- .../web/mail/lib/lang/de_mail_mailinglist.lng | 8 +- .../mail/lib/lang/de_mail_relay_domain.lng | 8 +- .../lib/lang/de_mail_relay_domain_list.lng | 4 +- .../mail/lib/lang/de_mail_relay_recipient.lng | 4 +- .../lib/lang/de_mail_relay_recipient_list.lng | 6 +- .../web/mail/lib/lang/de_mail_spamfilter.lng | 18 +-- .../web/mail/lib/lang/de_mail_transport.lng | 6 +- .../mail/lib/lang/de_mail_transport_list.lng | 2 +- interface/web/mail/lib/lang/de_mail_user.lng | 30 ++--- .../web/mail/lib/lang/de_mail_user_filter.lng | 6 +- .../web/mail/lib/lang/de_mail_user_list.lng | 6 +- .../mail/lib/lang/de_mail_user_stats_list.lng | 4 +- .../web/mail/lib/lang/de_mail_whitelist.lng | 10 +- .../mail/lib/lang/de_mail_whitelist_list.lng | 6 +- .../mail/lib/lang/de_spamfilter_blacklist.lng | 2 +- .../lib/lang/de_spamfilter_blacklist_list.lng | 6 +- .../mail/lib/lang/de_spamfilter_config.lng | 20 ++-- .../mail/lib/lang/de_spamfilter_policy.lng | 52 ++++---- .../lib/lang/de_spamfilter_policy_list.lng | 12 +- .../web/mail/lib/lang/de_spamfilter_users.lng | 2 +- .../mail/lib/lang/de_spamfilter_whitelist.lng | 2 +- .../lib/lang/de_spamfilter_whitelist_list.lng | 6 +- .../lib/lang/de_user_quota_stats_list.lng | 4 +- .../web/mail/lib/lang/de_xmpp_domain.lng | 112 +++++++++--------- .../lib/lang/de_xmpp_domain_admin_list.lng | 10 +- .../web/mail/lib/lang/de_xmpp_domain_list.lng | 8 +- interface/web/mail/lib/lang/de_xmpp_user.lng | 26 ++-- .../web/mail/lib/lang/de_xmpp_user_list.lng | 12 +- interface/web/mailuser/lib/lang/de.lng | 4 +- interface/web/mailuser/lib/lang/de_index.lng | 10 +- .../lib/lang/de_mail_user_autoresponder.lng | 2 +- .../web/mailuser/lib/lang/de_mail_user_cc.lng | 10 +- .../mailuser/lib/lang/de_mail_user_filter.lng | 10 +- .../lib/lang/de_mail_user_filter_list.lng | 4 +- .../lib/lang/de_mail_user_password.lng | 4 +- .../lib/lang/de_mail_user_spamfilter.lng | 2 +- interface/web/monitor/lib/lang/de.lng | 110 ++++++++--------- .../web/sites/lib/lang/de_web_domain.lng | 22 ++-- .../web/sites/lib/lang/de_web_subdomain.lng | 18 +-- .../lib/lang/de_web_vhost_domain_list.lng | 2 +- .../sites/lib/lang/de_web_vhost_subdomain.lng | 8 +- .../tools/lib/lang/de_import_ispconfig.lng | 22 ++-- .../web/tools/lib/lang/de_import_vpopmail.lng | 10 +- interface/web/tools/lib/lang/de_index.lng | 2 +- interface/web/tools/lib/lang/de_resync.lng | 32 ++--- .../web/tools/lib/lang/de_tpl_default.lng | 6 +- .../web/tools/lib/lang/de_usersettings.lng | 2 +- 61 files changed, 378 insertions(+), 378 deletions(-) diff --git a/interface/web/mail/lib/lang/de_backup_stats_list.lng b/interface/web/mail/lib/lang/de_backup_stats_list.lng index 9147d3cbd6..c2210bfed3 100644 --- a/interface/web/mail/lib/lang/de_backup_stats_list.lng +++ b/interface/web/mail/lib/lang/de_backup_stats_list.lng @@ -1,5 +1,5 @@ diff --git a/interface/web/mail/lib/lang/de_mail_aliasdomain.lng b/interface/web/mail/lib/lang/de_mail_aliasdomain.lng index f75bd1659c..cde8a93a4b 100644 --- a/interface/web/mail/lib/lang/de_mail_aliasdomain.lng +++ b/interface/web/mail/lib/lang/de_mail_aliasdomain.lng @@ -3,9 +3,9 @@ $wb['source_txt'] = 'Quelle'; $wb['destination_txt'] = 'Ziel'; $wb['active_txt'] = 'Aktiv'; $wb['no_domain_perm'] = 'Sie haben keine Rechte für diese Domain.'; -$wb['limit_mailaliasdomain_txt'] = 'Die maximale Anzahl an E-Mail Alias Domains für Ihr Konto wurde erreicht.'; +$wb['limit_mailaliasdomain_txt'] = 'Die maximale Anzahl an E-Mail-Alias-Domains für Ihr Konto wurde erreicht.'; $wb['source_destination_identical_txt'] = 'Quell- und Ziel Domain sind identisch.'; -$wb['source_error_empty'] = 'Quell Domain ist leer.'; -$wb['source_error_unique'] = 'Quell Domain duplizieren.'; -$wb['source_error_regex'] = 'Ungültiger Quell Domainname.'; +$wb['source_error_empty'] = 'Quelldomain ist leer.'; +$wb['source_error_unique'] = 'Quelldomain duplizieren.'; +$wb['source_error_regex'] = 'Ungültiger Quelldomainname.'; ?> diff --git a/interface/web/mail/lib/lang/de_mail_aliasdomain_list.lng b/interface/web/mail/lib/lang/de_mail_aliasdomain_list.lng index c386d429bc..82806d7347 100644 --- a/interface/web/mail/lib/lang/de_mail_aliasdomain_list.lng +++ b/interface/web/mail/lib/lang/de_mail_aliasdomain_list.lng @@ -1,7 +1,7 @@ diff --git a/interface/web/mail/lib/lang/de_mail_blacklist.lng b/interface/web/mail/lib/lang/de_mail_blacklist.lng index 7cb69f74bc..b46708e282 100644 --- a/interface/web/mail/lib/lang/de_mail_blacklist.lng +++ b/interface/web/mail/lib/lang/de_mail_blacklist.lng @@ -1,12 +1,12 @@ diff --git a/interface/web/mail/lib/lang/de_mail_mailinglist.lng b/interface/web/mail/lib/lang/de_mail_mailinglist.lng index e09153f44b..6477fe86ee 100644 --- a/interface/web/mail/lib/lang/de_mail_mailinglist.lng +++ b/interface/web/mail/lib/lang/de_mail_mailinglist.lng @@ -2,22 +2,22 @@ $wb['limit_mailmailinglist_txt'] = 'Limit erreicht'; $wb['domain_error_empty'] = 'Domain ist leer.'; $wb['listname_error_empty'] = 'Listenname ist leer.'; -$wb['domain_error_regex'] = 'Domain Name ist nicht gültig.'; +$wb['domain_error_regex'] = 'Domainname ist nicht gültig.'; $wb['listname_error_regex'] = 'Der Listenname ist ungültig. Die Mindestlänge beträgt 2 Zeichen (erlaubt sind: [a-z 1-9 - _])'; -$wb['email_in_use_txt'] = 'E-Mail Adresse ist bereits in Benutzung'; +$wb['email_in_use_txt'] = 'E-Mail-Adresse ist bereits in Benutzung'; $wb['no_domain_perm'] = 'Sie haben keine Rechte für diese Domain.'; $wb['password_strength_txt'] = 'Passwortkomplexität'; $wb['server_id_txt'] = 'Server'; $wb['domain_txt'] = 'Domain'; $wb['listname_txt'] = 'Listenname'; $wb['client_txt'] = 'Kunde'; -$wb['email_txt'] = 'E-Mail Adresse'; +$wb['email_txt'] = 'E-Mail-Adresse'; $wb['password_txt'] = 'Passwort'; $wb['generate_password_txt'] = 'Passwort erzeugen'; $wb['repeat_password_txt'] = 'Passwort wiederholen'; $wb['password_mismatch_txt'] = 'Die Passwörter stimmen nicht überein.'; $wb['password_match_txt'] = 'Die Passwörter stimmen überein.'; $wb['listname_error_unique'] = 'Es beseht bereits eine Mailingliste mit diesem Namen auf dem Serverr. Bitte verwenden Sie einen anderen Mailinglistennamen.'; -$wb['email_error_isemail'] = 'Die E-Mail Adresse ist falsch.'; +$wb['email_error_isemail'] = 'Die E-Mail-Adresse ist falsch.'; $wb['mailinglist_txt'] = 'Mailingliste'; ?> diff --git a/interface/web/mail/lib/lang/de_mail_relay_domain.lng b/interface/web/mail/lib/lang/de_mail_relay_domain.lng index 6c0456a2c2..334c59ccdb 100644 --- a/interface/web/mail/lib/lang/de_mail_relay_domain.lng +++ b/interface/web/mail/lib/lang/de_mail_relay_domain.lng @@ -1,9 +1,9 @@ diff --git a/interface/web/mail/lib/lang/de_mail_relay_recipient_list.lng b/interface/web/mail/lib/lang/de_mail_relay_recipient_list.lng index fc5d6f47c5..61dcab1d34 100644 --- a/interface/web/mail/lib/lang/de_mail_relay_recipient_list.lng +++ b/interface/web/mail/lib/lang/de_mail_relay_recipient_list.lng @@ -1,9 +1,9 @@ diff --git a/interface/web/mail/lib/lang/de_mail_spamfilter.lng b/interface/web/mail/lib/lang/de_mail_spamfilter.lng index b133a4129b..7af10884c1 100644 --- a/interface/web/mail/lib/lang/de_mail_spamfilter.lng +++ b/interface/web/mail/lib/lang/de_mail_spamfilter.lng @@ -1,17 +1,17 @@ diff --git a/interface/web/mail/lib/lang/de_mail_transport.lng b/interface/web/mail/lib/lang/de_mail_transport.lng index 724882866f..9ed6c36375 100644 --- a/interface/web/mail/lib/lang/de_mail_transport.lng +++ b/interface/web/mail/lib/lang/de_mail_transport.lng @@ -3,9 +3,9 @@ $wb['server_id_txt'] = 'Server'; $wb['domain_txt'] = 'Domain'; $wb['destination_txt'] = 'Ziel'; $wb['type_txt'] = 'Typ'; -$wb['mx_txt'] = 'Kein MX Lookup'; +$wb['mx_txt'] = 'Kein MX-Lookup'; $wb['sort_order_txt'] = 'Sortiert nach'; $wb['active_txt'] = 'Aktiv'; -$wb['limit_mailrouting_txt'] = 'Die maximale Anzahl an E-Mail Routen für Ihr Konto wurde erreicht.'; +$wb['limit_mailrouting_txt'] = 'Die maximale Anzahl an E-Mail-Routen für Ihr Konto wurde erreicht.'; $wb['transport_txt'] = 'Transport'; -$wb['domain_error_unique'] = 'A mail transport for this Domain already exists on this server.'; +$wb['domain_error_unique'] = 'Ein Mail-Transport für diese Domain existiert bereits auf diesem Server.'; diff --git a/interface/web/mail/lib/lang/de_mail_transport_list.lng b/interface/web/mail/lib/lang/de_mail_transport_list.lng index 6c9f8656c4..713c2a766e 100644 --- a/interface/web/mail/lib/lang/de_mail_transport_list.lng +++ b/interface/web/mail/lib/lang/de_mail_transport_list.lng @@ -1,5 +1,5 @@ 1'; $wb['autoresponder_start_date_txt'] = 'Startet am'; $wb['autoresponder_start_date_ispast'] = 'Startdatum kann nicht in der Vergangenheit liegen.'; $wb['autoresponder_end_date_txt'] = 'Endet am'; $wb['autoresponder_end_date_isgreater'] = 'Enddatum muss angegeben werden und muss später als das Startdatum sein.'; -$wb['move_junk_txt'] = 'Spam E-Mails in den Junk-Ordner verschieben'; +$wb['move_junk_txt'] = 'Spam-E-Mails in den Junk-Ordner verschieben'; $wb['move_junk_y_txt'] = 'Zuerst verschieben, vor benutzerdefinierten Filtern.'; $wb['move_junk_a_txt'] = 'Als Letztes verschieben, nach benutzerdefinierten Filtern.'; $wb['move_junk_n_txt'] = 'Spam-E-Mails nicht in den Junk-Ordner verschieben.'; @@ -45,13 +45,13 @@ $wb['name_txt'] = 'Name'; $wb['name_optional_txt'] = '(optional)'; $wb['autoresponder_active'] = 'Autoresponder aktivieren'; $wb['cc_txt'] = 'Eingehende Mails in Kopie senden an'; -$wb['cc_error_isemail'] = 'Das Feld "Kopie senden an" enthält keine gültige E-Mail Adresse'; +$wb['cc_error_isemail'] = 'Das Feld "Kopie senden an" enthält keine gültige E-Mail-Adresse'; $wb['forward_in_lda_txt'] = 'Kopiere E-Mail während der Zustellung'; $wb['tooltip_forward_in_lda_txt'] = 'Legt fest, ob die E-Mail-Kopie vor oder während der Zustellung an die Mailbox weitergeleitet werden soll.'; $wb['login_error_unique'] = 'Benutzername wird bereits verwendet.'; $wb['login_error_regex'] = 'Zulässige Zeichen sind A-Z, a-z, 0-9, ., _ und -.'; $wb['login_txt'] = 'Anmelden'; -$wb['error_login_email_txt'] = 'Dieser Benutzername ist nicht zulässig. Bitte verwenden Sie einen anderen Benutzernamen oder die E-Mail Adresse als Benutzername.'; +$wb['error_login_email_txt'] = 'Dieser Benutzername ist nicht zulässig. Bitte verwenden Sie einen anderen Benutzernamen oder die E-Mail-Adresse als Benutzername.'; $wb['domain_txt'] = 'Domain'; $wb['now_txt'] = 'Jetzt'; $wb['generate_password_txt'] = 'Passwort erzeugen'; @@ -67,14 +67,14 @@ $wb['weekly_backup_txt'] = 'wöchentlich'; $wb['monthly_backup_txt'] = 'monatlich'; $wb['cc_note_txt'] = '(Mehrere E-Mail-Adressen mit Kommas trennen)'; $wb['sender_cc_txt'] = 'Kopie ausgehender Emails senden an (BCC)'; -$wb['sender_cc_error_isemail'] = '-Kopie ausgehender Emails senden an- Feld enthält keine gültige Emailadresse'; +$wb['sender_cc_error_isemail'] = '-Kopie ausgehender E-Mails senden an- Feld enthält keine gültige E-Mail-Adresse'; $wb['sender_cc_note_txt'] = '(Nur eine E-Mail-Adresse)'; $wb['password_click_to_set_txt'] = 'Passwort erzeugen'; $wb['purge_trash_days_txt'] = 'Papierkorb automatisch nach X Tagen leeren'; $wb['tooltip_purge_trash_days_txt'] = '0 = deaktiviert'; $wb['purge_junk_days_txt'] = 'Junk-Ordner automatisch nach X Tagen leeren'; $wb['tooltip_purge_junk_days_txt'] = '0 = deaktiviert'; -$wb['imap_prefix_txt'] = 'IMAP prefix'; -$wb['tooltip_imap_prefix_txt'] = 'In most cases this should be left empty. To allow seamless per-mailbox migration of legacy systems you can specify a prefix followed by the hierarchy separator. e.g.: \'INBOX.\''; +$wb['imap_prefix_txt'] = 'IMAP-Präfix'; +$wb['tooltip_imap_prefix_txt'] = 'In den meisten Fällen sollte dies leer gelassen werden. Um eine nahtlose Migration von Altsystemen zu ermöglichen, können Sie ein Präfix, gefolgt vom Hierarchietrennzeichen, angeben, z. B: \'INBOX.\''; ?> diff --git a/interface/web/mail/lib/lang/de_mail_user_filter.lng b/interface/web/mail/lib/lang/de_mail_user_filter.lng index 13be430c80..14e7b16264 100644 --- a/interface/web/mail/lib/lang/de_mail_user_filter.lng +++ b/interface/web/mail/lib/lang/de_mail_user_filter.lng @@ -7,7 +7,7 @@ $wb['rulename_error_empty'] = 'Name ist leer.'; $wb['searchterm_is_empty'] = 'Suchbegriff ist leer.'; $wb['source_txt'] = 'Quelle'; $wb['target_error_regex'] = 'Das Ziel beinhaltet wahrscheinlich diese Zeichen: a-z, 0-9, -, ., _, &, /, und {space}'; -$wb['limit_mailfilter_txt'] = 'Die maximale Anzahl an E-Mail Filtern für Ihr Konto wurde erreicht.'; +$wb['limit_mailfilter_txt'] = 'Die maximale Anzahl an E-Mail-Filtern für Ihr Konto wurde erreicht.'; $wb['subject_txt'] = 'Betreff'; $wb['from_txt'] = 'Von'; $wb['to_txt'] = 'An'; @@ -20,8 +20,8 @@ $wb['regex_txt'] = 'Matches Regex'; $wb['move_stop_txt'] = 'Verschieben nach'; $wb['delete_txt'] = 'Löschen'; $wb['header_txt'] = 'Header'; -$wb['size_over_txt'] = 'Email ist größer als (KB)'; -$wb['size_under_txt'] = 'Email ist kleiner als (KB)'; +$wb['size_over_txt'] = 'E-Mail ist größer als (KB)'; +$wb['size_under_txt'] = 'E-Mail ist kleiner als (KB)'; $wb['localpart_txt'] = 'Localpart'; $wb['domain_txt'] = 'Domain'; $wb['keep_txt'] = 'Behalten'; diff --git a/interface/web/mail/lib/lang/de_mail_user_list.lng b/interface/web/mail/lib/lang/de_mail_user_list.lng index b1ebb2fd1d..d42804d14b 100644 --- a/interface/web/mail/lib/lang/de_mail_user_list.lng +++ b/interface/web/mail/lib/lang/de_mail_user_list.lng @@ -1,8 +1,8 @@ diff --git a/interface/web/mail/lib/lang/de_spamfilter_blacklist.lng b/interface/web/mail/lib/lang/de_spamfilter_blacklist.lng index 63205a5ec1..4c7e16d9aa 100644 --- a/interface/web/mail/lib/lang/de_spamfilter_blacklist.lng +++ b/interface/web/mail/lib/lang/de_spamfilter_blacklist.lng @@ -2,7 +2,7 @@ $wb['server_id_txt'] = 'Server'; $wb['wb_txt'] = 'wb'; $wb['rid_txt'] = 'Benutzer'; -$wb['email_txt'] = 'E-Mail Adresse'; +$wb['email_txt'] = 'E-Mail-Adresse'; $wb['priority_txt'] = 'Priorität'; $wb['active_txt'] = 'Aktiv'; $wb['limit_spamfilter_wblist_txt'] = 'Die maximale Anzahl an White- oder Blacklist Einträgen für ihr Konto wurde erreicht.'; diff --git a/interface/web/mail/lib/lang/de_spamfilter_blacklist_list.lng b/interface/web/mail/lib/lang/de_spamfilter_blacklist_list.lng index 7ba623b657..ded5fa4303 100644 --- a/interface/web/mail/lib/lang/de_spamfilter_blacklist_list.lng +++ b/interface/web/mail/lib/lang/de_spamfilter_blacklist_list.lng @@ -1,9 +1,9 @@ diff --git a/interface/web/mail/lib/lang/de_spamfilter_config.lng b/interface/web/mail/lib/lang/de_spamfilter_config.lng index 2cf223259b..f0c66e0e0f 100644 --- a/interface/web/mail/lib/lang/de_spamfilter_config.lng +++ b/interface/web/mail/lib/lang/de_spamfilter_config.lng @@ -1,20 +1,20 @@ diff --git a/interface/web/mail/lib/lang/de_spamfilter_policy.lng b/interface/web/mail/lib/lang/de_spamfilter_policy.lng index 1036fbf91c..26f982d4ae 100644 --- a/interface/web/mail/lib/lang/de_spamfilter_policy.lng +++ b/interface/web/mail/lib/lang/de_spamfilter_policy.lng @@ -1,40 +1,40 @@ diff --git a/interface/web/mail/lib/lang/de_spamfilter_users.lng b/interface/web/mail/lib/lang/de_spamfilter_users.lng index d6b148cbe3..25171a837d 100644 --- a/interface/web/mail/lib/lang/de_spamfilter_users.lng +++ b/interface/web/mail/lib/lang/de_spamfilter_users.lng @@ -10,4 +10,4 @@ $wb['fullname_error_notempty'] = 'Der Name darf nicht leer sein.'; $wb['10 - highest'] = '10 - höchste'; $wb['5 - medium'] = '5 - normal'; $wb['1 - lowest'] = '1 - niedrigste'; -$wb['inherit_policy'] = '- Inherit domain setting -'; +$wb['inherit_policy'] = '- Vererbung der Domäneneinstellung -'; diff --git a/interface/web/mail/lib/lang/de_spamfilter_whitelist.lng b/interface/web/mail/lib/lang/de_spamfilter_whitelist.lng index fc6be5baed..55f69f463b 100644 --- a/interface/web/mail/lib/lang/de_spamfilter_whitelist.lng +++ b/interface/web/mail/lib/lang/de_spamfilter_whitelist.lng @@ -2,7 +2,7 @@ $wb['server_id_txt'] = 'Server'; $wb['wb_txt'] = 'wb'; $wb['rid_txt'] = 'Benutzer'; -$wb['email_txt'] = 'E-Mail Adresse'; +$wb['email_txt'] = 'E-Mail-Adresse'; $wb['priority_txt'] = 'Priorität'; $wb['active_txt'] = 'Aktiv'; $wb['limit_spamfilter_wblist_txt'] = 'Die maximale Anzahl an White- oder Blacklist Einträgen für Ihr Konto wurde erreicht.'; diff --git a/interface/web/mail/lib/lang/de_spamfilter_whitelist_list.lng b/interface/web/mail/lib/lang/de_spamfilter_whitelist_list.lng index 4d7769d2aa..5c93be8ccd 100644 --- a/interface/web/mail/lib/lang/de_spamfilter_whitelist_list.lng +++ b/interface/web/mail/lib/lang/de_spamfilter_whitelist_list.lng @@ -1,9 +1,9 @@ diff --git a/interface/web/mail/lib/lang/de_user_quota_stats_list.lng b/interface/web/mail/lib/lang/de_user_quota_stats_list.lng index beb9c18eb9..90f28f396d 100644 --- a/interface/web/mail/lib/lang/de_user_quota_stats_list.lng +++ b/interface/web/mail/lib/lang/de_user_quota_stats_list.lng @@ -1,8 +1,8 @@ diff --git a/interface/web/mail/lib/lang/de_xmpp_domain.lng b/interface/web/mail/lib/lang/de_xmpp_domain.lng index 0541203b2e..520b5154da 100644 --- a/interface/web/mail/lib/lang/de_xmpp_domain.lng +++ b/interface/web/mail/lib/lang/de_xmpp_domain.lng @@ -1,62 +1,62 @@ diff --git a/interface/web/mail/lib/lang/de_xmpp_domain_admin_list.lng b/interface/web/mail/lib/lang/de_xmpp_domain_admin_list.lng index af643eab5a..0c3f8f974c 100644 --- a/interface/web/mail/lib/lang/de_xmpp_domain_admin_list.lng +++ b/interface/web/mail/lib/lang/de_xmpp_domain_admin_list.lng @@ -1,8 +1,8 @@ diff --git a/interface/web/mail/lib/lang/de_xmpp_domain_list.lng b/interface/web/mail/lib/lang/de_xmpp_domain_list.lng index ebfebab7d5..af23b58d6d 100644 --- a/interface/web/mail/lib/lang/de_xmpp_domain_list.lng +++ b/interface/web/mail/lib/lang/de_xmpp_domain_list.lng @@ -1,7 +1,7 @@ diff --git a/interface/web/mail/lib/lang/de_xmpp_user.lng b/interface/web/mail/lib/lang/de_xmpp_user.lng index 6ab739d98b..04d3688131 100644 --- a/interface/web/mail/lib/lang/de_xmpp_user.lng +++ b/interface/web/mail/lib/lang/de_xmpp_user.lng @@ -1,15 +1,15 @@ diff --git a/interface/web/mail/lib/lang/de_xmpp_user_list.lng b/interface/web/mail/lib/lang/de_xmpp_user_list.lng index f2651cb62b..4acb7f0f14 100644 --- a/interface/web/mail/lib/lang/de_xmpp_user_list.lng +++ b/interface/web/mail/lib/lang/de_xmpp_user_list.lng @@ -1,8 +1,8 @@ diff --git a/interface/web/mailuser/lib/lang/de.lng b/interface/web/mailuser/lib/lang/de.lng index b373d456a0..d851e0beac 100644 --- a/interface/web/mailuser/lib/lang/de.lng +++ b/interface/web/mailuser/lib/lang/de.lng @@ -1,9 +1,9 @@ diff --git a/interface/web/mailuser/lib/lang/de_index.lng b/interface/web/mailuser/lib/lang/de_index.lng index 522ddbc8db..93bea6ca6e 100644 --- a/interface/web/mailuser/lib/lang/de_index.lng +++ b/interface/web/mailuser/lib/lang/de_index.lng @@ -1,11 +1,11 @@ diff --git a/interface/web/mailuser/lib/lang/de_mail_user_filter.lng b/interface/web/mailuser/lib/lang/de_mail_user_filter.lng index 73e98770fd..e150c250c5 100644 --- a/interface/web/mailuser/lib/lang/de_mail_user_filter.lng +++ b/interface/web/mailuser/lib/lang/de_mail_user_filter.lng @@ -7,8 +7,8 @@ $wb['rulename_error_empty'] = 'Name ist leer.'; $wb['searchterm_is_empty'] = 'Suchbegriff ist leer.'; $wb['source_txt'] = 'Quelle'; $wb['target_error_regex'] = 'Das Ziel darf nur die folgenden Zeichen enthalten: a-z, 0-9, -, ., _, &, /, und {space}'; -$wb['limit_mailfilter_txt'] = 'Die max. Anzahl an E-Mailfiltern ist erreicht.'; -$wb['mailbox_filter_txt'] = 'E-Mailfilter'; +$wb['limit_mailfilter_txt'] = 'Die max. Anzahl an E-Mail-Filtern ist erreicht.'; +$wb['mailbox_filter_txt'] = 'E-Mail-Filter'; $wb['subject_txt'] = 'Betreff'; $wb['from_txt'] = 'Von'; $wb['to_txt'] = 'An'; @@ -17,9 +17,9 @@ $wb['is_txt'] = 'Ist'; $wb['begins_with_txt'] = 'Startet mit'; $wb['ends_with_txt'] = 'Endet mit'; $wb['move_to_txt'] = 'Verschieben nach'; -$wb['regex_txt'] = 'Matches Regex'; +$wb['regex_txt'] = 'Stimmt mit Regex überein'; $wb['delete_txt'] = 'Löschen'; $wb['header_txt'] = 'Header'; -$wb['size_over_txt'] = 'Email size over (KB)'; -$wb['size_under_txt'] = 'Email size under (KB)'; +$wb['size_over_txt'] = 'Größe der E-Mail über (KB)'; +$wb['size_under_txt'] = 'Größe der E-Mail unter (KB)'; ?> diff --git a/interface/web/mailuser/lib/lang/de_mail_user_filter_list.lng b/interface/web/mailuser/lib/lang/de_mail_user_filter_list.lng index 9abd40d7e3..35be5d34c9 100644 --- a/interface/web/mailuser/lib/lang/de_mail_user_filter_list.lng +++ b/interface/web/mailuser/lib/lang/de_mail_user_filter_list.lng @@ -1,8 +1,8 @@ diff --git a/interface/web/mailuser/lib/lang/de_mail_user_password.lng b/interface/web/mailuser/lib/lang/de_mail_user_password.lng index cf97177b61..f1aea92007 100644 --- a/interface/web/mailuser/lib/lang/de_mail_user_password.lng +++ b/interface/web/mailuser/lib/lang/de_mail_user_password.lng @@ -1,5 +1,5 @@ diff --git a/interface/web/mailuser/lib/lang/de_mail_user_spamfilter.lng b/interface/web/mailuser/lib/lang/de_mail_user_spamfilter.lng index d444899a8f..ab1dd87fde 100644 --- a/interface/web/mailuser/lib/lang/de_mail_user_spamfilter.lng +++ b/interface/web/mailuser/lib/lang/de_mail_user_spamfilter.lng @@ -2,6 +2,6 @@ $wb['mailbox_spamfilter_txt'] = 'Spamfilter'; $wb['spamfilter_txt'] = 'Spamfilter'; $wb['email_txt'] = 'E-Mail'; -$wb['inherit_policy'] = '- Inherit domain setting -'; +$wb['inherit_policy'] = '- Vererbung der Domäneneinstellung -'; $wb['policy_txt'] = 'Richtlinie'; ?> diff --git a/interface/web/monitor/lib/lang/de.lng b/interface/web/monitor/lib/lang/de.lng index 629df19fdd..652c7b412e 100644 --- a/interface/web/monitor/lib/lang/de.lng +++ b/interface/web/monitor/lib/lang/de.lng @@ -22,27 +22,27 @@ $wb['minutes'] = 'Minuten'; $wb['Overview'] = 'Übersicht zeigen'; $wb['System State (All Servers)'] = 'Systemstatus (Alle Server)'; $wb['Hardware-Information'] = 'Hardwareinformationen'; -$wb['CPU info'] = 'CPU Informationen'; +$wb['CPU info'] = 'CPU-Informationen'; $wb['Server State'] = 'Serverstatus'; $wb['Update State'] = 'Updatestatus anzeigen'; -$wb['RAID state'] = 'RAID Status anzeigen'; +$wb['RAID state'] = 'RAID-Status anzeigen'; $wb['Server load'] = 'Serverauslastung anzeigen'; $wb['Disk usage'] = 'Festplattenbelegung anzeigen'; $wb['Memory usage'] = 'Speicherauslastung anzeigen'; $wb['Services'] = 'Dienste anzeigen'; -$wb['Mail-Queue'] = 'E-Mail Warteschlange anzeigen'; -$wb['Mail-Log'] = 'E-Mail Protokoll anzeigen'; -$wb['Mail warn-Log'] = 'E-Mail Warn Protokoll anzeigen'; -$wb['Mail err-Log'] = 'E-Mail Fehler Protokoll anzeigen'; -$wb['System-Log'] = 'System Protokoll anzeigen'; -$wb['Freshclam-Log'] = 'Freshclam Protokoll anzeigen'; +$wb['Mail-Queue'] = 'E-Mail-Warteschlange anzeigen'; +$wb['Mail-Log'] = 'E-Mail-Protokoll anzeigen'; +$wb['Mail warn-Log'] = 'E-Mail Warn-Protokoll anzeigen'; +$wb['Mail err-Log'] = 'E-Mail-Fehler-Protokoll anzeigen'; +$wb['System-Log'] = 'System-Protokoll anzeigen'; +$wb['Freshclam-Log'] = 'Freshclam-Protokoll anzeigen'; $wb['Let\'s Encrypt log'] = 'Let\'s Encrypt log'; -$wb['Clamav-Log'] = 'ClamAV Protokoll anzeigen'; -$wb['ISPConfig-Log'] = 'ISPConfig Protokoll anzeigen'; -$wb['RKHunter-Log'] = 'RKHunter Protokoll anzeigen'; +$wb['Clamav-Log'] = 'ClamAV-Protokoll anzeigen'; +$wb['ISPConfig-Log'] = 'ISPConfig-Protokoll anzeigen'; +$wb['RKHunter-Log'] = 'RKHunter-Protokoll anzeigen'; $wb['Jobqueue'] = 'Jobwarteschlange anzeigen'; $wb['Data Log History'] = 'Datalog-History anzeigen'; -$wb['ISPC Cron-Log'] = 'Cron Protokoll anzeigen'; +$wb['ISPC Cron-Log'] = 'Cron-Protokoll anzeigen'; $wb['no_data_updates_txt'] = 'Derzeit stehen keine Daten über Updates zur Verfügung. Bitte später erneut überprüfen.'; $wb['no_data_raid_txt'] = 'Derzeit stehen keine Daten über RAID zur Verfügung. Bitte später erneut überprüfen.'; $wb['no_data_rkhunter_txt'] = 'Derzeit stehen keine Daten von RKHunter zur Verfügung. Bitte später erneut überprüfen.'; @@ -56,15 +56,15 @@ $wb['monitor_diskusage_used_txt'] = 'In Verwendung'; $wb['monitor_diskusage_available_txt'] = 'verfügbar'; $wb['monitor_diskusage_usage_txt'] = 'Verwendung in %'; $wb['monitor_diskusage_mounted_txt'] = 'gemountet unter'; -$wb['monitor_logs_mail_txt'] = 'E-Mail Protokoll'; -$wb['monitor_logs_mailwarn_txt'] = 'E-Mail Warnung Protokoll'; -$wb['monitor_logs_mailerr_txt'] = 'E-Mail Fehler Protokoll'; -$wb['monitor_logs_messages_txt'] = 'Systemmeldungen Protokoll'; -$wb['monitor_logs_ispccron_txt'] = 'Cron Protokoll'; +$wb['monitor_logs_mail_txt'] = 'E-Mail-Protokoll'; +$wb['monitor_logs_mailwarn_txt'] = 'E-Mail-Warnung-Protokoll'; +$wb['monitor_logs_mailerr_txt'] = 'E-Mail-Fehler-Protokoll'; +$wb['monitor_logs_messages_txt'] = 'Systemmeldungen-Protokoll'; +$wb['monitor_logs_ispccron_txt'] = 'Cron-Protokoll'; $wb['monitor_logs_letsencrypt_txt'] = 'Let\'s Encrypt - Log'; -$wb['monitor_logs_freshclam_txt'] = 'Freshclam Protokoll'; -$wb['monitor_logs_clamav_txt'] = 'ClamAV Protokoll'; -$wb['monitor_logs_ispc_txt'] = 'ISPConfig Protokoll'; +$wb['monitor_logs_freshclam_txt'] = 'Freshclam-Protokoll'; +$wb['monitor_logs_clamav_txt'] = 'ClamAV-Protokoll'; +$wb['monitor_logs_ispc_txt'] = 'ISPConfig-Protokoll'; $wb['monitor_norkhunter_txt'] = 'RKHunter ist nicht installiert, deshalb gibt es keine Protokolldatei'; $wb['monitor_serverstate_server_txt'] = 'Server'; $wb['monitor_serverstate_kernel_txt'] = 'Kernel'; @@ -97,12 +97,12 @@ $wb['monitor_serverstate_loadhigh_txt'] = 'Der Server ist stark ausgelastet'; $wb['monitor_serverstate_loaghigher_txt'] = 'Der Server ist stärker ausgelastet'; $wb['monitor_serverstate_loadhighest_txt'] = 'Der Server ist höchst ausgelastet'; $wb['monitor_serverstate_loadunknown_txt'] = 'Serverauslastung: ???'; -$wb['monitor_serverstate_mailqok_txt'] = 'Die E-Mail Wartenschlangenauslastung ist in Ordnung'; -$wb['monitor_serverstate_mailqheavy_txt'] = 'Die E-Mail Wartenschlange ist extrem ausgelastet'; -$wb['monitor_serverstate_mailqhigh_txt'] = 'Die E-Mail Wartenschlange ist stark ausgelastet'; -$wb['monitor_serverstate_mailqhigher_txt'] = 'Die E-Mail Wartenschlange ist stärker ausgelastet'; -$wb['monitor_serverstate_mailqhighest_txt'] = 'Die E-Mail Wartenschlange ist höchst ausgelastet'; -$wb['monitor_serverstate_mailqunknown_txt'] = 'E-Mail Wartenschlange: ???'; +$wb['monitor_serverstate_mailqok_txt'] = 'Die E-Mail-Wartenschlangenauslastung ist in Ordnung'; +$wb['monitor_serverstate_mailqheavy_txt'] = 'Die E-Mail-Wartenschlange ist extrem ausgelastet'; +$wb['monitor_serverstate_mailqhigh_txt'] = 'Die E-Mail-Wartenschlange ist stark ausgelastet'; +$wb['monitor_serverstate_mailqhigher_txt'] = 'Die E-Mail-Wartenschlange ist stärker ausgelastet'; +$wb['monitor_serverstate_mailqhighest_txt'] = 'Die E-Mail-Wartenschlange ist höchst ausgelastet'; +$wb['monitor_serverstate_mailqunknown_txt'] = 'E-Mail-Wartenschlange: ???'; $wb['monitor_serverstate_raidok_txt'] = 'Das RAID ist in Ordnung'; $wb['monitor_serverstate_raidresync_txt'] = 'Das RAID ist im RESYNC Modus'; $wb['monitor_serverstate_raidfault_txt'] = 'Das RAID hat eine DEFEKTE Festplatte. Bitte schnellstmöglich ersetzen!'; @@ -111,13 +111,13 @@ $wb['monitor_serverstate_raidunknown_txt'] = 'RAID Status: ???'; $wb['monitor_serverstate_servicesonline_txt'] = 'Alle benötigten Dienste sind online'; $wb['monitor_serverstate_servicesoffline_txt'] = 'Einer oder mehrere benötigte Dienste sind offline'; $wb['monitor_serverstate_servicesunknown_txt'] = 'Dienste: ???'; -$wb['monitor_serverstate_syslogok_txt'] = 'Das System Protokoll ist in Ordnung'; -$wb['monitor_serverstate_syslogwarning_txt'] = 'Es gibt Warnungen im System Protokoll'; -$wb['monitor_serverstate_syslogerror_txt'] = 'Es gibt Fehler im System Protokoll'; -$wb['monitor_serverstate_syslogunknown_txt'] = 'System Protokoll: ???'; +$wb['monitor_serverstate_syslogok_txt'] = 'Das System-Protokoll ist in Ordnung'; +$wb['monitor_serverstate_syslogwarning_txt'] = 'Es gibt Warnungen im System-Protokoll'; +$wb['monitor_serverstate_syslogerror_txt'] = 'Es gibt Fehler im System-Protokoll'; +$wb['monitor_serverstate_syslogunknown_txt'] = 'System-Protokoll: ???'; $wb['monitor_serverstate_updatesok_txt'] = 'Ihr System ist aktuell'; $wb['monitor_serverstate_updatesneeded_txt'] = 'Eine oder mehrere Komponenten benötigen ein Update'; -$wb['monitor_serverstate_updatesunknown_txt'] = 'System Update: ???'; +$wb['monitor_serverstate_updatesunknown_txt'] = 'System-Update: ???'; $wb['monitor_services_online_txt'] = 'Online'; $wb['monitor_services_offline_txt'] = 'Offline'; $wb['monitor_services_web_txt'] = 'Web Server:'; @@ -132,38 +132,38 @@ $wb['monitor_settings_datafromdate_txt'] = 'Daten vom: '; $wb['monitor_settings_datetimeformat_txt'] = 'd.m.Y H:i'; $wb['monitor_settings_refreshsq_txt'] = 'Aktualisierungsrate:'; $wb['monitor_settings_server_txt'] = 'Server'; -$wb['monitor_title_cpuinfo_txt'] = 'CPU Informationen'; +$wb['monitor_title_cpuinfo_txt'] = 'CPU-Informationen'; $wb['monitor_title_updatestate_txt'] = 'Updatestatus'; -$wb['monitor_title_mailq_txt'] = 'E-Mail Warteschlange'; -$wb['monitor_title_raidstate_txt'] = 'RAID Status'; -$wb['monitor_title_rkhunterlog_txt'] = 'RKHunter Protokoll'; +$wb['monitor_title_mailq_txt'] = 'E-Mail-Warteschlange'; +$wb['monitor_title_raidstate_txt'] = 'RAID-Status'; +$wb['monitor_title_rkhunterlog_txt'] = 'RKHunter-Protokoll'; $wb['monitor_updates_nosupport_txt'] = 'Ihre Distribution wird für die Überwachung nicht unterstützt'; -$wb['monitor_title_fail2ban_txt'] = 'Fail2Ban Protokoll'; -$wb['monitor_title_mongodb_txt'] = 'MongoDB Protokoll'; -$wb['monitor_nosupportedraid1_txt'] = 'At the moment, we support mdadm or mpt-status for monitoring the RAID.
We cant find any of them at your server.

This means we can not support your RAID yet.'; -$wb['monitor_serverstate_beancounterok_txt'] = 'The beancounter is ok'; -$wb['monitor_serverstate_beancounterinfo_txt'] = 'There are vew failure in the beancounter'; -$wb['monitor_serverstate_beancounterwarning_txt'] = 'There are some failure in the beancounter'; -$wb['monitor_serverstate_beancountercritical_txt'] = 'There are many failure in the beancounter'; -$wb['monitor_serverstate_beancountererror_txt'] = 'There are too much failure in the beancounter'; -$wb['monitor_title_beancounter_txt'] = 'OpenVz VE BeanCounter'; -$wb['monitor_beancounter_nosupport_txt'] = 'This server is not a OpenVz VE and has no beancounter information'; -$wb['monitor_title_iptables_txt'] = 'IPTables Regeln'; -$wb['fail2ban-Log'] = 'Fail2ban Protokoll anzeigen'; -$wb['MongoDB-Log'] = 'MongoDB Protokoll anzeigen'; +$wb['monitor_title_fail2ban_txt'] = 'Fail2Ban-Protokoll'; +$wb['monitor_title_mongodb_txt'] = 'MongoDB-Protokoll'; +$wb['monitor_nosupportedraid1_txt'] = 'Im Moment unterstützen wir nur mdadm, mpt-status, tw_cli, hpacucli, megacli(64) und arcconf zur Überwachung des RAID.
Wir können keine von ihnen auf Ihrem Server finden.

Das bedeutet, dass wir Ihr RAID noch nicht unterstützen.'; +$wb['monitor_serverstate_beancounterok_txt'] = 'Der Beancounter ist Okay'; +$wb['monitor_serverstate_beancounterinfo_txt'] = 'Es gibt nur wenige Fehler im Beancounter'; +$wb['monitor_serverstate_beancounterwarning_txt'] = 'Es gibt einige Fehler im Beancounter'; +$wb['monitor_serverstate_beancountercritical_txt'] = 'Es gibt viele Fehler im Beancounter'; +$wb['monitor_serverstate_beancountererror_txt'] = 'Es gibt zu viele Fehler im Bbeancounter'; +$wb['monitor_title_beancounter_txt'] = 'OpenVz-Vz-BeanCounter'; +$wb['monitor_beancounter_nosupport_txt'] = 'Dieser Server ist kein OpenVz VE und hat keine Beancounter-Informationen'; +$wb['monitor_title_iptables_txt'] = 'IPTables-Regeln'; +$wb['fail2ban-Log'] = 'Fail2ban-Protokoll anzeigen'; +$wb['MongoDB-Log'] = 'MongoDB-Protokoll anzeigen'; $wb['IPTables'] = 'IPTables anzeigen'; -$wb['OpenVz VE BeanCounter'] = 'OpenVz VE BeanCounter anzeigen'; +$wb['OpenVz VE BeanCounter'] = 'OpenVz-VE-BeanCounter anzeigen'; $wb['Monit'] = 'Monit anzeigen'; $wb['no_monit_url_defined_txt'] = 'Keine Monit-URL definiert.'; $wb['no_permissions_to_view_monit_txt'] = 'Sie haben nicht die Berechtigung, auf Monit zuzugreifen.'; $wb['Munin'] = 'Munin anzeigen'; $wb['no_munin_url_defined_txt'] = 'Keine Munin-URL definiert.'; $wb['no_permissions_to_view_munin_txt'] = 'Sie haben nicht die Berechtigung, auf Munin zuzugreifen.'; -$wb['no_data_database_size_txt'] = 'Derzeit stehen keine Daten über die Speicherverbrauch der Datenbanken zur Verfügung. Bitte später erneut Ãrüfen..'; -$wb['monitor_database_name_txt'] = 'Database'; -$wb['monitor_database_size_txt'] = 'Size'; -$wb['monitor_database_client_txt'] = 'Client'; +$wb['no_data_database_size_txt'] = 'Derzeit stehen keine Daten über die Speicherverbrauch der Datenbanken zur Verfügung. Bitte später erneut überprüfen...'; +$wb['monitor_database_name_txt'] = 'Datenbank'; +$wb['monitor_database_size_txt'] = 'Größe'; +$wb['monitor_database_client_txt'] = 'Kunde'; $wb['monitor_database_domain_txt'] = 'Domain'; -$wb['Database size'] = 'Database size'; -$wb['MySQL Database size'] = 'MySQL Database size'; +$wb['Database size'] = 'Datenbankgröße'; +$wb['MySQL Database size'] = 'MySQL-Datenbankgröße'; ?> diff --git a/interface/web/sites/lib/lang/de_web_domain.lng b/interface/web/sites/lib/lang/de_web_domain.lng index 7c41fe99e1..9ed17cbf6f 100644 --- a/interface/web/sites/lib/lang/de_web_domain.lng +++ b/interface/web/sites/lib/lang/de_web_domain.lng @@ -37,10 +37,10 @@ $wb['client_txt'] = 'Kunde'; $wb['limit_web_domain_txt'] = 'Die maximale Anzahl an Webdomains für Ihr Konto wurde erreicht.'; $wb['limit_web_aliasdomain_txt'] = 'Die maximale Anzahl an Aliasdomains für Ihr Konto wurde erreicht.'; $wb['limit_web_subdomain_txt'] = 'Die maximale Anzahl an Subdomains für Ihr Konto wurde erreicht.'; -$wb['apache_directives_txt'] = 'Apache Direktiven'; +$wb['apache_directives_txt'] = 'Apache-Direktiven'; $wb['domain_error_empty'] = 'Domain ist leer.'; $wb['domain_error_unique'] = 'Domain muss eindeutig sein'; -$wb['domain_error_regex'] = 'Domain Name ungültig.'; +$wb['domain_error_regex'] = 'Domainname ungültig.'; $wb['domain_error_autosub'] = 'Es existiert bereits eine Subdomain mit diesen Einstellungen.'; $wb['hd_quota_error_empty'] = 'Speicherplatzbeschränkung ist leer.'; $wb['traffic_quota_error_empty'] = 'Transfervolumenbeschränkung ist leer.'; @@ -50,10 +50,10 @@ $wb['error_ssl_locality_empty'] = 'Ort (SSL) ist leer.'; $wb['error_ssl_organisation_empty'] = 'Organisation (SSL) ist leer.'; $wb['error_ssl_organisation_unit_empty'] = 'Abteilung (SSL) ist leer.'; $wb['error_ssl_country_empty'] = 'Land (SSL) ist leer.'; -$wb['subdomain_txt'] = 'Auto Subdomain'; +$wb['subdomain_txt'] = 'Auto-Subdomain'; $wb['client_group_id_txt'] = 'Kunde'; $wb['stats_password_txt'] = 'Webstatistik Passwort'; -$wb['ssl_domain_txt'] = 'SSL Domain'; +$wb['ssl_domain_txt'] = 'SSL-Domain'; $wb['allow_override_txt'] = 'Allow Override'; $wb['limit_web_quota_free_txt'] = 'Max. mögliche Speicherplatzbeschränkung'; $wb['ssl_state_error_regex'] = 'Ungültiges SSL-Bundesland. Gültige Zeichen sind: a-z, 0-9 und .,-_&äöüÄÖÜ'; @@ -99,7 +99,7 @@ $wb['pm_min_spare_servers_error_regex'] = 'PHP-FPM pm.min_spare_servers muß ein $wb['pm_max_spare_servers_error_regex'] = 'PHP-FPM pm.max_spare_servers muß eine positive ganze Zahl sein.'; $wb['hd_quota_error_regex'] = 'Speicherplatzbeschränkung ist ungültig.'; $wb['traffic_quota_error_regex'] = 'Transfervolumenbeschränkung ist ungültig.'; -$wb['server_php_id_txt'] = 'PHP Version'; +$wb['server_php_id_txt'] = 'PHP-Version'; $wb['pm_txt'] = 'PHP-FPM FastCGI Prozess Manager'; $wb['pm_process_idle_timeout_txt'] = 'PHP-FPM pm.process_idle_timeout'; $wb['pm_max_requests_txt'] = 'PHP-FPM pm.max_requests'; @@ -132,10 +132,10 @@ $wb['backup_excludes_note_txt'] = '(Mehrere Verzeichnisse mit Kommas trennen. Be $wb['backup_excludes_error_regex'] = 'Die auszuschließenden Verzeichnisse enthalten ungültige Zeichen.'; $wb['invalid_custom_php_ini_settings_txt'] = 'Unzulässige php.ini-Einstellungen'; $wb['invalid_system_user_or_group_txt'] = 'Invalid system user or group'; -$wb['apache_directive_blocked_error'] = 'Die Apache Direktive wurde durch die Sicherheitsrichtline blockiert:'; -$wb['http_port_txt'] = 'HTTP Port'; -$wb['https_port_txt'] = 'HTTPS Port'; -$wb['http_port_error_regex'] = 'HTTP Port invalid.'; -$wb['https_port_error_regex'] = 'HTTPS Port invalid.'; -$wb['nginx_directive_blocked_error'] = 'Nginx directive blocked by security settings:'; +$wb['apache_directive_blocked_error'] = 'Die Apache-Direktive wurde durch die Sicherheitsrichtline blockiert:'; +$wb['http_port_txt'] = 'HTTP-Port'; +$wb['https_port_txt'] = 'HTTPS-Port'; +$wb['http_port_error_regex'] = 'HTTP-Port ungültig.'; +$wb['https_port_error_regex'] = 'HTTPS-Port ungültig.'; +$wb['nginx_directive_blocked_error'] = 'Nginx-Direktive wurde durch die Sicherheitsrichtline blockiert:'; ?> diff --git a/interface/web/sites/lib/lang/de_web_subdomain.lng b/interface/web/sites/lib/lang/de_web_subdomain.lng index 030d43a905..60073a6fc2 100644 --- a/interface/web/sites/lib/lang/de_web_subdomain.lng +++ b/interface/web/sites/lib/lang/de_web_subdomain.lng @@ -4,10 +4,10 @@ $wb['ssl_locality_txt'] = 'Ort'; $wb['ssl_organisation_txt'] = 'Firma'; $wb['ssl_organisation_unit_txt'] = 'Abteilung'; $wb['ssl_country_txt'] = 'Land'; -$wb['ssl_request_txt'] = 'SSL Anfrage'; -$wb['ssl_cert_txt'] = 'SSL Zertifikat'; -$wb['ssl_bundle_txt'] = 'SSL Bundle'; -$wb['ssl_action_txt'] = 'SSL Aktion'; +$wb['ssl_request_txt'] = 'SSL-Anfrage'; +$wb['ssl_cert_txt'] = 'SSL-Zertifikat'; +$wb['ssl_bundle_txt'] = 'SSL-Bundle'; +$wb['ssl_action_txt'] = 'SSL-Aktion'; $wb['server_id_txt'] = 'Server'; $wb['domain_txt'] = 'Domain'; $wb['type_txt'] = 'Typ'; @@ -38,7 +38,7 @@ $wb['limit_web_subdomain_txt'] = 'Die max. Anzahl an Web-Subdomains für Ihr Kon $wb['apache_directives_txt'] = 'Apache-Direktiven'; $wb['domain_error_empty'] = 'Domain ist leer.'; $wb['domain_error_unique'] = 'Domain muss eindeutig sein.'; -$wb['domain_error_regex'] = 'Domain-Name ist ungültig.'; +$wb['domain_error_regex'] = 'Domainname ist ungültig.'; $wb['domain_error_wildcard'] = 'Wildcard Subdomains sind nicht erlaubt.'; $wb['host_txt'] = 'Host'; $wb['redirect_error_regex'] = 'Ungültiger Redirect-Pfad. Gültige Pfade sind beispielsweise: /test/ oder https://www.domain.tld/test/'; @@ -47,8 +47,8 @@ $wb['no_flag_txt'] = 'Kein Flag'; $wb['proxy_directives_txt'] = 'Proxy-Direktiven'; $wb['available_proxy_directive_snippets_txt'] = 'Verfügbare Proxy Direktiven Schnipsel:'; $wb['error_proxy_requires_url'] = 'Weiterleitungstyp \\"proxy\\" erfordert eine URL als Weiterleitungspfad.'; -$wb['http_port_txt'] = 'HTTP Port'; -$wb['https_port_txt'] = 'HTTPS Port'; -$wb['http_port_error_regex'] = 'HTTP Port ungültig.'; -$wb['https_port_error_regex'] = 'HTTPS Port ungültig.'; +$wb['http_port_txt'] = 'HTTP-Port'; +$wb['https_port_txt'] = 'HTTPS-Port'; +$wb['http_port_error_regex'] = 'HTTP-Port ungültig.'; +$wb['https_port_error_regex'] = 'HTTPS-Port ungültig.'; ?> diff --git a/interface/web/sites/lib/lang/de_web_vhost_domain_list.lng b/interface/web/sites/lib/lang/de_web_vhost_domain_list.lng index 9d48c3897f..9aa418cc8e 100644 --- a/interface/web/sites/lib/lang/de_web_vhost_domain_list.lng +++ b/interface/web/sites/lib/lang/de_web_vhost_domain_list.lng @@ -1,6 +1,6 @@ diff --git a/interface/web/tools/lib/lang/de_import_vpopmail.lng b/interface/web/tools/lib/lang/de_import_vpopmail.lng index 66fe56da1c..26741130c2 100644 --- a/interface/web/tools/lib/lang/de_import_vpopmail.lng +++ b/interface/web/tools/lib/lang/de_import_vpopmail.lng @@ -1,7 +1,7 @@ diff --git a/interface/web/tools/lib/lang/de_index.lng b/interface/web/tools/lib/lang/de_index.lng index 8cde04515e..29167401df 100644 --- a/interface/web/tools/lib/lang/de_index.lng +++ b/interface/web/tools/lib/lang/de_index.lng @@ -1,4 +1,4 @@ diff --git a/interface/web/tools/lib/lang/de_resync.lng b/interface/web/tools/lib/lang/de_resync.lng index 5a9a60e15f..94b6a26278 100644 --- a/interface/web/tools/lib/lang/de_resync.lng +++ b/interface/web/tools/lib/lang/de_resync.lng @@ -4,15 +4,15 @@ $wb['legend_txt'] = 'Resync'; $wb['resync_all_txt'] = 'Alle Dienste'; $wb['resync_sites_txt'] = 'Webseiten'; $wb['resync_ftp_txt'] = 'FTP-Benutzer'; -$wb['resync_webdav_txt'] = 'WebDAV Benutzer'; -$wb['resync_shell_txt'] = 'Shell Benutzer'; +$wb['resync_webdav_txt'] = 'WebDAV-Benutzer'; +$wb['resync_shell_txt'] = 'Shell-Benutzer'; $wb['resync_cron_txt'] = 'Cronjobs'; -$wb['resync_db_txt'] = 'Kunden Datenbankeinstellungen'; +$wb['resync_db_txt'] = 'Kunden-Datenbankeinstellungen'; $wb['resync_mailbox_txt'] = 'Mailkonten'; $wb['resync_mail_txt'] = 'Maildomains'; $wb['resync_mailfilter_txt'] = 'Mailfilter'; $wb['resync_mailinglist_txt'] = 'Mailinglist'; -$wb['resync_dns_txt'] = 'DNS Einträge'; +$wb['resync_dns_txt'] = 'DNS-Einträge'; $wb['resync_vserver_txt'] = 'vServer'; $wb['resync_client_txt'] = 'Kunden und Reseller'; $wb['all_active_txt'] = 'Alle aktiven Server'; @@ -24,30 +24,30 @@ $wb['all_active_db_txt'] = 'Alle aktive Datenbank-Server'; $wb['all_active_vserver_txt'] = 'Alle aktive vServer'; $wb['do_sites_txt'] = 'Resynced Webseiten'; $wb['do_ftp_txt'] = 'Resynced FTP-Benutzer'; -$wb['do_webdav_txt'] = 'Resynced WebDav Benutzer'; -$wb['do_shell_txt'] = 'Resynced Shell Benutzer'; +$wb['do_webdav_txt'] = 'Resynced WebDav-Benutzer'; +$wb['do_shell_txt'] = 'Resynced Shell-Benutzer'; $wb['do_cron_txt'] = 'Resynced Cronjob'; -$wb['do_db_user_txt'] = 'Resynced Datenbank Benutzer'; +$wb['do_db_user_txt'] = 'Resynced Datenbank-Benutzer'; $wb['do_db_txt'] = 'Resynced Datenbank'; $wb['do_mail_txt'] = 'Resynced Maildomain'; $wb['do_mailbox_txt'] = 'Resynced Mailkonto'; $wb['do_mail_alias_txt'] = 'Resynced Alias'; -$wb['do_mail_access_txt'] = 'Resynced Mail Access'; -$wb['do_mail_contentfilter_txt'] = 'Resynced Content Filter'; -$wb['do_mail_userfilter_txt'] = 'Resynced Mail User Filter'; +$wb['do_mail_access_txt'] = 'Resynced Mail-Access'; +$wb['do_mail_contentfilter_txt'] = 'Resynced Content-Filter'; +$wb['do_mail_userfilter_txt'] = 'Resynced Mail-Benutzer-Filter'; $wb['do_mailinglist_txt'] = 'Resynced Mailinglist'; -$wb['do_dns_txt'] = 'Resynced DNS Zone'; +$wb['do_dns_txt'] = 'Resynced DNS-Zonen'; $wb['do_vserver_txt'] = 'Resynced vServer'; $wb['do_clients_txt'] = 'Resynced Kunden und Reseller'; $wb['no_results_txt'] = 'Keine Daten vorhanden'; $wb['btn_start_txt'] = 'Start'; -$wb['btn_cancel_txt'] = 'Cancel'; -$wb['do_mail_spamfilter_policy_txt'] = 'Resynced Spamfilter Policies'; +$wb['btn_cancel_txt'] = 'Abbrechen'; +$wb['do_mail_spamfilter_policy_txt'] = 'Resynced Spamfilter-Richtlinien'; $wb['do_mail_spamfilter_txt'] = 'Resynced Spamfilter'; $wb['do_mailget_txt'] = 'Resynced Fetchmail'; -$wb['resync_mailget_txt'] = 'E-Mail Sammeldienst'; -$wb['resync_mailtransport_txt'] = 'E-Mail Transport'; -$wb['resync_mailrelay_txt'] = 'E-Mail Relay'; +$wb['resync_mailget_txt'] = 'E-Mail-Sammeldienst'; +$wb['resync_mailtransport_txt'] = 'E-Mail-Transport'; +$wb['resync_mailrelay_txt'] = 'E-Mail-Relay'; $wb['do_mailtransport_txt'] = 'Resynced Mailtransport'; $wb['do_mailrelay_txt'] = 'Resynced Mailrelay'; ?> diff --git a/interface/web/tools/lib/lang/de_tpl_default.lng b/interface/web/tools/lib/lang/de_tpl_default.lng index 45de148b39..fa2985a2a7 100644 --- a/interface/web/tools/lib/lang/de_tpl_default.lng +++ b/interface/web/tools/lib/lang/de_tpl_default.lng @@ -1,7 +1,7 @@ diff --git a/interface/web/tools/lib/lang/de_usersettings.lng b/interface/web/tools/lib/lang/de_usersettings.lng index e66f2db650..a2de90f397 100644 --- a/interface/web/tools/lib/lang/de_usersettings.lng +++ b/interface/web/tools/lib/lang/de_usersettings.lng @@ -12,5 +12,5 @@ $wb['password_match_txt'] = 'Die Passwörter stimmen überein.'; $wb['language_txt'] = 'Sprache'; $wb['startmodule_txt'] = 'Startmodul'; $wb['app_theme_txt'] = 'Design'; -$wb['otp_auth_txt'] = 'Two Factor Authentication'; +$wb['otp_auth_txt'] = 'Zwei-Faktor-Authentifizierung'; ?> From 08a84f90f6b751f87c7681f8b8c06811727a6c1f Mon Sep 17 00:00:00 2001 From: Michael Seevogel Date: Tue, 5 Mar 2024 15:22:13 +0100 Subject: [PATCH 334/621] Fix syntax error in de_xmpp_user_list.lng --- interface/web/mail/lib/lang/de_xmpp_user_list.lng | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interface/web/mail/lib/lang/de_xmpp_user_list.lng b/interface/web/mail/lib/lang/de_xmpp_user_list.lng index 4acb7f0f14..4dda57417b 100644 --- a/interface/web/mail/lib/lang/de_xmpp_user_list.lng +++ b/interface/web/mail/lib/lang/de_xmpp_user_list.lng @@ -1,7 +1,7 @@ Date: Tue, 5 Mar 2024 16:50:38 +0100 Subject: [PATCH 335/621] Re-add patch excludes --- .gitignore | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.gitignore b/.gitignore index 2a7eb80d50..930bbe11be 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,11 @@ .idea /nbproject/private/ .phplint-cache + +# Vim and patch specific excludes *.swp +*.orig +*.rej # macOS-specific things to exclude From 4b2765625663645ae093a6457771095cf1be5f36 Mon Sep 17 00:00:00 2001 From: Michael Seevogel Date: Wed, 6 Mar 2024 12:39:04 +0100 Subject: [PATCH 336/621] Update colspan in mail_user_list.htm --- interface/web/mail/templates/mail_user_list.htm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/interface/web/mail/templates/mail_user_list.htm b/interface/web/mail/templates/mail_user_list.htm index ca14cf9fa3..f63f362d1b 100644 --- a/interface/web/mail/templates/mail_user_list.htm +++ b/interface/web/mail/templates/mail_user_list.htm @@ -80,13 +80,13 @@

- 98">{tmpl_var name='globalsearch_noresults_text_txt'} + 109">{tmpl_var name='globalsearch_noresults_text_txt'} - 98"> + 109"> From 32bbf9a3dba9a2ba1b353dc8112f7bcffe740764 Mon Sep 17 00:00:00 2001 From: Herman van Rink Date: Wed, 6 Mar 2024 15:52:57 +0100 Subject: [PATCH 337/621] Indents --- interface/web/sites/ajax_get_json.php | 6 +++--- interface/web/sites/cron_edit.php | 6 +++--- server/plugins-available/cron_plugin.inc.php | 10 ++++++++-- server/plugins-available/shelluser_base_plugin.inc.php | 8 ++++++-- 4 files changed, 20 insertions(+), 10 deletions(-) diff --git a/interface/web/sites/ajax_get_json.php b/interface/web/sites/ajax_get_json.php index 914371ab73..5cbf4729a3 100644 --- a/interface/web/sites/ajax_get_json.php +++ b/interface/web/sites/ajax_get_json.php @@ -255,9 +255,9 @@ if($web_id > 0) { $web = $app->db->queryOneRecord("SELECT wd.sys_groupid, wd.domain, wd.document_root, sp.php_cli_binary - FROM web_domain wd - LEFT JOIN server_php sp ON wd.server_php_id = sp.server_php_id - WHERE wd.domain_id = ?", $web_id); + FROM web_domain wd + LEFT JOIN server_php sp ON wd.server_php_id = sp.server_php_id + WHERE wd.domain_id = ?", $web_id); $php_cli_binary = $web['php_cli_binary']; $domain = $web['domain']; diff --git a/interface/web/sites/cron_edit.php b/interface/web/sites/cron_edit.php index ab3f34d7e0..34ed6eb32a 100644 --- a/interface/web/sites/cron_edit.php +++ b/interface/web/sites/cron_edit.php @@ -79,9 +79,9 @@ function onShowEnd() { } $parent_domain = $app->db->queryOneRecord("SELECT `domain_id`, `system_user`, `system_group`, `domain`, `document_root`, `hd_quota`, `php_cli_binary` - FROM `web_domain` - LEFT JOIN server_php ON web_domain.server_php_id = server_php.server_php_id - WHERE `domain_id` = ?", $this->dataRecord["parent_domain_id"]); + FROM `web_domain` + LEFT JOIN server_php ON web_domain.server_php_id = server_php.server_php_id + WHERE `domain_id` = ?", $this->dataRecord["parent_domain_id"]); $php_cli_binary = $parent_domain['php_cli_binary']; $domain = $parent_domain['domain']; diff --git a/server/plugins-available/cron_plugin.inc.php b/server/plugins-available/cron_plugin.inc.php index c11b4b06af..c4fb02d9e2 100644 --- a/server/plugins-available/cron_plugin.inc.php +++ b/server/plugins-available/cron_plugin.inc.php @@ -93,7 +93,10 @@ function update($event_name, $data) { } //* get data from web - $parent_domain = $app->db->queryOneRecord("SELECT `domain_id`, `system_user`, `system_group`, `domain`, `document_root`, `hd_quota`, `php_cli_binary` FROM `web_domain` LEFT JOIN server_php ON web_domain.server_php_id = server_php.server_php_id WHERE `domain_id` = ?", $data["new"]["parent_domain_id"]); + $parent_domain = $app->db->queryOneRecord("SELECT `domain_id`, `system_user`, `system_group`, `domain`, `document_root`, `hd_quota`, `php_cli_binary` + FROM `web_domain` + LEFT JOIN server_php ON web_domain.server_php_id = server_php.server_php_id + WHERE `domain_id` = ?", $data["new"]["parent_domain_id"]); if(!$parent_domain["domain_id"]) { $app->log("Parent domain not found", LOGLEVEL_WARN); return 0; @@ -222,7 +225,10 @@ function _write_crontab() { $chr_cmd_count = 0; //* read all active cron jobs from database and write them to file - $cron_jobs = $app->db->queryAllRecords("SELECT c.`id`, c.`run_min`, c.`run_hour`, c.`run_mday`, c.`run_month`, c.`run_wday`, c.`command`, c.`type`, c.`log`, `web_domain`.`domain` as `domain` FROM `cron` as c INNER JOIN `web_domain` ON `web_domain`.`domain_id` = c.`parent_domain_id` WHERE c.`parent_domain_id` = ? AND c.`active` = 'y'", $this->parent_domain["domain_id"]); + $cron_jobs = $app->db->queryAllRecords("SELECT c.`id`, c.`run_min`, c.`run_hour`, c.`run_mday`, c.`run_month`, c.`run_wday`, c.`command`, c.`type`, c.`log`, `web_domain`.`domain` as `domain` + FROM `cron` as c + INNER JOIN `web_domain` ON `web_domain`.`domain_id` = c.`parent_domain_id` + WHERE c.`parent_domain_id` = ? AND c.`active` = 'y'", $this->parent_domain["domain_id"]); if($cron_jobs && count($cron_jobs) > 0) { foreach($cron_jobs as $job) { if($job['run_month'] == '@reboot') { diff --git a/server/plugins-available/shelluser_base_plugin.inc.php b/server/plugins-available/shelluser_base_plugin.inc.php index 5a911d0659..c9d0b8b4fd 100755 --- a/server/plugins-available/shelluser_base_plugin.inc.php +++ b/server/plugins-available/shelluser_base_plugin.inc.php @@ -80,7 +80,9 @@ function insert($event_name, $data) { } //* Check if the resulting path is inside the docroot - $web = $app->db->queryOneRecord("SELECT * FROM web_domain LEFT JOIN server_php ON web_domain.server_php_id = server_php.server_php_id WHERE `domain_id` = ?", $data["new"]["parent_domain_id"]); + $web = $app->db->queryOneRecord("SELECT * FROM web_domain + LEFT JOIN server_php ON web_domain.server_php_id = server_php.server_php_id + WHERE `domain_id` = ?", $data["new"]["parent_domain_id"]); $this->web = $web; @@ -223,7 +225,9 @@ function update($event_name, $data) { } //* Check if the resulting path is inside the docroot - $web = $app->db->queryOneRecord("SELECT * FROM web_domain LEFT JOIN server_php ON web_domain.server_php_id = server_php.server_php_id WHERE `domain_id` = ?", $data["new"]["parent_domain_id"]); + $web = $app->db->queryOneRecord("SELECT * FROM web_domain + LEFT JOIN server_php ON web_domain.server_php_id = server_php.server_php_id + WHERE `domain_id` = ?", $data["new"]["parent_domain_id"]); $this->web = $web; From 1ac5be950d0d923adefb1247981a700b8d06bb16 Mon Sep 17 00:00:00 2001 From: Michael Seevogel Date: Sun, 10 Mar 2024 15:06:35 +0100 Subject: [PATCH 338/621] Source .bashrc from the ~/.profile file --- .../shelluser_base_plugin.inc.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/server/plugins-available/shelluser_base_plugin.inc.php b/server/plugins-available/shelluser_base_plugin.inc.php index c9d0b8b4fd..7e3d3aa9fb 100755 --- a/server/plugins-available/shelluser_base_plugin.inc.php +++ b/server/plugins-available/shelluser_base_plugin.inc.php @@ -181,6 +181,13 @@ function insert($event_name, $data) { $app->system->chmod($homedir.'/.profile', 0644); $app->system->chown($homedir.'/.profile', $data['new']['username']); $app->system->chgrp($homedir.'/.profile', $data['new']['pgroup']); + $profile_content = " +if [ -d ~/.bashrc ] +then + . ~/.bashrc +fi +"; + $app->system->file_put_contents($homedir.'/.profile', $profile_content); //* Create .bashrc.d directory if(!is_dir($homedir.'/.bashrc.d')){ @@ -326,6 +333,13 @@ function update($event_name, $data) { $app->system->chmod($homedir.'/.profile', 0644); $app->system->chown($homedir.'/.profile', $data['new']['puser']); $app->system->chgrp($homedir.'/.profile', $data['new']['pgroup']); + $profile_content = " +if [ -d ~/.bashrc ] + then + . ~/.bashrc + fi +"; + $app->system->file_put_contents(($data['new']['dir']).'/.profile', $profile_content); } //* Create .bashrc.d directory From c476308e6df2de18d624e8d78b3867ad7217affb Mon Sep 17 00:00:00 2001 From: Michael Seevogel Date: Sun, 10 Mar 2024 16:43:32 +0100 Subject: [PATCH 339/621] Use instead of --- .../shelluser_base_plugin.inc.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/server/plugins-available/shelluser_base_plugin.inc.php b/server/plugins-available/shelluser_base_plugin.inc.php index 7e3d3aa9fb..c23245d1d4 100755 --- a/server/plugins-available/shelluser_base_plugin.inc.php +++ b/server/plugins-available/shelluser_base_plugin.inc.php @@ -181,11 +181,11 @@ function insert($event_name, $data) { $app->system->chmod($homedir.'/.profile', 0644); $app->system->chown($homedir.'/.profile', $data['new']['username']); $app->system->chgrp($homedir.'/.profile', $data['new']['pgroup']); - $profile_content = " -if [ -d ~/.bashrc ] + $profile_content = "if [ -d ~/.bashrc ] then . ~/.bashrc fi + "; $app->system->file_put_contents($homedir.'/.profile', $profile_content); @@ -333,13 +333,13 @@ function update($event_name, $data) { $app->system->chmod($homedir.'/.profile', 0644); $app->system->chown($homedir.'/.profile', $data['new']['puser']); $app->system->chgrp($homedir.'/.profile', $data['new']['pgroup']); - $profile_content = " -if [ -d ~/.bashrc ] - then - . ~/.bashrc - fi + $profile_content = "if [ -d ~/.bashrc ] +then + . ~/.bashrc +fi + "; - $app->system->file_put_contents(($data['new']['dir']).'/.profile', $profile_content); + $app->system->file_put_contents($homedir.'/.profile', $profile_content); } //* Create .bashrc.d directory From 73257aa1fe1840c83416d135bbdd466c243f1770 Mon Sep 17 00:00:00 2001 From: luttje <2738114+luttje@users.noreply.github.com> Date: Mon, 11 Mar 2024 21:44:26 +0100 Subject: [PATCH 340/621] Closes #6664 --- interface/lib/classes/tpl.inc.php | 36 +++++++++++++++++++------------ 1 file changed, 22 insertions(+), 14 deletions(-) diff --git a/interface/lib/classes/tpl.inc.php b/interface/lib/classes/tpl.inc.php index e999ba5bfe..e6a2cfdfb2 100644 --- a/interface/lib/classes/tpl.inc.php +++ b/interface/lib/classes/tpl.inc.php @@ -233,7 +233,7 @@ public function newTemplate($tmplfile) public function setVar($k, $v = null, $encode = false) { global $app; - + if (is_array($k)) { foreach($k as $key => $value){ $key = ($this->OPTIONS['CASELESS']) ? strtolower(trim($key)) : trim($key); @@ -917,9 +917,17 @@ private function _fileSearch($file) $filename = basename($file); $filepath = dirname($file); - if(isset($_SESSION['s']['module']['name']) && isset($_SESSION['s']['theme'])) { - if(is_file(ISPC_THEMES_PATH.'/'.$_SESSION['s']['theme'].'/templates/'.$_SESSION['s']['module']['name'].'/'.$filename)) { - return ISPC_THEMES_PATH.'/'.$_SESSION['s']['theme'].'/templates/'.$_SESSION['s']['module']['name'].'/'.$filename; + $modulename = false; + + if(isset($_SESSION['s']['module']['name'])) { + $modulename = $_SESSION['s']['module']['name']; + } elseif(strpos($_SERVER['PHP_SELF'], '/login/') === 0) { + $modulename = 'login'; + } + + if($modulename && isset($_SESSION['s']['theme'])) { + if(is_file(ISPC_THEMES_PATH.'/'.$_SESSION['s']['theme'].'/templates/'.$modulename.'/'.$filename)) { + return ISPC_THEMES_PATH.'/'.$_SESSION['s']['theme'].'/templates/'.$modulename.'/'.$filename; } } @@ -1079,12 +1087,12 @@ private function _parseIf($varname, $value = null, $op = null, $namespace = null private function _parseHook ($name) { global $app; - + if(!$name) return false; - + $module = isset($_SESSION['s']['module']['name']) ? $_SESSION['s']['module']['name'] : ''; $form = isset($app->tform->formDef['name']) ? $app->tform->formDef['name'] : ''; - + $events = array(); if($module) { $events[] = $module . ':' . ($form ? $form : '') . ':' . $name; @@ -1093,9 +1101,9 @@ private function _parseHook ($name) $events[] = $name; $events[] = 'on_template_content'; } - + $events = array_unique($events); - + for($e = 0; $e < count($events); $e++) { $tmpresult = $app->plugin->raiseEvent($events[$e], array( 'name' => $name, @@ -1104,10 +1112,10 @@ private function _parseHook ($name) ), true); if(!$tmpresult) $tmpresult = ''; else $tmpresult = $this->_getData($tmpresult, false, true); - + $result .= $tmpresult; } - + return $result; } @@ -1225,7 +1233,7 @@ private function _parseTag ($args) $wholetag = $args[0]; $openclose = $args[1]; $tag = strtolower($args[2]); - + if ($tag == 'else') return ''; if ($tag == 'tmpl_include') return $wholetag; // ignore tmpl_include tags @@ -1303,10 +1311,10 @@ private function _parseTag ($args) if ($this->OPTIONS['ENABLE_PHPINCLUDE']) { return ''; } - + case 'hook': return $this->_parseHook(@$var); - + case 'include': return '_getData($this->_fileSearch(\''.$file.'\'), 1); ?>'; From 2370828b89186f38f776b5c63f9223801f31c190 Mon Sep 17 00:00:00 2001 From: Herman van Rink Date: Wed, 13 Mar 2024 13:54:27 +0100 Subject: [PATCH 341/621] Parse the dovecot/postfix logs to update the last login time for mail_user's. #5374 --- .../cron.d/100-mailbox_stats_hourly.inc.php | 117 ++++++++++++++++++ 1 file changed, 117 insertions(+) create mode 100644 server/lib/classes/cron.d/100-mailbox_stats_hourly.inc.php diff --git a/server/lib/classes/cron.d/100-mailbox_stats_hourly.inc.php b/server/lib/classes/cron.d/100-mailbox_stats_hourly.inc.php new file mode 100644 index 0000000000..954de202da --- /dev/null +++ b/server/lib/classes/cron.d/100-mailbox_stats_hourly.inc.php @@ -0,0 +1,117 @@ +db->queryAllRecords($sql, $conf['server_id']); + if(count($records) > 0) { + $this->update_last_mail_login(); + } + + parent::onRunJob(); + } + + /* this function is optional if it contains no custom code */ + public function onAfterRun() { + global $app; + + parent::onAfterRun(); + } + + // Parse the dovecot/postfix logs to update the last login time for mail_user's. + private function update_last_mail_login() { + global $app; + + // Command to get all successful dovecot and postfix logins from the last hour. + $journalCmd = "journalctl -u dovecot.service -u postfix@-.service --since='60 minutes ago' --grep '((imap|pop3)-login: Login|sasl_method=PLAIN)'"; + + $process = popen($journalCmd, 'r'); + if ($process === false) { + die("Failed to execute the command"); + } + + $updatedUsers = []; + + // Loop over all lines. + while (!feof($process)) { + $line = fgets($process); + if ($line === false) { + break; + } + + $matches = []; + // Match pop3/imap logings, or alternately smtp logins. + if (preg_match('/(.*) dovecot\[.*\]: (imap|pop3)-login: Login: user=\<([\w\.@-]+)\>/', $line, $matches) || preg_match('/(.*) sasl_method=PLAIN, sasl_username=([\w\.@-]+)/', $line, $matches)) { + $user = $matches[3] ?? $matches[2]; + $updatedUsers[] = $user; + } + } + + pclose($process); + + $uniqueUsers = array_unique($updatedUsers); + + $app->log('Updating last_access stats for ' . count($uniqueUsers) . ' mail users', LOGLEVEL_DEBUG); + + // Date/time rounded to hours. + $now = time() - (time() % (60 * 60)); + $nowFormatted = date('Y-m-d H:i:s', $now); + $sqlStatement = "UPDATE mail_user SET last_access=? WHERE email=?"; + + // Save to master db. + foreach ($uniqueUsers as $user) { + $ret = $app->dbmaster->query($sql, $now, $user); + } + } +} From 21ac12b085fdac9ba6a49b9bc5aba8fc27cc02a3 Mon Sep 17 00:00:00 2001 From: Herman van Rink Date: Wed, 13 Mar 2024 15:38:21 +0100 Subject: [PATCH 342/621] Add missing translation strings --- interface/lib/lang/ar.lng | 2 ++ interface/lib/lang/bg.lng | 2 ++ interface/lib/lang/br.lng | 2 ++ interface/lib/lang/ca.lng | 2 ++ interface/lib/lang/cn.lng | 2 ++ interface/lib/lang/cz.lng | 2 ++ interface/lib/lang/de.lng | 2 ++ interface/lib/lang/dk.lng | 2 ++ interface/lib/lang/el.lng | 2 ++ interface/lib/lang/en.lng | 2 ++ interface/lib/lang/es.lng | 2 ++ interface/lib/lang/fi.lng | 2 ++ interface/lib/lang/fr.lng | 2 ++ interface/lib/lang/hr.lng | 2 ++ interface/lib/lang/hu.lng | 2 ++ interface/lib/lang/id.lng | 2 ++ interface/lib/lang/it.lng | 2 ++ interface/lib/lang/ja.lng | 2 ++ interface/lib/lang/pl.lng | 2 ++ interface/lib/lang/pt.lng | 2 ++ interface/lib/lang/ro.lng | 2 ++ interface/lib/lang/ru.lng | 2 ++ interface/lib/lang/se.lng | 2 ++ interface/lib/lang/sk.lng | 2 ++ interface/lib/lang/tr.lng | 2 ++ 25 files changed, 50 insertions(+) diff --git a/interface/lib/lang/ar.lng b/interface/lib/lang/ar.lng index d00c7dc1b3..0b3aec6c3d 100644 --- a/interface/lib/lang/ar.lng +++ b/interface/lib/lang/ar.lng @@ -184,4 +184,6 @@ $wb['datalog_status_d_web_backup'] = 'Delete website backup'; $wb['datalog_status_i_dns_template'] = 'Create DNS template'; $wb['datalog_status_u_dns_template'] = 'Update DNS template'; $wb['datalog_status_d_dns_template'] = 'Delete DNS template'; +$wb['last_accessed_txt'] = 'Last accessed'; +$wb['never_accessed_txt'] = 'Never or unknown'; ?> diff --git a/interface/lib/lang/bg.lng b/interface/lib/lang/bg.lng index 35bec0ab45..634e73be14 100644 --- a/interface/lib/lang/bg.lng +++ b/interface/lib/lang/bg.lng @@ -184,4 +184,6 @@ $wb['datalog_status_d_web_backup'] = 'Delete website backup'; $wb['datalog_status_i_dns_template'] = 'Create DNS template'; $wb['datalog_status_u_dns_template'] = 'Update DNS template'; $wb['datalog_status_d_dns_template'] = 'Delete DNS template'; +$wb['last_accessed_txt'] = 'Last accessed'; +$wb['never_accessed_txt'] = 'Never or unknown'; ?> diff --git a/interface/lib/lang/br.lng b/interface/lib/lang/br.lng index 4195702e25..bb7a061b16 100644 --- a/interface/lib/lang/br.lng +++ b/interface/lib/lang/br.lng @@ -184,4 +184,6 @@ $wb['datalog_status_d_web_backup'] = 'Delete website backup'; $wb['datalog_status_i_dns_template'] = 'Create DNS template'; $wb['datalog_status_u_dns_template'] = 'Update DNS template'; $wb['datalog_status_d_dns_template'] = 'Delete DNS template'; +$wb['last_accessed_txt'] = 'Last accessed'; +$wb['never_accessed_txt'] = 'Never or unknown'; ?> diff --git a/interface/lib/lang/ca.lng b/interface/lib/lang/ca.lng index 2d61af651a..ac29f1a251 100644 --- a/interface/lib/lang/ca.lng +++ b/interface/lib/lang/ca.lng @@ -184,4 +184,6 @@ $wb['datalog_status_d_web_backup'] = 'Delete website backup'; $wb['datalog_status_i_dns_template'] = 'Create DNS template'; $wb['datalog_status_u_dns_template'] = 'Update DNS template'; $wb['datalog_status_d_dns_template'] = 'Delete DNS template'; +$wb['last_accessed_txt'] = 'Last accessed'; +$wb['never_accessed_txt'] = 'Never or unknown'; ?> diff --git a/interface/lib/lang/cn.lng b/interface/lib/lang/cn.lng index cbb6ace68a..36276d562c 100644 --- a/interface/lib/lang/cn.lng +++ b/interface/lib/lang/cn.lng @@ -185,4 +185,6 @@ $wb['datalog_status_d_web_backup'] = 'Delete website backup'; $wb['datalog_status_i_dns_template'] = 'Create DNS template'; $wb['datalog_status_u_dns_template'] = 'Update DNS template'; $wb['datalog_status_d_dns_template'] = 'Delete DNS template'; +$wb['last_accessed_txt'] = 'Last accessed'; +$wb['never_accessed_txt'] = 'Never or unknown'; ?> diff --git a/interface/lib/lang/cz.lng b/interface/lib/lang/cz.lng index 880f4fea11..c8c341077a 100644 --- a/interface/lib/lang/cz.lng +++ b/interface/lib/lang/cz.lng @@ -184,4 +184,6 @@ $wb['datalog_status_d_web_backup'] = 'Delete website backup'; $wb['datalog_status_i_dns_template'] = 'Create DNS template'; $wb['datalog_status_u_dns_template'] = 'Update DNS template'; $wb['datalog_status_d_dns_template'] = 'Delete DNS template'; +$wb['last_accessed_txt'] = 'Last accessed'; +$wb['never_accessed_txt'] = 'Never or unknown'; ?> diff --git a/interface/lib/lang/de.lng b/interface/lib/lang/de.lng index 885feb171b..f8e94909c1 100644 --- a/interface/lib/lang/de.lng +++ b/interface/lib/lang/de.lng @@ -184,4 +184,6 @@ $wb['datalog_status_d_web_backup'] = 'Delete website backup'; $wb['datalog_status_i_dns_template'] = 'Create DNS template'; $wb['datalog_status_u_dns_template'] = 'Update DNS template'; $wb['datalog_status_d_dns_template'] = 'Delete DNS template'; +$wb['last_accessed_txt'] = 'Last accessed'; +$wb['never_accessed_txt'] = 'Never or unknown'; ?> diff --git a/interface/lib/lang/dk.lng b/interface/lib/lang/dk.lng index 6082b1a391..9a12db7751 100644 --- a/interface/lib/lang/dk.lng +++ b/interface/lib/lang/dk.lng @@ -184,4 +184,6 @@ $wb['datalog_status_d_web_backup'] = 'Delete website backup'; $wb['datalog_status_i_dns_template'] = 'Create DNS template'; $wb['datalog_status_u_dns_template'] = 'Update DNS template'; $wb['datalog_status_d_dns_template'] = 'Delete DNS template'; +$wb['last_accessed_txt'] = 'Last accessed'; +$wb['never_accessed_txt'] = 'Never or unknown'; ?> diff --git a/interface/lib/lang/el.lng b/interface/lib/lang/el.lng index fb45cd8b68..5e8b8068ca 100644 --- a/interface/lib/lang/el.lng +++ b/interface/lib/lang/el.lng @@ -184,4 +184,6 @@ $wb['datalog_status_d_web_backup'] = 'Delete website backup'; $wb['datalog_status_i_dns_template'] = 'Create DNS template'; $wb['datalog_status_u_dns_template'] = 'Update DNS template'; $wb['datalog_status_d_dns_template'] = 'Delete DNS template'; +$wb['last_accessed_txt'] = 'Last accessed'; +$wb['never_accessed_txt'] = 'Never or unknown'; ?> diff --git a/interface/lib/lang/en.lng b/interface/lib/lang/en.lng index c9b7ccf319..e47f48575a 100644 --- a/interface/lib/lang/en.lng +++ b/interface/lib/lang/en.lng @@ -187,4 +187,6 @@ $wb['datalog_status_u_dns_template'] = 'Update DNS template'; $wb['datalog_status_d_dns_template'] = 'Delete DNS template'; $wb['last_accessed_txt'] = 'Last accessed'; $wb['never_accessed_txt'] = 'Never or unknown'; +$wb['last_accessed_txt'] = 'Last accessed'; +$wb['never_accessed_txt'] = 'Never or unknown'; ?> diff --git a/interface/lib/lang/es.lng b/interface/lib/lang/es.lng index bc2ead77a8..9e138ab574 100644 --- a/interface/lib/lang/es.lng +++ b/interface/lib/lang/es.lng @@ -184,4 +184,6 @@ $wb['datalog_status_d_web_backup'] = 'Delete website backup'; $wb['datalog_status_i_dns_template'] = 'Create DNS template'; $wb['datalog_status_u_dns_template'] = 'Update DNS template'; $wb['datalog_status_d_dns_template'] = 'Delete DNS template'; +$wb['last_accessed_txt'] = 'Last accessed'; +$wb['never_accessed_txt'] = 'Never or unknown'; ?> diff --git a/interface/lib/lang/fi.lng b/interface/lib/lang/fi.lng index b8f1c502fc..1b4f807961 100644 --- a/interface/lib/lang/fi.lng +++ b/interface/lib/lang/fi.lng @@ -184,4 +184,6 @@ $wb['datalog_status_d_web_backup'] = 'Delete website backup'; $wb['datalog_status_i_dns_template'] = 'Create DNS template'; $wb['datalog_status_u_dns_template'] = 'Update DNS template'; $wb['datalog_status_d_dns_template'] = 'Delete DNS template'; +$wb['last_accessed_txt'] = 'Last accessed'; +$wb['never_accessed_txt'] = 'Never or unknown'; ?> diff --git a/interface/lib/lang/fr.lng b/interface/lib/lang/fr.lng index 273cc125dc..4e673d65be 100644 --- a/interface/lib/lang/fr.lng +++ b/interface/lib/lang/fr.lng @@ -184,4 +184,6 @@ $wb['datalog_status_d_web_backup'] = 'Delete website backup'; $wb['datalog_status_i_dns_template'] = 'Create DNS template'; $wb['datalog_status_u_dns_template'] = 'Update DNS template'; $wb['datalog_status_d_dns_template'] = 'Delete DNS template'; +$wb['last_accessed_txt'] = 'Last accessed'; +$wb['never_accessed_txt'] = 'Never or unknown'; ?> diff --git a/interface/lib/lang/hr.lng b/interface/lib/lang/hr.lng index bf52fe0be5..3ea5a76d90 100644 --- a/interface/lib/lang/hr.lng +++ b/interface/lib/lang/hr.lng @@ -184,4 +184,6 @@ $wb['datalog_status_d_web_backup'] = 'Delete website backup'; $wb['datalog_status_i_dns_template'] = 'Create DNS template'; $wb['datalog_status_u_dns_template'] = 'Update DNS template'; $wb['datalog_status_d_dns_template'] = 'Delete DNS template'; +$wb['last_accessed_txt'] = 'Last accessed'; +$wb['never_accessed_txt'] = 'Never or unknown'; ?> diff --git a/interface/lib/lang/hu.lng b/interface/lib/lang/hu.lng index 732e078f8a..1341a53287 100644 --- a/interface/lib/lang/hu.lng +++ b/interface/lib/lang/hu.lng @@ -184,4 +184,6 @@ $wb['datalog_status_d_web_backup'] = 'Delete website backup'; $wb['datalog_status_i_dns_template'] = 'Create DNS template'; $wb['datalog_status_u_dns_template'] = 'Update DNS template'; $wb['datalog_status_d_dns_template'] = 'Delete DNS template'; +$wb['last_accessed_txt'] = 'Last accessed'; +$wb['never_accessed_txt'] = 'Never or unknown'; ?> diff --git a/interface/lib/lang/id.lng b/interface/lib/lang/id.lng index 970f7d8396..fb9307e897 100644 --- a/interface/lib/lang/id.lng +++ b/interface/lib/lang/id.lng @@ -184,4 +184,6 @@ $wb['datalog_status_d_web_backup'] = 'Delete website backup'; $wb['datalog_status_i_dns_template'] = 'Create DNS template'; $wb['datalog_status_u_dns_template'] = 'Update DNS template'; $wb['datalog_status_d_dns_template'] = 'Delete DNS template'; +$wb['last_accessed_txt'] = 'Last accessed'; +$wb['never_accessed_txt'] = 'Never or unknown'; ?> diff --git a/interface/lib/lang/it.lng b/interface/lib/lang/it.lng index 235c86e836..403d2499be 100644 --- a/interface/lib/lang/it.lng +++ b/interface/lib/lang/it.lng @@ -184,4 +184,6 @@ $wb['datalog_status_d_web_backup'] = 'Delete website backup'; $wb['datalog_status_i_dns_template'] = 'Create DNS template'; $wb['datalog_status_u_dns_template'] = 'Update DNS template'; $wb['datalog_status_d_dns_template'] = 'Delete DNS template'; +$wb['last_accessed_txt'] = 'Last accessed'; +$wb['never_accessed_txt'] = 'Never or unknown'; ?> diff --git a/interface/lib/lang/ja.lng b/interface/lib/lang/ja.lng index 657b6128b1..77c5cc4fba 100644 --- a/interface/lib/lang/ja.lng +++ b/interface/lib/lang/ja.lng @@ -184,4 +184,6 @@ $wb['datalog_status_d_web_backup'] = 'Delete website backup'; $wb['datalog_status_i_dns_template'] = 'Create DNS template'; $wb['datalog_status_u_dns_template'] = 'Update DNS template'; $wb['datalog_status_d_dns_template'] = 'Delete DNS template'; +$wb['last_accessed_txt'] = 'Last accessed'; +$wb['never_accessed_txt'] = 'Never or unknown'; ?> diff --git a/interface/lib/lang/pl.lng b/interface/lib/lang/pl.lng index e33f45575e..ff207c6dc3 100644 --- a/interface/lib/lang/pl.lng +++ b/interface/lib/lang/pl.lng @@ -184,4 +184,6 @@ $wb['datalog_status_d_web_backup'] = 'Delete website backup'; $wb['datalog_status_i_dns_template'] = 'Create DNS template'; $wb['datalog_status_u_dns_template'] = 'Update DNS template'; $wb['datalog_status_d_dns_template'] = 'Delete DNS template'; +$wb['last_accessed_txt'] = 'Last accessed'; +$wb['never_accessed_txt'] = 'Never or unknown'; ?> diff --git a/interface/lib/lang/pt.lng b/interface/lib/lang/pt.lng index 95fb1f2ddb..ac74eb193d 100644 --- a/interface/lib/lang/pt.lng +++ b/interface/lib/lang/pt.lng @@ -184,4 +184,6 @@ $wb['datalog_status_d_web_backup'] = 'Delete website backup'; $wb['datalog_status_i_dns_template'] = 'Create DNS template'; $wb['datalog_status_u_dns_template'] = 'Update DNS template'; $wb['datalog_status_d_dns_template'] = 'Delete DNS template'; +$wb['last_accessed_txt'] = 'Last accessed'; +$wb['never_accessed_txt'] = 'Never or unknown'; ?> diff --git a/interface/lib/lang/ro.lng b/interface/lib/lang/ro.lng index 6ec3d59702..0e816ac153 100644 --- a/interface/lib/lang/ro.lng +++ b/interface/lib/lang/ro.lng @@ -184,4 +184,6 @@ $wb['datalog_status_d_web_backup'] = 'Delete website backup'; $wb['datalog_status_i_dns_template'] = 'Create DNS template'; $wb['datalog_status_u_dns_template'] = 'Update DNS template'; $wb['datalog_status_d_dns_template'] = 'Delete DNS template'; +$wb['last_accessed_txt'] = 'Last accessed'; +$wb['never_accessed_txt'] = 'Never or unknown'; ?> diff --git a/interface/lib/lang/ru.lng b/interface/lib/lang/ru.lng index 0bf578468e..46c85fe4da 100644 --- a/interface/lib/lang/ru.lng +++ b/interface/lib/lang/ru.lng @@ -184,4 +184,6 @@ $wb['datalog_status_d_web_backup'] = 'Delete website backup'; $wb['datalog_status_i_dns_template'] = 'Create DNS template'; $wb['datalog_status_u_dns_template'] = 'Update DNS template'; $wb['datalog_status_d_dns_template'] = 'Delete DNS template'; +$wb['last_accessed_txt'] = 'Last accessed'; +$wb['never_accessed_txt'] = 'Never or unknown'; ?> diff --git a/interface/lib/lang/se.lng b/interface/lib/lang/se.lng index c175f9e54c..af5e5b4e66 100644 --- a/interface/lib/lang/se.lng +++ b/interface/lib/lang/se.lng @@ -184,4 +184,6 @@ $wb['datalog_status_d_web_backup'] = 'Delete website backup'; $wb['datalog_status_i_dns_template'] = 'Create DNS template'; $wb['datalog_status_u_dns_template'] = 'Update DNS template'; $wb['datalog_status_d_dns_template'] = 'Delete DNS template'; +$wb['last_accessed_txt'] = 'Last accessed'; +$wb['never_accessed_txt'] = 'Never or unknown'; ?> diff --git a/interface/lib/lang/sk.lng b/interface/lib/lang/sk.lng index e39f39a92f..8e554ed467 100644 --- a/interface/lib/lang/sk.lng +++ b/interface/lib/lang/sk.lng @@ -184,4 +184,6 @@ $wb['datalog_status_d_web_backup'] = 'Delete website backup'; $wb['datalog_status_i_dns_template'] = 'Create DNS template'; $wb['datalog_status_u_dns_template'] = 'Update DNS template'; $wb['datalog_status_d_dns_template'] = 'Delete DNS template'; +$wb['last_accessed_txt'] = 'Last accessed'; +$wb['never_accessed_txt'] = 'Never or unknown'; ?> diff --git a/interface/lib/lang/tr.lng b/interface/lib/lang/tr.lng index 8a0661a6af..9a8f3b478c 100644 --- a/interface/lib/lang/tr.lng +++ b/interface/lib/lang/tr.lng @@ -185,4 +185,6 @@ $wb['datalog_status_d_web_backup'] = 'Delete website backup'; $wb['datalog_status_i_dns_template'] = 'Create DNS template'; $wb['datalog_status_u_dns_template'] = 'Update DNS template'; $wb['datalog_status_d_dns_template'] = 'Delete DNS template'; +$wb['last_accessed_txt'] = 'Last accessed'; +$wb['never_accessed_txt'] = 'Never or unknown'; ?> From 62afa4f34e711562b9ff78aacc939a2811e329da Mon Sep 17 00:00:00 2001 From: Herman van Rink Date: Wed, 13 Mar 2024 16:25:11 +0100 Subject: [PATCH 343/621] Match on files, not dirs --- server/plugins-available/shelluser_base_plugin.inc.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/plugins-available/shelluser_base_plugin.inc.php b/server/plugins-available/shelluser_base_plugin.inc.php index c23245d1d4..953f6aa52d 100755 --- a/server/plugins-available/shelluser_base_plugin.inc.php +++ b/server/plugins-available/shelluser_base_plugin.inc.php @@ -181,7 +181,7 @@ function insert($event_name, $data) { $app->system->chmod($homedir.'/.profile', 0644); $app->system->chown($homedir.'/.profile', $data['new']['username']); $app->system->chgrp($homedir.'/.profile', $data['new']['pgroup']); - $profile_content = "if [ -d ~/.bashrc ] + $profile_content = "if [ -f ~/.bashrc ] then . ~/.bashrc fi @@ -333,7 +333,7 @@ function update($event_name, $data) { $app->system->chmod($homedir.'/.profile', 0644); $app->system->chown($homedir.'/.profile', $data['new']['puser']); $app->system->chgrp($homedir.'/.profile', $data['new']['pgroup']); - $profile_content = "if [ -d ~/.bashrc ] + $profile_content = "if [ -f ~/.bashrc ] then . ~/.bashrc fi From 555031d256437e14be6d22284b6b79459ed1d4cd Mon Sep 17 00:00:00 2001 From: Herman van Rink Date: Thu, 14 Mar 2024 08:05:27 +0100 Subject: [PATCH 344/621] Fix merge conflict mess --- interface/web/admin/lib/lang/el_system_config.lng | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/interface/web/admin/lib/lang/el_system_config.lng b/interface/web/admin/lib/lang/el_system_config.lng index 5b93637c19..28d5968c8b 100644 --- a/interface/web/admin/lib/lang/el_system_config.lng +++ b/interface/web/admin/lib/lang/el_system_config.lng @@ -108,9 +108,6 @@ $wb['show_aps_menu_note_url_txt'] = 'Click here for more information.'; $wb['dns_show_zoneexport_txt'] = 'Show zone export.'; $wb['le_caa_autocreate_options_txt'] = 'Enable automatic creation of CAA record on issuing LE'; $wb['show_delete_on_forms_txt'] = 'Show delete button on edit forms'; -<<<<<<< HEAD -$wb['mailbox_show_last_access_txt'] = 'Show last access time for mail accounts'; -======= $wb['dns_external_slave_server_txt'] = 'External DNS servers (comma separated)'; ->>>>>>> origin/develop +$wb['mailbox_show_last_access_txt'] = 'Show last access time for mail accounts'; ?> From 50de911df31fdb3da189fcf0f418f5116fd3918a Mon Sep 17 00:00:00 2001 From: Herman van Rink Date: Mon, 18 Mar 2024 23:09:43 +0100 Subject: [PATCH 345/621] var typo --- server/lib/classes/cron.d/100-mailbox_stats_hourly.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/lib/classes/cron.d/100-mailbox_stats_hourly.inc.php b/server/lib/classes/cron.d/100-mailbox_stats_hourly.inc.php index 954de202da..e0a41a4a59 100644 --- a/server/lib/classes/cron.d/100-mailbox_stats_hourly.inc.php +++ b/server/lib/classes/cron.d/100-mailbox_stats_hourly.inc.php @@ -111,7 +111,7 @@ private function update_last_mail_login() { // Save to master db. foreach ($uniqueUsers as $user) { - $ret = $app->dbmaster->query($sql, $now, $user); + $ret = $app->dbmaster->query($sqlStatement, $now, $user); } } } From 0db552e5ec43567e042742a1783a785c41e8bc65 Mon Sep 17 00:00:00 2001 From: Herman van Rink Date: Mon, 18 Mar 2024 23:29:55 +0100 Subject: [PATCH 346/621] Reduce to 24hour precision, more would require more filtering work --- .../cron.d/100-mailbox_stats_hourly.inc.php | 28 ++++++++----------- 1 file changed, 12 insertions(+), 16 deletions(-) diff --git a/server/lib/classes/cron.d/100-mailbox_stats_hourly.inc.php b/server/lib/classes/cron.d/100-mailbox_stats_hourly.inc.php index e0a41a4a59..8a8d9a6e5d 100644 --- a/server/lib/classes/cron.d/100-mailbox_stats_hourly.inc.php +++ b/server/lib/classes/cron.d/100-mailbox_stats_hourly.inc.php @@ -73,39 +73,35 @@ public function onAfterRun() { private function update_last_mail_login() { global $app; - // Command to get all successful dovecot and postfix logins from the last hour. - $journalCmd = "journalctl -u dovecot.service -u postfix@-.service --since='60 minutes ago' --grep '((imap|pop3)-login: Login|sasl_method=PLAIN)'"; + // used for all monitor cronjobs + $app->load('monitor_tools'); + $this->_tools = new monitor_tools(); - $process = popen($journalCmd, 'r'); - if ($process === false) { - die("Failed to execute the command"); - } + // Get the data of the log + $log_lines = $this->_tools->_getLogData('log_mail', 1000000); $updatedUsers = []; // Loop over all lines. - while (!feof($process)) { - $line = fgets($process); - if ($line === false) { - break; - } - + $line = strtok($log_lines, PHP_EOL); + while ($line !== FALSE) { $matches = []; // Match pop3/imap logings, or alternately smtp logins. - if (preg_match('/(.*) dovecot\[.*\]: (imap|pop3)-login: Login: user=\<([\w\.@-]+)\>/', $line, $matches) || preg_match('/(.*) sasl_method=PLAIN, sasl_username=([\w\.@-]+)/', $line, $matches)) { + if (preg_match('/(.*) (imap|pop3)-login: Login: user=\<([\w\.@-]+)\>/', $line, $matches) || preg_match('/(.*) sasl_method=PLAIN, sasl_username=([\w\.@-]+)/', $line, $matches)) { $user = $matches[3] ?? $matches[2]; $updatedUsers[] = $user; } - } - pclose($process); + // get the next line + $line = strtok(PHP_EOL); + } $uniqueUsers = array_unique($updatedUsers); $app->log('Updating last_access stats for ' . count($uniqueUsers) . ' mail users', LOGLEVEL_DEBUG); // Date/time rounded to hours. - $now = time() - (time() % (60 * 60)); + $now = time() - (time() % (60 * 60 * 24)); $nowFormatted = date('Y-m-d H:i:s', $now); $sqlStatement = "UPDATE mail_user SET last_access=? WHERE email=?"; From 1c74d2490ed30d920195f5eda284f8862b604863 Mon Sep 17 00:00:00 2001 From: Herman van Rink Date: Mon, 18 Mar 2024 23:30:25 +0100 Subject: [PATCH 347/621] Allow reading more then 4MB of data --- server/lib/classes/monitor_tools.inc.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/server/lib/classes/monitor_tools.inc.php b/server/lib/classes/monitor_tools.inc.php index 86fe3e672d..c6128fc7b5 100644 --- a/server/lib/classes/monitor_tools.inc.php +++ b/server/lib/classes/monitor_tools.inc.php @@ -677,14 +677,14 @@ public function _getLogData($log, $max_lines = 100) { $log = 'Logfile path error.'; } else { if (is_readable($logfile)) { - $log = $this->_getOutputFromExecCommand('tail -n '.intval($max_lines).' ' . escapeshellarg($logfile)); + $log = $this->_getOutputFromExecCommand('tail -n '.intval($max_lines).' ' . escapeshellarg($logfile), $max_lines); } else { $log = 'Unable to read ' . $logfile; } } } else { if($journalmatch != ''){ - $log = $this->_getOutputFromExecCommand('journalctl -n '.intval($max_lines).' --no-pager ' . escapeshellcmd($journalmatch)); + $log = $this->_getOutputFromExecCommand('journalctl -n '.intval($max_lines).' --no-pager ' . escapeshellcmd($journalmatch), $max_lines); }else{ $log = 'Unable to read logfile'; } @@ -694,7 +694,7 @@ public function _getLogData($log, $max_lines = 100) { return $log; } - private function _getOutputFromExecCommand ($command) { + private function _getOutputFromExecCommand ($command, $max4k = 1000) { $log = ''; $fd = popen($command, 'r'); if ($fd) { @@ -702,7 +702,7 @@ private function _getOutputFromExecCommand ($command) { while (!feof($fd)) { $log .= fgets($fd, 4096); $n++; - if ($n > 1000) + if ($n > $max4k) break; } fclose($fd); From 7012392939d9e40dc1b180aee2a7ba6042310c23 Mon Sep 17 00:00:00 2001 From: Herman van Rink Date: Mon, 18 Mar 2024 23:40:40 +0100 Subject: [PATCH 348/621] 10 milion to be safe --- server/lib/classes/cron.d/100-mailbox_stats_hourly.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/lib/classes/cron.d/100-mailbox_stats_hourly.inc.php b/server/lib/classes/cron.d/100-mailbox_stats_hourly.inc.php index 8a8d9a6e5d..4ad612f601 100644 --- a/server/lib/classes/cron.d/100-mailbox_stats_hourly.inc.php +++ b/server/lib/classes/cron.d/100-mailbox_stats_hourly.inc.php @@ -78,7 +78,7 @@ private function update_last_mail_login() { $this->_tools = new monitor_tools(); // Get the data of the log - $log_lines = $this->_tools->_getLogData('log_mail', 1000000); + $log_lines = $this->_tools->_getLogData('log_mail', 10000000); $updatedUsers = []; From e9c9f1b9caf8302f959e07d82b2afebcecadb227 Mon Sep 17 00:00:00 2001 From: Till Brehm Date: Thu, 21 Mar 2024 18:24:38 +0000 Subject: [PATCH 349/621] Fixes issue #6667 --- interface/lib/plugins/mail_mail_domain_plugin.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interface/lib/plugins/mail_mail_domain_plugin.inc.php b/interface/lib/plugins/mail_mail_domain_plugin.inc.php index 4ff756f44f..c154198eb7 100644 --- a/interface/lib/plugins/mail_mail_domain_plugin.inc.php +++ b/interface/lib/plugins/mail_mail_domain_plugin.inc.php @@ -255,7 +255,7 @@ function mail_mail_domain_edit($event_name, $page_form) { // If domain changes, update spamfilter_users // and fire spamfilter_wblist_update events so rspamd files are rewritten if ($old_domain != $domain) { - $tmp_users = $app->db->queryOneRecord("SELECT id,fullname FROM spamfilter_users WHERE email LIKE ?", '%@' . $old_domain); + $tmp_users = $app->db->queryAllRecords("SELECT id,fullname FROM spamfilter_users WHERE email LIKE ?", '%@' . $old_domain); if(is_array($tmp_users)) { foreach ($tmp_users as $tmp_old) { $tmp_new = $app->db->queryOneRecord("SELECT id,fullname FROM spamfilter_users WHERE email = ?", '@' . $domain); From 8255b340bf923495a6237be6e96a4139e233f74f Mon Sep 17 00:00:00 2001 From: Till Brehm Date: Thu, 21 Mar 2024 18:28:04 +0000 Subject: [PATCH 350/621] Fixes issue #6669 --- interface/lib/plugins/mail_mail_domain_plugin.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interface/lib/plugins/mail_mail_domain_plugin.inc.php b/interface/lib/plugins/mail_mail_domain_plugin.inc.php index 4ff756f44f..6440e2a571 100644 --- a/interface/lib/plugins/mail_mail_domain_plugin.inc.php +++ b/interface/lib/plugins/mail_mail_domain_plugin.inc.php @@ -60,7 +60,7 @@ function mail_mail_domain_edit($event_name, $page_form) { } //** If the domain name or owner has been changed, change the domain and owner in all mailbox records - if($page_form->oldDataRecord && ($page_form->oldDataRecord['domain'] != $domain || + if($page_form->oldDataRecord && !empty($page_form->oldDataRecord['domain']) && ($page_form->oldDataRecord['domain'] != $domain || (isset($page_form->dataRecord['client_group_id']) && $page_form->oldDataRecord['sys_groupid'] != $page_form->dataRecord['client_group_id']))) { $app->uses('getconf'); $mail_config = $app->getconf->get_server_config($page_form->dataRecord["server_id"], 'mail'); From c755876fc869eaf46e6242895420b08f1b8e0c50 Mon Sep 17 00:00:00 2001 From: Till Brehm Date: Thu, 28 Mar 2024 10:56:44 +0000 Subject: [PATCH 351/621] Do not count pending datalog requests for inactive servers --- interface/lib/classes/db_mysql.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interface/lib/classes/db_mysql.inc.php b/interface/lib/classes/db_mysql.inc.php index 9a7cf7129f..27fbd117db 100644 --- a/interface/lib/classes/db_mysql.inc.php +++ b/interface/lib/classes/db_mysql.inc.php @@ -847,7 +847,7 @@ public function datalogStatus($login = '') { $result = $this->queryAllRecords("SELECT COUNT( * ) AS cnt, sys_datalog.action, sys_datalog.dbtable FROM sys_datalog, server - WHERE (server.server_id = sys_datalog.server_id or sys_datalog.server_id = 0) AND sys_datalog.user = ? AND sys_datalog.datalog_id > server.updated + WHERE (server.server_id = sys_datalog.server_id or sys_datalog.server_id = 0) AND sys_datalog.user = ? AND sys_datalog.datalog_id > server.updated AND server.active = 1 GROUP BY sys_datalog.dbtable, sys_datalog.action", $login); foreach($result as $row) { From c55f9cc0cfda76c823cce42250f2d6831930d04f Mon Sep 17 00:00:00 2001 From: Till Date: Thu, 28 Mar 2024 19:08:34 +0100 Subject: [PATCH 352/621] Fixed #6656 Spamfilter white/blacklist entries can not be added by the client --- interface/web/mail/mail_domain_edit.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interface/web/mail/mail_domain_edit.php b/interface/web/mail/mail_domain_edit.php index f5697b4f1c..c822c9f27a 100644 --- a/interface/web/mail/mail_domain_edit.php +++ b/interface/web/mail/mail_domain_edit.php @@ -355,7 +355,7 @@ function onAfterInsert() { // We create a new record $insert_data = array( "sys_userid" => $_SESSION["s"]["user"]["userid"], - "sys_groupid" => $tmp_domain["sys_groupid"], + "sys_groupid" => (isset($this->dataRecord["client_group_id"]))?$this->dataRecord["client_group_id"]:$tmp_domain["sys_groupid"], "sys_perm_user" => 'riud', "sys_perm_group" => 'riud', "sys_perm_other" => '', From 81b15eb4290ad3f7050ed3ca54aac63cdaec34a9 Mon Sep 17 00:00:00 2001 From: Till Date: Fri, 29 Mar 2024 12:01:41 +0100 Subject: [PATCH 353/621] Fixed: Menu item title link shall use target of the first item --- interface/web/nav.php | 1 + .../themes/default/templates/sidenav.tpl.htm | 30 +++++++++++++++---- 2 files changed, 26 insertions(+), 5 deletions(-) diff --git a/interface/web/nav.php b/interface/web/nav.php index 1091276b86..69b3c7c2d6 100644 --- a/interface/web/nav.php +++ b/interface/web/nav.php @@ -124,6 +124,7 @@ } $nav['title'] = $app->lng($nav['title']); $nav['startpage'] = $nav['items'][0]['link']; + $nav['startpage_target'] = $nav['items'][0]['target']; $nav['items'] = $tmp_items; $nav_translated[] = $nav; } diff --git a/interface/web/themes/default/templates/sidenav.tpl.htm b/interface/web/themes/default/templates/sidenav.tpl.htm index b4dcb38ce0..4d8acbf3fa 100644 --- a/interface/web/themes/default/templates/sidenav.tpl.htm +++ b/interface/web/themes/default/templates/sidenav.tpl.htm @@ -1,18 +1,38 @@ -
+ +
+ + + + + + + + + + + + + + + + + +
+