add setting for default serveralias value for new domains, refs #944
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
@@ -270,6 +270,20 @@ return array(
|
|||||||
'default' => true,
|
'default' => true,
|
||||||
'save_method' => 'storeSettingField'
|
'save_method' => 'storeSettingField'
|
||||||
),
|
),
|
||||||
|
'system_domaindefaultalias' => array(
|
||||||
|
'label' => $lng['admin']['domaindefaultalias'],
|
||||||
|
'settinggroup' => 'system',
|
||||||
|
'varname' => 'domaindefaultalias',
|
||||||
|
'type' => 'option',
|
||||||
|
'default' => '0',
|
||||||
|
'option_mode' => 'one',
|
||||||
|
'option_options' => array(
|
||||||
|
'0' => $lng['domains']['serveraliasoption_wildcard'],
|
||||||
|
'1' => $lng['domains']['serveraliasoption_www'],
|
||||||
|
'2' => $lng['domains']['serveraliasoption_none']
|
||||||
|
),
|
||||||
|
'save_method' => 'storeSettingField'
|
||||||
|
),
|
||||||
'hide_incompatible_settings' => array(
|
'hide_incompatible_settings' => array(
|
||||||
'label' => $lng['serversettings']['hide_incompatible_settings'],
|
'label' => $lng['serversettings']['hide_incompatible_settings'],
|
||||||
'settinggroup' => 'system',
|
'settinggroup' => 'system',
|
||||||
|
|||||||
@@ -290,9 +290,9 @@ if ($page == 'domains' || $page == 'overview') {
|
|||||||
|
|
||||||
// create serveralias options
|
// create serveralias options
|
||||||
$serveraliasoptions = "";
|
$serveraliasoptions = "";
|
||||||
$serveraliasoptions .= \Froxlor\UI\HTML::makeoption($lng['domains']['serveraliasoption_wildcard'], '0', '0', true, true);
|
$serveraliasoptions .= \Froxlor\UI\HTML::makeoption($lng['domains']['serveraliasoption_wildcard'], '0', Settings::Get('system.domaindefaultalias'), true, true);
|
||||||
$serveraliasoptions .= \Froxlor\UI\HTML::makeoption($lng['domains']['serveraliasoption_www'], '1', '0', true, true);
|
$serveraliasoptions .= \Froxlor\UI\HTML::makeoption($lng['domains']['serveraliasoption_www'], '1', Settings::Get('system.domaindefaultalias'), true, true);
|
||||||
$serveraliasoptions .= \Froxlor\UI\HTML::makeoption($lng['domains']['serveraliasoption_none'], '2', '0', true, true);
|
$serveraliasoptions .= \Froxlor\UI\HTML::makeoption($lng['domains']['serveraliasoption_none'], '2', Settings::Get('system.domaindefaultalias'), true, true);
|
||||||
|
|
||||||
$subcanemaildomain = \Froxlor\UI\HTML::makeoption($lng['admin']['subcanemaildomain']['never'], '0', '0', true, true);
|
$subcanemaildomain = \Froxlor\UI\HTML::makeoption($lng['admin']['subcanemaildomain']['never'], '0', '0', true, true);
|
||||||
$subcanemaildomain .= \Froxlor\UI\HTML::makeoption($lng['admin']['subcanemaildomain']['choosableno'], '1', '0', true, true);
|
$subcanemaildomain .= \Froxlor\UI\HTML::makeoption($lng['admin']['subcanemaildomain']['choosableno'], '1', '0', true, true);
|
||||||
|
|||||||
@@ -677,6 +677,7 @@ opcache.interned_strings_buffer'),
|
|||||||
('system', 'hide_incompatible_settings', '0'),
|
('system', 'hide_incompatible_settings', '0'),
|
||||||
('system', 'include_default_vhostconf', '0'),
|
('system', 'include_default_vhostconf', '0'),
|
||||||
('system', 'soaemail', ''),
|
('system', 'soaemail', ''),
|
||||||
|
('system', 'domaindefaultalias', '0'),
|
||||||
('api', 'enabled', '0'),
|
('api', 'enabled', '0'),
|
||||||
('2fa', 'enabled', '1'),
|
('2fa', 'enabled', '1'),
|
||||||
('panel', 'decimal_places', '4'),
|
('panel', 'decimal_places', '4'),
|
||||||
@@ -715,7 +716,7 @@ opcache.interned_strings_buffer'),
|
|||||||
('panel', 'terms_url', ''),
|
('panel', 'terms_url', ''),
|
||||||
('panel', 'privacy_url', ''),
|
('panel', 'privacy_url', ''),
|
||||||
('panel', 'version', '0.10.26'),
|
('panel', 'version', '0.10.26'),
|
||||||
('panel', 'db_version', '202103240');
|
('panel', 'db_version', '202106160');
|
||||||
|
|
||||||
|
|
||||||
DROP TABLE IF EXISTS `panel_tasks`;
|
DROP TABLE IF EXISTS `panel_tasks`;
|
||||||
|
|||||||
@@ -803,3 +803,12 @@ if (\Froxlor\Froxlor::isFroxlorVersion('0.10.25')) {
|
|||||||
showUpdateStep("Updating from 0.10.25 to 0.10.26", false);
|
showUpdateStep("Updating from 0.10.25 to 0.10.26", false);
|
||||||
\Froxlor\Froxlor::updateToVersion('0.10.26');
|
\Froxlor\Froxlor::updateToVersion('0.10.26');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (\Froxlor\Froxlor::isDatabaseVersion('202103240')) {
|
||||||
|
|
||||||
|
showUpdateStep("Adding setting for default serveralias value for new domains", true);
|
||||||
|
Settings::AddNew("system.domaindefaultalias", '0');
|
||||||
|
lastStepStatus(0);
|
||||||
|
|
||||||
|
\Froxlor\Froxlor::updateToDbVersion('202106160');
|
||||||
|
}
|
||||||
|
|||||||
@@ -213,7 +213,7 @@ class Domains extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\ResourceEn
|
|||||||
* @param bool $email_only
|
* @param bool $email_only
|
||||||
* optional, restrict domain to email usage, default 0 (false)
|
* optional, restrict domain to email usage, default 0 (false)
|
||||||
* @param int $selectserveralias
|
* @param int $selectserveralias
|
||||||
* optional, 0 = wildcard, 1 = www-alias, 2 = none, default 0
|
* optional, 0 = wildcard, 1 = www-alias, 2 = none, default [system.domaindefaultalias]
|
||||||
* @param bool $speciallogfile
|
* @param bool $speciallogfile
|
||||||
* optional, whether to create an exclusive web-logfile for this domain, default 0 (false)
|
* optional, whether to create an exclusive web-logfile for this domain, default 0 (false)
|
||||||
* @param int $alias
|
* @param int $alias
|
||||||
@@ -309,7 +309,7 @@ class Domains extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\ResourceEn
|
|||||||
$subcanemaildomain = $this->getParam('subcanemaildomain', true, 0);
|
$subcanemaildomain = $this->getParam('subcanemaildomain', true, 0);
|
||||||
$isemaildomain = $this->getBoolParam('isemaildomain', true, 0);
|
$isemaildomain = $this->getBoolParam('isemaildomain', true, 0);
|
||||||
$email_only = $this->getBoolParam('email_only', true, 0);
|
$email_only = $this->getBoolParam('email_only', true, 0);
|
||||||
$serveraliasoption = $this->getParam('selectserveralias', true, 0);
|
$serveraliasoption = $this->getParam('selectserveralias', true, Settings::Get('system.domaindefaultalias'));
|
||||||
$speciallogfile = $this->getBoolParam('speciallogfile', true, 0);
|
$speciallogfile = $this->getBoolParam('speciallogfile', true, 0);
|
||||||
$aliasdomain = intval($this->getParam('alias', true, 0));
|
$aliasdomain = intval($this->getParam('alias', true, 0));
|
||||||
$issubof = $this->getParam('issubof', true, 0);
|
$issubof = $this->getParam('issubof', true, 0);
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ final class Froxlor
|
|||||||
const VERSION = '0.10.26';
|
const VERSION = '0.10.26';
|
||||||
|
|
||||||
// Database version (YYYYMMDDC where C is a daily counter)
|
// Database version (YYYYMMDDC where C is a daily counter)
|
||||||
const DBVERSION = '202103240';
|
const DBVERSION = '202106160';
|
||||||
|
|
||||||
// Distribution branding-tag (used for Debian etc.)
|
// Distribution branding-tag (used for Debian etc.)
|
||||||
const BRANDING = '';
|
const BRANDING = '';
|
||||||
|
|||||||
@@ -2116,3 +2116,4 @@ $lng['serversettings']['terms_url']['description'] = 'Specify an URL to your ter
|
|||||||
$lng['privacy'] = 'Privacy policy';
|
$lng['privacy'] = 'Privacy policy';
|
||||||
$lng['serversettings']['privacy_url']['title'] = 'URL to privacy policy';
|
$lng['serversettings']['privacy_url']['title'] = 'URL to privacy policy';
|
||||||
$lng['serversettings']['privacy_url']['description'] = 'Specify an URL to your privacy policy site / imprint site. The link will be visible on the login screen and on the footer when logged in.';
|
$lng['serversettings']['privacy_url']['description'] = 'Specify an URL to your privacy policy site / imprint site. The link will be visible on the login screen and on the footer when logged in.';
|
||||||
|
$lng['admin']['domaindefaultalias'] = 'Default ServerAlias value for new domains';
|
||||||
|
|||||||
@@ -1762,3 +1762,4 @@ $lng['serversettings']['terms_url']['description'] = 'Die URL zur AGB-Seite. Der
|
|||||||
$lng['privacy'] = 'Datenschutzerklärung';
|
$lng['privacy'] = 'Datenschutzerklärung';
|
||||||
$lng['serversettings']['privacy_url']['title'] = 'URL zur Datenschutzerklärung';
|
$lng['serversettings']['privacy_url']['title'] = 'URL zur Datenschutzerklärung';
|
||||||
$lng['serversettings']['privacy_url']['description'] = 'Die URL zur Datenschutzerklärungs-Seite. Der Link ist auf der Login-Seite und wenn eingeloggt, in der Fußzeile sichtbar.';
|
$lng['serversettings']['privacy_url']['description'] = 'Die URL zur Datenschutzerklärungs-Seite. Der Link ist auf der Login-Seite und wenn eingeloggt, in der Fußzeile sichtbar.';
|
||||||
|
$lng['admin']['domaindefaultalias'] = 'Standard ServerAlias-Angabe für neue Domains';
|
||||||
|
|||||||
Reference in New Issue
Block a user