diff --git a/actions/admin/settings/120.system.php b/actions/admin/settings/120.system.php
index b691b988..c76774b7 100644
--- a/actions/admin/settings/120.system.php
+++ b/actions/admin/settings/120.system.php
@@ -253,7 +253,23 @@ return array(
'type' => 'hiddenString',
'default' => '',
'save_method' => 'storeSettingField'
- )
+ ),
+ 'system_apply_specialsettings_default' => array(
+ 'label' => $lng['serversettings']['apply_specialsettings_default'],
+ 'settinggroup' => 'system',
+ 'varname' => 'apply_specialsettings_default',
+ 'type' => 'bool',
+ 'default' => true,
+ 'save_method' => 'storeSettingField'
+ ),
+ 'system_apply_phpconfigs_default' => array(
+ 'label' => $lng['serversettings']['apply_phpconfigs_default'],
+ 'settinggroup' => 'system',
+ 'varname' => 'apply_phpconfigs_default',
+ 'type' => 'bool',
+ 'default' => true,
+ 'save_method' => 'storeSettingField'
+ ),
)
)
)
diff --git a/install/froxlor.sql b/install/froxlor.sql
index c00b8e68..de6826cd 100644
--- a/install/froxlor.sql
+++ b/install/froxlor.sql
@@ -660,6 +660,8 @@ opcache.interned_strings_buffer'),
('system', 'errorlog_level', 'warn'),
('system', 'leecc', '0'),
('system', 'froxloraliases', ''),
+ ('system', 'apply_specialsettings_default', '1'),
+ ('system', 'apply_phpconfigs_default', '1'),
('api', 'enabled', '0'),
('2fa', 'enabled', '1'),
('panel', 'decimal_places', '4'),
@@ -695,7 +697,7 @@ opcache.interned_strings_buffer'),
('panel', 'customer_hide_options', ''),
('panel', 'is_configured', '0'),
('panel', 'version', '0.10.6'),
- ('panel', 'db_version', '201911130');
+ ('panel', 'db_version', '201911220');
DROP TABLE IF EXISTS `panel_tasks`;
diff --git a/install/updates/froxlor/0.10/update_0.10.inc.php b/install/updates/froxlor/0.10/update_0.10.inc.php
index 61001b2e..f4f1bae2 100644
--- a/install/updates/froxlor/0.10/update_0.10.inc.php
+++ b/install/updates/froxlor/0.10/update_0.10.inc.php
@@ -482,3 +482,11 @@ if (\Froxlor\Froxlor::isFroxlorVersion('0.10.5')) {
showUpdateStep("Updating from 0.10.5 to 0.10.6", false);
\Froxlor\Froxlor::updateToVersion('0.10.6');
}
+
+if (\Froxlor\Froxlor::isDatabaseVersion('201911130')) {
+ showUpdateStep("Adding new settings for domain edit form default values");
+ Settings::AddNew("system.apply_specialsettings_default", '1');
+ Settings::AddNew("system.apply_phpconfigs_default", '1');
+ lastStepStatus(0);
+ \Froxlor\Froxlor::updateToDbVersion('201911220');
+}
diff --git a/lib/Froxlor/Api/Commands/Domains.php b/lib/Froxlor/Api/Commands/Domains.php
index d3d32191..9f98e2c6 100644
--- a/lib/Froxlor/Api/Commands/Domains.php
+++ b/lib/Froxlor/Api/Commands/Domains.php
@@ -865,7 +865,7 @@ class Domains extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\ResourceEn
* @param bool $include_specialsettings
* optional, whether or not to include non-ssl specialsettings in the generated ssl-vhost, default false
* @param bool $specialsettingsforsubdomains
- * optional, whether to apply specialsettings to all subdomains of this domain, default 0 (false)
+ * optional, whether to apply specialsettings to all subdomains of this domain, default is read from setting system.apply_specialsettings_default
* @param bool $notryfiles
* optional, [nginx only] do not generate the default try-files directive, default 0 (false)
* @param bool $writeaccesslog
@@ -877,7 +877,7 @@ class Domains extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\ResourceEn
* @param bool $phpenabled
* optional, whether php is enabled for this domain, default 0 (false)
* @param bool $phpsettingsforsubdomains
- * optional, whether to apply php-setting to apply to all subdomains of this domain, default 0 (false)
+ * optional, whether to apply php-setting to apply to all subdomains of this domain, default is read from setting system.apply_phpconfigs_default
* @param bool $openbasedir
* optional, whether to activate openbasedir restriction for this domain, default 0 (false)
* @param int $phpsettingid
@@ -947,13 +947,13 @@ class Domains extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\ResourceEn
$specialsettings = $this->getParam('specialsettings', true, $result['specialsettings']);
$ssl_specialsettings = $this->getParam('ssl_specialsettings', true, $result['ssl_specialsettings']);
$include_specialsettings = $this->getBoolParam('include_specialsettings', true, $result['include_specialsettings']);
- $ssfs = $this->getBoolParam('specialsettingsforsubdomains', true, 0);
+ $ssfs = $this->getBoolParam('specialsettingsforsubdomains', true, \Froxlor\Settings::Get('system.apply_specialsettings_default'));
$notryfiles = $this->getBoolParam('notryfiles', true, $result['notryfiles']);
$writeaccesslog = $this->getBoolParam('writeaccesslog', true, $result['writeaccesslog']);
$writeerrorlog = $this->getBoolParam('writeerrorlog', true, $result['writeerrorlog']);
$documentroot = $this->getParam('documentroot', true, $result['documentroot']);
$phpenabled = $this->getBoolParam('phpenabled', true, $result['phpenabled']);
- $phpfs = $this->getBoolParam('phpsettingsforsubdomains', true, 0);
+ $phpfs = $this->getBoolParam('phpsettingsforsubdomains', true, \Froxlor\Settings::Get('system.apply_phpconfigs_default'));
$openbasedir = $this->getBoolParam('openbasedir', true, $result['openbasedir']);
$phpsettingid = $this->getParam('phpsettingid', true, $result['phpsettingid']);
$mod_fcgid_starter = $this->getParam('mod_fcgid_starter', true, $result['mod_fcgid_starter']);
diff --git a/lib/Froxlor/Froxlor.php b/lib/Froxlor/Froxlor.php
index c026d325..a7b947ef 100644
--- a/lib/Froxlor/Froxlor.php
+++ b/lib/Froxlor/Froxlor.php
@@ -10,7 +10,7 @@ final class Froxlor
const VERSION = '0.10.6';
// Database version (YYYYMMDDC where C is a daily counter)
- const DBVERSION = '201911130';
+ const DBVERSION = '201911220';
// Distribution branding-tag (used for Debian etc.)
const BRANDING = '';
diff --git a/lib/formfields/admin/domains/formfield.domains_edit.php b/lib/formfields/admin/domains/formfield.domains_edit.php
index 22d9eea2..21659c81 100644
--- a/lib/formfields/admin/domains/formfield.domains_edit.php
+++ b/lib/formfields/admin/domains/formfield.domains_edit.php
@@ -159,7 +159,7 @@ return array(
)
),
'value' => array(
- '1'
+ \Froxlor\Settings::Get('system.apply_specialsettings_default') == 1 ? '1' : ''
)
),
'notryfiles' => array(
@@ -453,7 +453,7 @@ return array(
)
),
'value' => array(
- '1'
+ \Froxlor\Settings::Get('system.apply_phpconfigs_default') == 1 ? '1' : ''
)
),
'mod_fcgid_starter' => array(
diff --git a/lng/english.lng.php b/lng/english.lng.php
index 444ef72a..067cd898 100644
--- a/lng/english.lng.php
+++ b/lng/english.lng.php
@@ -1853,7 +1853,7 @@ $lng['domains']['ssl_redirect_temporarilydisabled'] = "
The SSL redirect is t
$lng['serversettings']['caa_entry']['title'] = 'Generate CAA DNS records';
$lng['serversettings']['caa_entry']['description'] = 'Automatically generates CAA records for SSL-enabled domains that are using Let\'s Encrypt';
$lng['serversettings']['caa_entry_custom']['title'] = 'Additional CAA DNS records';
-$lng['serversettings']['caa_entry_custom']['description'] = 'DNS Certification Authority Authorization (CAA) is an Internet security policy mechanism which allows domain name holders to indicate to certificate authorities
whether they are authorized to issue digital certificates for a particular domain name. It does this by means of a new "CAA" Domain Name System (DNS) resource record.
The content of this field will be included into the DNS zone directly (each line results in a CAA record).
If Let\'s Encrypt is enabled for this domain, this entry will always be added automatically and does not need to be added manually:
0 issue "letsencrypt.org" (If domain is a wildcard domain, issuewild will be used instead).
To enable Incident Reporting, you can add an iodef record. An example for sending such report to me@example.com would be:
0 iodef "mailto:me@example.com"
Attention: The code won\'t be checked for any errors. If it contains errors, your CAA records might not work!';
+$lng['serversettings']['caa_entry_custom']['description'] = 'DNS Certification Authority Authorization (CAA) is an Internet security policy mechanism which allows domain name holders to indicate to certificate authorities
whether they are authorized to issue digital certificates for a particular domain name. It does this by means of a new "CAA" Domain Name System (DNS) resource record.
The content of this field will be included into the DNS zone directly (each line results in a CAA record).
If Let\'s Encrypt is enabled for this domain, this entry will always be added automatically and does not need to be added manually:
0 issue "letsencrypt.org" (If domain is a wildcard domain, issuewild will be used instead).
To enable Incident Reporting, you can add an iodef record. An example for sending such report to me@example.com would be:
0 iodef "mailto:me@example.com"
Attention: The code won\'t be checked for any errors. If it contains errors, your CAA records might not work!';
// Autoupdate
$lng['admin']['autoupdate'] = 'Auto-Update';
@@ -2080,3 +2080,5 @@ $lng['admin']['ipsandports']['ssl_default_vhostconf_domain'] = 'Default SSL vHos
$lng['customer']['total_diskspace'] = 'Total diskspace (MiB)';
$lng['admin']['domain_override_tls'] = 'Override system TLS settings';
$lng['domains']['isaliasdomainof'] = 'Is aliasdomain for %s';
+$lng['serversettings']['apply_specialsettings_default']['title'] = 'Default value for "' . $lng['admin']['specialsettingsforsubdomains'] . "' setting when editing a domain";
+$lng['serversettings']['apply_phpconfigs_default']['title'] = 'Default value for "' . $lng['admin']['phpsettingsforsubdomains'] . "' setting when editing a domain";
diff --git a/lng/german.lng.php b/lng/german.lng.php
index 86681ff8..fb381138 100644
--- a/lng/german.lng.php
+++ b/lng/german.lng.php
@@ -1727,3 +1727,5 @@ $lng['admin']['ipsandports']['ssl_default_vhostconf_domain'] = 'Standard SSL vHo
$lng['customer']['total_diskspace'] = 'Gesamtspeicherplatz (MiB)';
$lng['admin']['domain_override_tls'] = 'Überschreibe System TLS Einstellungen';
$lng['domains']['isaliasdomainof'] = 'Ist Aliasdomain für %s';
+$lng['serversettings']['apply_specialsettings_default']['title'] = 'Standardwert für "' . $lng['admin']['specialsettingsforsubdomains'] . "' Einstellung beim Bearbeiten einer Domain";
+$lng['serversettings']['apply_phpconfigs_default']['title'] = 'Standardwert für "' . $lng['admin']['phpsettingsforsubdomains'] . "' Einstellung beim Bearbeiten einer Domain";