added option to disable creation of default subdomain; fixes #960
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
@@ -205,9 +205,21 @@ return array(
|
||||
'default' => false,
|
||||
'cronmodule' => 'froxlor/backup',
|
||||
'save_method' => 'storeSettingField'
|
||||
)
|
||||
),
|
||||
'system_createstdsubdom_default' => array(
|
||||
'label' => $lng['serversettings']['createstdsubdom_default'],
|
||||
'settinggroup' => 'system',
|
||||
'varname' => 'createstdsubdom_default',
|
||||
'type' => 'option',
|
||||
'default' => '1',
|
||||
'option_mode' => 'one',
|
||||
'option_options' => array(
|
||||
'0' => $lng['panel']['no'],
|
||||
'1' => $lng['panel']['yes']
|
||||
),
|
||||
'save_method' => 'storeSettingField'
|
||||
),
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@@ -678,6 +678,7 @@ opcache.interned_strings_buffer'),
|
||||
('system', 'include_default_vhostconf', '0'),
|
||||
('system', 'soaemail', ''),
|
||||
('system', 'domaindefaultalias', '0'),
|
||||
('system', 'createstdsubdom_default', '1'),
|
||||
('api', 'enabled', '0'),
|
||||
('2fa', 'enabled', '1'),
|
||||
('panel', 'decimal_places', '4'),
|
||||
@@ -720,7 +721,7 @@ opcache.interned_strings_buffer'),
|
||||
('panel', 'logo_overridetheme', '0'),
|
||||
('panel', 'logo_overridecustom', '0'),
|
||||
('panel', 'version', '0.10.27'),
|
||||
('panel', 'db_version', '202107200');
|
||||
('panel', 'db_version', '202107210');
|
||||
|
||||
|
||||
DROP TABLE IF EXISTS `panel_tasks`;
|
||||
|
||||
@@ -875,3 +875,10 @@ if (\Froxlor\Froxlor::isDatabaseVersion('202107070')) {
|
||||
lastStepStatus(0);
|
||||
\Froxlor\Froxlor::updateToDbVersion('202107200');
|
||||
}
|
||||
|
||||
if (\Froxlor\Froxlor::isDatabaseVersion('202107200')) {
|
||||
showUpdateStep("Adding settings to define default value of 'create std-subdomain' when creating a customer", true);
|
||||
Settings::AddNew("system.createstdsubdom_default", '1');
|
||||
lastStepStatus(0);
|
||||
\Froxlor\Froxlor::updateToDbVersion('202107210');
|
||||
}
|
||||
|
||||
@@ -308,7 +308,7 @@ class Customers extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\Resource
|
||||
* @param bool $mysqls_ul
|
||||
* optional, whether customer should have unlimited mysql-databases, default 0 (false)
|
||||
* @param bool $createstdsubdomain
|
||||
* optional, whether to create a standard-subdomain ([loginname].froxlor-hostname.tld), default 0 (false)
|
||||
* optional, whether to create a standard-subdomain ([loginname].froxlor-hostname.tld), default [system.createstdsubdom_default]
|
||||
* @param bool $phpenabled
|
||||
* optional, whether to allow usage of PHP, default 0 (false)
|
||||
* @param array $allowed_phpconfigs
|
||||
@@ -352,7 +352,7 @@ class Customers extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\Resource
|
||||
$gender = (int) $this->getParam('gender', true, 0);
|
||||
$custom_notes = $this->getParam('custom_notes', true, '');
|
||||
$custom_notes_show = $this->getBoolParam('custom_notes_show', true, 0);
|
||||
$createstdsubdomain = $this->getBoolParam('createstdsubdomain', true, 0);
|
||||
$createstdsubdomain = $this->getBoolParam('createstdsubdomain', true, Settings::Get('system.createstdsubdom_default'));
|
||||
$password = $this->getParam('new_customer_password', true, '');
|
||||
$sendpassword = $this->getBoolParam('sendpassword', true, 0);
|
||||
$store_defaultindex = $this->getBoolParam('store_defaultindex', true, 0);
|
||||
|
||||
@@ -10,7 +10,7 @@ final class Froxlor
|
||||
const VERSION = '0.10.27';
|
||||
|
||||
// Database version (YYYYMMDDC where C is a daily counter)
|
||||
const DBVERSION = '202107200';
|
||||
const DBVERSION = '202107210';
|
||||
|
||||
// Distribution branding-tag (used for Debian etc.)
|
||||
const BRANDING = '';
|
||||
|
||||
@@ -37,7 +37,7 @@ return array(
|
||||
)
|
||||
),
|
||||
'value' => array(
|
||||
'1'
|
||||
\Froxlor\Settings::Get('system.createstdsubdom_default')
|
||||
)
|
||||
),
|
||||
'store_defaultindex' => array(
|
||||
|
||||
@@ -2127,3 +2127,4 @@ $lng['serversettings']['logo_overridetheme']['title'] = 'Overwrites logo defined
|
||||
$lng['serversettings']['logo_overridetheme']['description'] = 'This needs to be set to "true" if you intend to use your uploaded logo; alternatively you can still use the theme-based "logo_custom.png" and "logo_custom_login.png" possibility.';
|
||||
$lng['serversettings']['logo_overridecustom']['title'] = 'Overwrite custom logo (logo_custom.png and logo_custom_login.png) defined in theme by "Logo Image" (Header and Login, see below)';
|
||||
$lng['serversettings']['logo_overridecustom']['description'] = 'Set this to "true" if you want to ignore theme-specific custom logos for header and login and use "Logo Image"';
|
||||
$lng['serversettings']['createstdsubdom_default']['title'] = 'Preselected value for "'.$lng['admin']['stdsubdomain_add'].'" when creating a customer';
|
||||
|
||||
@@ -1773,3 +1773,4 @@ $lng['serversettings']['logo_overridetheme']['title'] = 'Überschreibe Theme-Log
|
||||
$lng['serversettings']['logo_overridetheme']['description'] = 'Ist die Nutzung eines hochgeladenen Logos gewünscht, muss diese Einstellung auf "Ja" gesetzt werden. Alternativ kann weiterhin das Theme-basierte Überschreiben via "logo_custom.png" und "logo_custom_login.png" genutzt werden.';
|
||||
$lng['serversettings']['logo_overridecustom']['title'] = 'Überschreibe benutzerdefinierte Theme-Logos (logo_custom.png und logo_custom_login.png) mit "Logo Bold" (Header und Login, siehe unten)';
|
||||
$lng['serversettings']['logo_overridecustom']['description'] = 'Ist diese Einstellung aktiv, werden benutzerdefinierte Logos im Theme-Ordner mit dem "Logo Bild" ersetzt';
|
||||
$lng['serversettings']['createstdsubdom_default']['title'] = 'Standardwert für "'.$lng['admin']['stdsubdomain_add'].'" bei Erstellung eines Kunden';
|
||||
|
||||
Reference in New Issue
Block a user