major refactoring of almost all files

This commit is contained in:
envoyr
2022-04-28 20:48:00 +02:00
parent a2e95b960f
commit 4f4c71d79b
285 changed files with 21716 additions and 18766 deletions

View File

@@ -2,83 +2,92 @@
/**
* This file is part of the Froxlor project.
* Copyright (c) 2003-2009 the SysCP Team (see authors).
* Copyright (c) 2010 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* @copyright (c) the authors
* @author Florian Lippert <flo@syscp.org> (2003-2009)
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Settings
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you can also view it online at
* https://files.froxlor.org/misc/COPYING.txt
*
* @copyright the authors
* @author Froxlor team <team@froxlor.org>
* @license https://files.froxlor.org/misc/COPYING.txt GPLv2
*/
return array(
'groups' => array(
'security' => array(
'title' => $lng['admin']['security_settings'],
use Froxlor\Settings;
return [
'groups' => [
'security' => [
'title' => lng('admin.security_settings'),
'icon' => 'fa-solid fa-user-lock',
'fields' => array(
'panel_unix_names' => array(
'label' => $lng['serversettings']['unix_names'],
'fields' => [
'panel_unix_names' => [
'label' => lng('serversettings.unix_names'),
'settinggroup' => 'panel',
'varname' => 'unix_names',
'type' => 'checkbox',
'default' => true,
'save_method' => 'storeSettingField'
),
'system_mailpwcleartext' => array(
'label' => $lng['serversettings']['mailpwcleartext'],
],
'system_mailpwcleartext' => [
'label' => lng('serversettings.mailpwcleartext'),
'settinggroup' => 'system',
'varname' => 'mailpwcleartext',
'type' => 'checkbox',
'default' => false,
'save_method' => 'storeSettingField',
'advanced_mode' => true
),
'system_passwordcryptfunc' => array(
'label' => $lng['serversettings']['passwordcryptfunc'],
],
'system_passwordcryptfunc' => [
'label' => lng('serversettings.passwordcryptfunc'),
'settinggroup' => 'system',
'varname' => 'passwordcryptfunc',
'type' => 'select',
'default' => 0,
'option_options_method' => array(
'option_options_method' => [
'\\Froxlor\\System\\Crypt',
'getAvailablePasswordHashes'
),
],
'save_method' => 'storeSettingField',
'advanced_mode' => true
),
'system_allow_error_report_admin' => array(
'label' => $lng['serversettings']['allow_error_report_admin'],
],
'system_allow_error_report_admin' => [
'label' => lng('serversettings.allow_error_report_admin'),
'settinggroup' => 'system',
'varname' => 'allow_error_report_admin',
'type' => 'checkbox',
'default' => false,
'save_method' => 'storeSettingField'
),
'system_allow_error_report_customer' => array(
'label' => $lng['serversettings']['allow_error_report_customer'],
],
'system_allow_error_report_customer' => [
'label' => lng('serversettings.allow_error_report_customer'),
'settinggroup' => 'system',
'varname' => 'allow_error_report_customer',
'type' => 'checkbox',
'default' => false,
'save_method' => 'storeSettingField'
),
'system_allow_customer_shell' => array(
'label' => $lng['serversettings']['allow_allow_customer_shell'],
],
'system_allow_customer_shell' => [
'label' => lng('serversettings.allow_allow_customer_shell'),
'settinggroup' => 'system',
'varname' => 'allow_customer_shell',
'type' => 'checkbox',
'default' => false,
'save_method' => 'storeSettingField',
'advanced_mode' => true
),
'system_available_shells' => array(
'label' => $lng['serversettings']['available_shells'],
],
'system_available_shells' => [
'label' => lng('serversettings.available_shells'),
'settinggroup' => 'system',
'varname' => 'available_shells',
'type' => 'text',
@@ -86,22 +95,22 @@ return array(
'default' => '',
'save_method' => 'storeSettingField',
'advanced_mode' => true
),
'system_froxlorusergroup' => array(
'label' => $lng['serversettings']['froxlorusergroup'],
],
'system_froxlorusergroup' => [
'label' => lng('serversettings.froxlorusergroup'),
'settinggroup' => 'system',
'varname' => 'froxlorusergroup',
'type' => 'text',
'default' => '',
'save_method' => 'storeSettingField',
'plausibility_check_method' => array(
'plausibility_check_method' => [
'\\Froxlor\\Validate\\Check',
'checkLocalGroup'
),
'visible' => \Froxlor\Settings::Get('system.nssextrausers'),
],
'visible' => Settings::Get('system.nssextrausers'),
'advanced_mode' => true
),
)
)
)
);
],
]
]
]
];