remove unnecessary ternaries (#1027)

* remove unnecessary ternaries

* fix: !($id <= 0);

* remove ternary
This commit is contained in:
Dennis Dudek
2022-04-14 09:02:10 +02:00
committed by GitHub
parent d90676a793
commit 25d9c52c58
44 changed files with 310 additions and 304 deletions

View File

@@ -14,6 +14,9 @@
* @package Formfields
*
*/
use Froxlor\Settings;
return array(
'admin_add' => array(
'title' => $lng['admin']['admin_add'],
@@ -37,7 +40,7 @@ return array(
'admin_password_suggestion' => array(
'next_to_prefix' => $lng['customer']['generated_pwd'].':',
'type' => 'text',
'visible' => (\Froxlor\Settings::Get('panel.password_regex') == ''),
'visible' => (Settings::Get('panel.password_regex') == ''),
'value' => \Froxlor\System\Crypt::generatePassword(),
'readonly' => true
)
@@ -55,8 +58,8 @@ return array(
'desc' => $lng['usersettings']['api_allowed']['description'],
'type' => 'checkbox',
'value' => '1',
'checked' => (\Froxlor\Settings::Get('api.enabled') == '1' ? true : false),
'visible' => (\Froxlor\Settings::Get('api.enabled') == '1' ? true : false)
'checked' => Settings::Get('api.enabled') == '1',
'visible' => Settings::Get('api.enabled') == '1'
)
)
),
@@ -183,7 +186,7 @@ return array(
'type' => 'textul',
'value' => 0,
'maxlength' => 9,
'visible' => (\Froxlor\Settings::Get('system.mail_quota_enabled') == '1' ? true : false),
'visible' => Settings::Get('system.mail_quota_enabled') == '1',
'mandatory' => true
),
'ftps' => array(

View File

@@ -33,18 +33,18 @@ return array(
'type' => 'checkbox',
'value' => '1',
'checked' => $result['deactivated'],
'visible' => ($result['adminid'] == $userinfo['userid'] ? false : true)
'visible' => $result['adminid'] != $userinfo['userid']
),
'admin_password' => array(
'label' => $lng['login']['password'] . '&nbsp;(' . $lng['panel']['emptyfornochanges'] . ')',
'type' => 'password',
'autocomplete' => 'off',
'visible' => ($result['adminid'] == $userinfo['userid'] ? false : true),
'visible' => $result['adminid'] != $userinfo['userid'],
'next_to' => [
'admin_password_suggestion' => array(
'next_to_prefix' => $lng['customer']['generated_pwd'].':',
'type' => 'text',
'visible' => (\Froxlor\Settings::Get('panel.password_regex') == '' && ($result['adminid'] == $userinfo['userid'] ? false : true)),
'visible' => (\Froxlor\Settings::Get('panel.password_regex') == '' && !($result['adminid'] == $userinfo['userid'])),
'value' => \Froxlor\System\Crypt::generatePassword(),
'readonly' => true
)
@@ -55,7 +55,7 @@ return array(
'type' => 'select',
'select_var' => $languages,
'selected' => $result['def_language'],
'visible' => ($result['adminid'] == $userinfo['userid'] ? false : true)
'visible' => $result['adminid'] != $userinfo['userid']
),
'api_allowed' => array(
'label' => $lng['usersettings']['api_allowed']['title'],
@@ -63,7 +63,7 @@ return array(
'type' => 'checkbox',
'value' => '1',
'checked' => $result['api_allowed'],
'visible' => (\Froxlor\Settings::Get('api.enabled') == '1' ? true : false)
'visible' => \Froxlor\Settings::Get('api.enabled') == '1'
)
)
),
@@ -102,7 +102,7 @@ return array(
'section_c' => array(
'title' => $lng['admin']['servicedata'],
'image' => 'icons/user_add.png',
'visible' => ($result['adminid'] != $userinfo['userid'] ? true : false),
'visible' => $result['adminid'] != $userinfo['userid'],
'fields' => array(
'ipaddress' => array(
'label' => $lng['serversettings']['ipaddress']['title'],
@@ -195,7 +195,7 @@ return array(
'type' => 'textul',
'value' => $result['email_quota'],
'maxlength' => 9,
'visible' => (\Froxlor\Settings::Get('system.mail_quota_enabled') == '1' ? true : false),
'visible' => \Froxlor\Settings::Get('system.mail_quota_enabled') == '1',
'mandatory' => true
),
'ftps' => array(

View File

@@ -71,8 +71,8 @@ return array(
'desc' => $lng['usersettings']['api_allowed']['description'],
'type' => 'checkbox',
'value' => '1',
'checked' => (\Froxlor\Settings::Get('api.enabled') == '1' ? true : false),
'visible' => (\Froxlor\Settings::Get('api.enabled') == '1' ? true : false)
'checked' => \Froxlor\Settings::Get('api.enabled') == '1',
'visible' => \Froxlor\Settings::Get('api.enabled') == '1'
)
)
),
@@ -213,7 +213,7 @@ return array(
'type' => 'textul',
'value' => 0,
'maxlength' => 9,
'visible' => (\Froxlor\Settings::Get('system.mail_quota_enabled') == '1' ? true : false),
'visible' => \Froxlor\Settings::Get('system.mail_quota_enabled') == '1',
'mandatory' => true
),
'email_imap' => array(
@@ -250,7 +250,7 @@ return array(
'checked' => true
),
'allowed_phpconfigs' => array(
'visible' => (((int) \Froxlor\Settings::Get('system.mod_fcgid') == 1 || (int) \Froxlor\Settings::Get('phpfpm.enabled') == 1) ? true : false),
'visible' => (((int) \Froxlor\Settings::Get('system.mod_fcgid') == 1 || (int) \Froxlor\Settings::Get('phpfpm.enabled') == 1)),
'label' => $lng['admin']['phpsettings']['title'],
'type' => 'checkbox',
'values' => $phpconfigs,
@@ -271,8 +271,8 @@ return array(
'label' => $lng['admin']['dnsenabled'] . '?',
'type' => 'checkbox',
'value' => '1',
'checked' => (\Froxlor\Settings::Get('system.dnsenabled') == '1' ? true : false),
'visible' => (\Froxlor\Settings::Get('system.dnsenabled') == '1' ? true : false)
'checked' => \Froxlor\Settings::Get('system.dnsenabled') == '1',
'visible' => \Froxlor\Settings::Get('system.dnsenabled') == '1'
),
'logviewenabled' => array(
'label' => $lng['admin']['logviewenabled'] . '?',

View File

@@ -71,7 +71,7 @@ return array(
'type' => 'checkbox',
'value' => '1',
'checked' => $result['api_allowed'],
'visible' => (\Froxlor\Settings::Get('api.enabled') == '1' ? true : false)
'visible' => \Froxlor\Settings::Get('api.enabled') == '1'
)
)
),
@@ -225,7 +225,7 @@ return array(
'type' => 'textul',
'value' => $result['email_quota'],
'maxlength' => 9,
'visible' => (\Froxlor\Settings::Get('system.mail_quota_enabled') == '1' ? true : false),
'visible' => \Froxlor\Settings::Get('system.mail_quota_enabled') == '1',
'mandatory' => true
),
'email_imap' => array(
@@ -262,7 +262,7 @@ return array(
'checked' => $result['phpenabled']
),
'allowed_phpconfigs' => array(
'visible' => (((int) \Froxlor\Settings::Get('system.mod_fcgid') == 1 || (int) \Froxlor\Settings::Get('phpfpm.enabled') == 1) ? true : false),
'visible' => (((int) \Froxlor\Settings::Get('system.mod_fcgid') == 1 || (int) \Froxlor\Settings::Get('phpfpm.enabled') == 1)),
'label' => $lng['admin']['phpsettings']['title'],
'type' => 'checkbox',
'values' => $phpconfigs,
@@ -280,7 +280,7 @@ return array(
'type' => 'checkbox',
'value' => '1',
'checked' => $result['dnsenabled'],
'visible' => (\Froxlor\Settings::Get('system.dnsenabled') == '1' ? true : false)
'visible' => \Froxlor\Settings::Get('system.dnsenabled') == '1'
),
'logviewenabled' => array(
'label' => $lng['admin']['logviewenabled'] . '?',

View File

@@ -14,6 +14,9 @@
* @package Formfields
*
*/
use Froxlor\Settings;
return array(
'domain_add' => array(
'title' => $lng['admin']['domain_add'],
@@ -35,7 +38,7 @@ return array(
'mandatory' => true
),
'adminid' => array(
'visible' => ($userinfo['customers_see_all'] == '1' ? true : false),
'visible' => $userinfo['customers_see_all'] == '1',
'label' => $lng['admin']['admin'],
'type' => 'select',
'select_var' => $admins,
@@ -103,7 +106,7 @@ return array(
'selected' => 0
),
'dkim' => array(
'visible' => (\Froxlor\Settings::Get('dkim.use_dkim') == '1' ? true : false),
'visible' => Settings::Get('dkim.use_dkim') == '1',
'label' => 'DomainKeys',
'type' => 'checkbox',
'value' => '1',
@@ -116,7 +119,7 @@ return array(
'image' => 'icons/domain_add.png',
'fields' => array(
'documentroot' => array(
'visible' => ($userinfo['change_serversettings'] == '1' ? true : false),
'visible' => $userinfo['change_serversettings'] == '1',
'label' => 'DocumentRoot',
'desc' => $lng['panel']['emptyfordefault'],
'type' => 'text'
@@ -126,7 +129,7 @@ return array(
'desc' => $lng['domains']['ipandport_multi']['description'],
'type' => 'checkbox',
'values' => $ipsandports,
'value' => explode(',', \Froxlor\Settings::Get('system.defaultip')),
'value' => explode(',', Settings::Get('system.defaultip')),
'is_array' => 1,
'mandatory' => true
),
@@ -135,7 +138,7 @@ return array(
'desc' => $lng['admin']['selectserveralias_desc'],
'type' => 'select',
'select_var' => $serveraliasoptions,
'selected' => \Froxlor\Settings::Get('system.domaindefaultalias')
'selected' => Settings::Get('system.domaindefaultalias')
),
'speciallogfile' => array(
'label' => $lng['admin']['speciallogfile']['title'],
@@ -145,7 +148,7 @@ return array(
'checked' => false
),
'specialsettings' => array(
'visible' => ($userinfo['change_serversettings'] == '1' ? true : false),
'visible' => $userinfo['change_serversettings'] == '1',
'label' => $lng['admin']['ownvhostsettings'],
'desc' => $lng['serversettings']['default_vhostconf']['description'],
'type' => 'textarea',
@@ -153,7 +156,7 @@ return array(
'rows' => 12
),
'notryfiles' => array(
'visible' => (\Froxlor\Settings::Get('system.webserver') == 'nginx' && $userinfo['change_serversettings'] == '1'),
'visible' => (Settings::Get('system.webserver') == 'nginx' && $userinfo['change_serversettings'] == '1'),
'label' => $lng['admin']['notryfiles']['title'],
'desc' => $lng['admin']['notryfiles']['description'],
'type' => 'checkbox',
@@ -179,17 +182,17 @@ return array(
'section_bssl' => array(
'title' => $lng['admin']['webserversettings_ssl'],
'image' => 'icons/domain_add.png',
'visible' => \Froxlor\Settings::Get('system.use_ssl') == '1' ? true : false,
'visible' => Settings::Get('system.use_ssl') == '1',
'fields' => array(
'sslenabled' => array(
'visible' => (!empty($ssl_ipsandports) ? true : false),
'visible' => !empty($ssl_ipsandports),
'label' => $lng['admin']['domain_sslenabled'],
'type' => 'checkbox',
'value' => '1',
'checked' => true
),
'no_ssl_available_info' => array(
'visible' => (!empty($ssl_ipsandports) ? true : false),
'visible' => !empty($ssl_ipsandports),
'label' => 'SSL',
'type' => 'label',
'value' => $lng['panel']['nosslipsavailable']
@@ -199,11 +202,11 @@ return array(
'desc' => $lng['domains']['ipandport_ssl_multi']['description'],
'type' => 'checkbox',
'values' => $ssl_ipsandports,
'value' => explode(',', \Froxlor\Settings::Get('system.defaultsslip')),
'value' => explode(',', Settings::Get('system.defaultsslip')),
'is_array' => 1
),
'ssl_redirect' => array(
'visible' => (!empty($ssl_ipsandports) ? true : false),
'visible' => !empty($ssl_ipsandports),
'label' => $lng['domains']['ssl_redirect']['title'],
'desc' => $lng['domains']['ssl_redirect']['description'],
'type' => 'checkbox',
@@ -211,7 +214,7 @@ return array(
'checked' => false
),
'letsencrypt' => array(
'visible' => (\Froxlor\Settings::Get('system.leenabled') == '1' ? (!empty($ssl_ipsandports) ? true : false) : false),
'visible' => (Settings::Get('system.leenabled') == '1' && !empty($ssl_ipsandports)),
'label' => $lng['admin']['letsencrypt']['title'],
'desc' => $lng['admin']['letsencrypt']['description'],
'type' => 'checkbox',
@@ -219,7 +222,7 @@ return array(
'checked' => false
),
'http2' => array(
'visible' => (!empty($ssl_ipsandports) ? true : false) && \Froxlor\Settings::Get('system.webserver') != 'lighttpd' && \Froxlor\Settings::Get('system.http2_support') == '1',
'visible' => !empty($ssl_ipsandports) && Settings::Get('system.webserver') != 'lighttpd' && Settings::Get('system.http2_support') == '1',
'label' => $lng['admin']['domain_http2']['title'],
'desc' => $lng['admin']['domain_http2']['description'],
'type' => 'checkbox',
@@ -227,14 +230,14 @@ return array(
'checked' => false
),
'override_tls' => array(
'visible' => ((!empty($ssl_ipsandports) ? true : false) && $userinfo['change_serversettings'] == '1' ? true : false),
'visible' => !empty($ssl_ipsandports) && $userinfo['change_serversettings'] == '1',
'label' => $lng['admin']['domain_override_tls'],
'type' => 'checkbox',
'value' => '1',
'checked' => false
),
'ssl_protocols' => array(
'visible' => ((!empty($ssl_ipsandports) ? true : false) && $userinfo['change_serversettings'] == '1' && \Froxlor\Settings::Get('system.webserver') != 'lighttpd' ? true : false),
'visible' => !empty($ssl_ipsandports) && $userinfo['change_serversettings'] == '1' && Settings::Get('system.webserver') != 'lighttpd',
'label' => $lng['serversettings']['ssl']['ssl_protocols']['title'],
'desc' => $lng['serversettings']['ssl']['ssl_protocols']['description'],
'type' => 'checkbox',
@@ -262,21 +265,21 @@ return array(
'is_array' => 1
),
'ssl_cipher_list' => array(
'visible' => ((!empty($ssl_ipsandports) ? true : false) && $userinfo['change_serversettings'] == '1' ? true : false),
'visible' => !empty($ssl_ipsandports) && $userinfo['change_serversettings'] == '1',
'label' => $lng['serversettings']['ssl']['ssl_cipher_list']['title'],
'desc' => $lng['serversettings']['ssl']['ssl_cipher_list']['description'],
'type' => 'text',
'value' => \Froxlor\Settings::Get('system.ssl_cipher_list')
'value' => Settings::Get('system.ssl_cipher_list')
),
'tlsv13_cipher_list' => array(
'visible' => ((!empty($ssl_ipsandports) ? true : false) && $userinfo['change_serversettings'] == '1' && \Froxlor\Settings::Get('system.webserver') == "apache2" && \Froxlor\Settings::Get('system.apache24') == 1 ? true : false),
'visible' => !empty($ssl_ipsandports) && $userinfo['change_serversettings'] == '1' && Settings::Get('system.webserver') == "apache2" && Settings::Get('system.apache24') == 1,
'label' => $lng['serversettings']['ssl']['tlsv13_cipher_list']['title'],
'desc' => $lng['serversettings']['ssl']['tlsv13_cipher_list']['description'],
'type' => 'text',
'value' => \Froxlor\Settings::Get('system.tlsv13_cipher_list')
'value' => Settings::Get('system.tlsv13_cipher_list')
),
'ssl_specialsettings' => array(
'visible' => ((!empty($ssl_ipsandports) ? true : false) && $userinfo['change_serversettings'] == '1' ? true : false),
'visible' => !empty($ssl_ipsandports) && $userinfo['change_serversettings'] == '1',
'label' => $lng['admin']['ownsslvhostsettings'],
'desc' => $lng['serversettings']['default_vhostconf']['description'],
'type' => 'textarea',
@@ -284,14 +287,14 @@ return array(
'rows' => 12
),
'include_specialsettings' => array(
'visible' => ((!empty($ssl_ipsandports) ? true : false) && $userinfo['change_serversettings'] == '1' ? true : false),
'visible' => !empty($ssl_ipsandports) && $userinfo['change_serversettings'] == '1',
'label' => $lng['admin']['include_ownvhostsettings'],
'type' => 'checkbox',
'value' => '1',
'checked' => false
),
'hsts_maxage' => array(
'visible' => ($ssl_ipsandports != '' ? true : false),
'visible' => $ssl_ipsandports != '',
'label' => $lng['admin']['domain_hsts_maxage']['title'],
'desc' => $lng['admin']['domain_hsts_maxage']['description'],
'type' => 'number',
@@ -300,7 +303,7 @@ return array(
'value' => 0
),
'hsts_sub' => array(
'visible' => (!empty($ssl_ipsandports) ? true : false),
'visible' => !empty($ssl_ipsandports),
'label' => $lng['admin']['domain_hsts_incsub']['title'],
'desc' => $lng['admin']['domain_hsts_incsub']['description'],
'type' => 'checkbox',
@@ -308,7 +311,7 @@ return array(
'checked' => false
),
'hsts_preload' => array(
'visible' => (!empty($ssl_ipsandports) ? true : false),
'visible' => !empty($ssl_ipsandports),
'label' => $lng['admin']['domain_hsts_preload']['title'],
'desc' => $lng['admin']['domain_hsts_preload']['description'],
'type' => 'checkbox',
@@ -316,22 +319,22 @@ return array(
'checked' => false
),
'ocsp_stapling' => array(
'visible' => (!empty($ssl_ipsandports) ? true : false) && \Froxlor\Settings::Get('system.webserver') != 'lighttpd',
'visible' => !empty($ssl_ipsandports) && Settings::Get('system.webserver') != 'lighttpd',
'label' => $lng['admin']['domain_ocsp_stapling']['title'],
'desc' => $lng['admin']['domain_ocsp_stapling']['description'] . (\Froxlor\Settings::Get('system.webserver') == 'nginx' ? $lng['admin']['domain_ocsp_stapling']['nginx_version_warning'] : ""),
'desc' => $lng['admin']['domain_ocsp_stapling']['description'] . (Settings::Get('system.webserver') == 'nginx' ? $lng['admin']['domain_ocsp_stapling']['nginx_version_warning'] : ""),
'type' => 'checkbox',
'value' => '1',
'checked' => false
),
'honorcipherorder' => array(
'visible' => (!empty($ssl_ipsandports) ? true : false),
'visible' => !empty($ssl_ipsandports),
'label' => $lng['admin']['domain_honorcipherorder'],
'type' => 'checkbox',
'value' => '1',
'checked' => false
),
'sessiontickets' => array(
'visible' => (!empty($ssl_ipsandports) ? true : false) && \Froxlor\Settings::Get('system.webserver') != 'lighttpd' && \Froxlor\Settings::Get('system.sessionticketsenabled' != '1'),
'visible' => !empty($ssl_ipsandports) && Settings::Get('system.webserver') != 'lighttpd' && Settings::Get('system.sessionticketsenabled' != '1'),
'label' => $lng['admin']['domain_sessiontickets'],
'type' => 'checkbox',
'value' => '1',
@@ -342,7 +345,7 @@ return array(
'section_c' => array(
'title' => $lng['admin']['phpserversettings'],
'image' => 'icons/domain_add.png',
'visible' => (($userinfo['change_serversettings'] == '1' || $userinfo['caneditphpsettings'] == '1') ? true : false),
'visible' => $userinfo['change_serversettings'] == '1' || $userinfo['caneditphpsettings'] == '1',
'fields' => array(
'openbasedir' => array(
'label' => 'OpenBasedir',
@@ -357,19 +360,19 @@ return array(
'checked' => true
),
'phpsettingid' => array(
'visible' => (((int) \Froxlor\Settings::Get('system.mod_fcgid') == 1 || (int) \Froxlor\Settings::Get('phpfpm.enabled') == 1) ? true : false),
'visible' => (int) Settings::Get('system.mod_fcgid') == 1 || (int) Settings::Get('phpfpm.enabled') == 1,
'label' => $lng['admin']['phpsettings']['title'],
'type' => 'select',
'select_var' => $phpconfigs,
'selected' => (int) \Froxlor\Settings::Get('phpfpm.enabled') == 1 ? \Froxlor\Settings::Get('phpfpm.defaultini') : \Froxlor\Settings::Get('system.mod_fcgid_defaultini')
'selected' => (int) Settings::Get('phpfpm.enabled') == 1 ? Settings::Get('phpfpm.defaultini') : Settings::Get('system.mod_fcgid_defaultini')
),
'mod_fcgid_starter' => array(
'visible' => ((int) \Froxlor\Settings::Get('system.mod_fcgid') == 1 ? true : false),
'visible' => (int) Settings::Get('system.mod_fcgid') == 1,
'label' => $lng['admin']['mod_fcgid_starter']['title'],
'type' => 'number'
),
'mod_fcgid_maxrequests' => array(
'visible' => ((int) \Froxlor\Settings::Get('system.mod_fcgid') == 1 ? true : false),
'visible' => (int) Settings::Get('system.mod_fcgid') == 1,
'label' => $lng['admin']['mod_fcgid_maxrequests']['title'],
'type' => 'number'
)
@@ -378,7 +381,7 @@ return array(
'section_d' => array(
'title' => $lng['admin']['nameserversettings'],
'image' => 'icons/domain_add.png',
'visible' => (\Froxlor\Settings::Get('system.bind_enable') == '1' && $userinfo['change_serversettings'] == '1' ? true : false),
'visible' => Settings::Get('system.bind_enable') == '1' && $userinfo['change_serversettings'] == '1',
'fields' => array(
'isbinddomain' => array(
'label' => 'Nameserver',

View File

@@ -37,7 +37,7 @@ return array(
'mandatory' => true
),
'adminid' => array(
'visible' => ($userinfo['customers_see_all'] == '1' ? true : false),
'visible' => $userinfo['customers_see_all'] == '1',
'label' => $lng['admin']['admin'],
'type' => (\Froxlor\Settings::Get('panel.allow_domain_change_admin') == '1' ? 'select' : 'infotext'),
'select_var' => (!empty($admins) ? $admins : null),
@@ -46,7 +46,7 @@ return array(
'mandatory' => true
),
'alias' => array(
'visible' => ($alias_check == '0' ? true : false),
'visible' => $alias_check == '0',
'label' => $lng['domains']['aliasdomain'],
'type' => 'select',
'select_var' => $domains,
@@ -116,7 +116,7 @@ return array(
'selected' => $result['subcanemaildomain']
),
'dkim' => array(
'visible' => (\Froxlor\Settings::Get('dkim.use_dkim') == '1' ? true : false),
'visible' => \Froxlor\Settings::Get('dkim.use_dkim') == '1',
'label' => 'DomainKeys',
'type' => 'checkbox',
'value' => '1',
@@ -129,7 +129,7 @@ return array(
'image' => 'icons/domain_edit.png',
'fields' => array(
'documentroot' => array(
'visible' => ($userinfo['change_serversettings'] == '1' ? true : false),
'visible' => $userinfo['change_serversettings'] == '1',
'label' => 'DocumentRoot',
'desc' => $lng['panel']['emptyfordefault'],
'type' => 'text',
@@ -163,7 +163,7 @@ return array(
'value' => '0'
),
'specialsettings' => array(
'visible' => ($userinfo['change_serversettings'] == '1' ? true : false),
'visible' => $userinfo['change_serversettings'] == '1',
'label' => $lng['admin']['ownvhostsettings'],
'desc' => $lng['serversettings']['default_vhostconf']['description'],
'type' => 'textarea',
@@ -172,7 +172,7 @@ return array(
'rows' => 12
),
'specialsettingsforsubdomains' => array(
'visible' => ($userinfo['change_serversettings'] == '1' ? true : false),
'visible' => $userinfo['change_serversettings'] == '1',
'label' => $lng['admin']['specialsettingsforsubdomains'],
'desc' => $lng['serversettings']['specialsettingsforsubdomains']['description'],
'type' => 'checkbox',
@@ -206,17 +206,17 @@ return array(
'section_bssl' => array(
'title' => $lng['admin']['webserversettings_ssl'],
'image' => 'icons/domain_edit.png',
'visible' => \Froxlor\Settings::Get('system.use_ssl') == '1' ? true : false,
'visible' => \Froxlor\Settings::Get('system.use_ssl') == '1',
'fields' => array(
'sslenabled' => array(
'visible' => (!empty($ssl_ipsandports) ? true : false),
'visible' => !empty($ssl_ipsandports),
'label' => $lng['admin']['domain_sslenabled'],
'type' => 'checkbox',
'value' => '1',
'checked' => $result['ssl_enabled']
),
'no_ssl_available_info' => array(
'visible' => (empty($ssl_ipsandports) ? true : false),
'visible' => empty($ssl_ipsandports),
'label' => 'SSL',
'type' => 'label',
'value' => $lng['panel']['nosslipsavailable']
@@ -230,7 +230,7 @@ return array(
'is_array' => 1
),
'ssl_redirect' => array(
'visible' => (!empty($ssl_ipsandports) ? true : false),
'visible' => !empty($ssl_ipsandports),
'label' => $lng['domains']['ssl_redirect']['title'],
'desc' => $lng['domains']['ssl_redirect']['description'] . ($result['temporary_ssl_redirect'] > 1 ? $lng['domains']['ssl_redirect_temporarilydisabled'] : ''),
'type' => 'checkbox',
@@ -238,7 +238,7 @@ return array(
'checked' => $result['ssl_redirect']
),
'letsencrypt' => array(
'visible' => (\Froxlor\Settings::Get('system.leenabled') == '1' ? (!empty($ssl_ipsandports) ? true : false) : false),
'visible' => (\Froxlor\Settings::Get('system.leenabled') == '1' && !empty($ssl_ipsandports)),
'label' => $lng['admin']['letsencrypt']['title'],
'desc' => $lng['admin']['letsencrypt']['description'],
'type' => 'checkbox',
@@ -246,7 +246,7 @@ return array(
'checked' => $result['letsencrypt']
),
'http2' => array(
'visible' => (!empty($ssl_ipsandports) ? true : false) && \Froxlor\Settings::Get('system.webserver') != 'lighttpd' && \Froxlor\Settings::Get('system.http2_support') == '1',
'visible' => !empty($ssl_ipsandports) && \Froxlor\Settings::Get('system.webserver') != 'lighttpd' && \Froxlor\Settings::Get('system.http2_support') == '1',
'label' => $lng['admin']['domain_http2']['title'],
'desc' => $lng['admin']['domain_http2']['description'],
'type' => 'checkbox',
@@ -254,14 +254,14 @@ return array(
'checked' => $result['http2']
),
'override_tls' => array(
'visible' => ((!empty($ssl_ipsandports) ? true : false) && $userinfo['change_serversettings'] == '1' ? true : false),
'visible' => !empty($ssl_ipsandports) && $userinfo['change_serversettings'] == '1',
'label' => $lng['admin']['domain_override_tls'],
'type' => 'checkbox',
'value' => '1',
'checked' => $result['override_tls']
),
'ssl_protocols' => array(
'visible' => ((!empty($ssl_ipsandports) ? true : false) && $userinfo['change_serversettings'] == '1' && \Froxlor\Settings::Get('system.webserver') != 'lighttpd' ? true : false),
'visible' => !empty($ssl_ipsandports) && $userinfo['change_serversettings'] == '1' && \Froxlor\Settings::Get('system.webserver') != 'lighttpd',
'label' => $lng['serversettings']['ssl']['ssl_protocols']['title'],
'desc' => $lng['serversettings']['ssl']['ssl_protocols']['description'],
'type' => 'checkbox',
@@ -287,21 +287,21 @@ return array(
'is_array' => 1
),
'ssl_cipher_list' => array(
'visible' => ((!empty($ssl_ipsandports) ? true : false) && $userinfo['change_serversettings'] == '1' ? true : false),
'visible' => !empty($ssl_ipsandports) && $userinfo['change_serversettings'] == '1',
'label' => $lng['serversettings']['ssl']['ssl_cipher_list']['title'],
'desc' => $lng['serversettings']['ssl']['ssl_cipher_list']['description'],
'type' => 'text',
'value' => !empty($result['ssl_cipher_list']) ? $result['ssl_cipher_list'] : \Froxlor\Settings::Get('system.ssl_cipher_list')
),
'tlsv13_cipher_list' => array(
'visible' => ((!empty($ssl_ipsandports) ? true : false) && $userinfo['change_serversettings'] == '1' && \Froxlor\Settings::Get('system.webserver') == "apache2" && \Froxlor\Settings::Get('system.apache24') == 1 ? true : false),
'visible' => !empty($ssl_ipsandports) && $userinfo['change_serversettings'] == '1' && \Froxlor\Settings::Get('system.webserver') == "apache2" && \Froxlor\Settings::Get('system.apache24') == 1,
'label' => $lng['serversettings']['ssl']['tlsv13_cipher_list']['title'],
'desc' => $lng['serversettings']['ssl']['tlsv13_cipher_list']['description'],
'type' => 'text',
'value' => !empty($result['tlsv13_cipher_list']) ? $result['tlsv13_cipher_list'] : \Froxlor\Settings::Get('system.tlsv13_cipher_list')
),
'ssl_specialsettings' => array(
'visible' => ($userinfo['change_serversettings'] == '1' ? true : false),
'visible' => $userinfo['change_serversettings'] == '1',
'label' => $lng['admin']['ownsslvhostsettings'],
'desc' => $lng['serversettings']['default_vhostconf']['description'],
'type' => 'textarea',
@@ -316,7 +316,7 @@ return array(
'checked' => $result['include_specialsettings']
),
'hsts_maxage' => array(
'visible' => (!empty($ssl_ipsandports) ? true : false),
'visible' => !empty($ssl_ipsandports),
'label' => $lng['admin']['domain_hsts_maxage']['title'],
'desc' => $lng['admin']['domain_hsts_maxage']['description'],
'type' => 'number',
@@ -325,7 +325,7 @@ return array(
'value' => $result['hsts']
),
'hsts_sub' => array(
'visible' => (!empty($ssl_ipsandports) ? true : false),
'visible' => !empty($ssl_ipsandports),
'label' => $lng['admin']['domain_hsts_incsub']['title'],
'desc' => $lng['admin']['domain_hsts_incsub']['description'],
'type' => 'checkbox',
@@ -333,7 +333,7 @@ return array(
'checked' => $result['hsts_sub']
),
'hsts_preload' => array(
'visible' => (!empty($ssl_ipsandports) ? true : false),
'visible' => !empty($ssl_ipsandports),
'label' => $lng['admin']['domain_hsts_preload']['title'],
'desc' => $lng['admin']['domain_hsts_preload']['description'],
'type' => 'checkbox',
@@ -341,7 +341,7 @@ return array(
'checked' => $result['hsts_preload']
),
'ocsp_stapling' => array(
'visible' => (!empty($ssl_ipsandports) ? true : false) && \Froxlor\Settings::Get('system.webserver') != 'lighttpd',
'visible' => !empty($ssl_ipsandports) && \Froxlor\Settings::Get('system.webserver') != 'lighttpd',
'label' => $lng['admin']['domain_ocsp_stapling']['title'],
'desc' => $lng['admin']['domain_ocsp_stapling']['description'] . (\Froxlor\Settings::Get('system.webserver') == 'nginx' ? $lng['admin']['domain_ocsp_stapling']['nginx_version_warning'] : ""),
'type' => 'checkbox',
@@ -349,14 +349,14 @@ return array(
'checked' => $result['ocsp_stapling']
),
'honorcipherorder' => array(
'visible' => (!empty($ssl_ipsandports) ? true : false),
'visible' => !empty($ssl_ipsandports),
'label' => $lng['admin']['domain_honorcipherorder'],
'type' => 'checkbox',
'value' => '1',
'checked' => $result['ssl_honorcipherorder']
),
'sessiontickets' => array(
'visible' => (!empty($ssl_ipsandports) ? true : false) && \Froxlor\Settings::Get('system.webserver') != 'lighttpd' && \Froxlor\Settings::Get('system.sessionticketsenabled' != '1'),
'visible' => !empty($ssl_ipsandports) && \Froxlor\Settings::Get('system.webserver') != 'lighttpd' && \Froxlor\Settings::Get('system.sessionticketsenabled' != '1'),
'label' => $lng['admin']['domain_sessiontickets'],
'type' => 'checkbox',
'value' => '1',
@@ -367,7 +367,7 @@ return array(
'section_c' => array(
'title' => $lng['admin']['phpserversettings'],
'image' => 'icons/domain_edit.png',
'visible' => (($userinfo['change_serversettings'] == '1' || $userinfo['caneditphpsettings'] == '1') ? true : false),
'visible' => $userinfo['change_serversettings'] == '1' || $userinfo['caneditphpsettings'] == '1',
'fields' => array(
'openbasedir' => array(
'label' => 'OpenBasedir',
@@ -382,14 +382,14 @@ return array(
'checked' => $result['phpenabled']
),
'phpsettingid' => array(
'visible' => (((int) \Froxlor\Settings::Get('system.mod_fcgid') == 1 || (int) \Froxlor\Settings::Get('phpfpm.enabled') == 1) ? true : false),
'visible' => (((int) \Froxlor\Settings::Get('system.mod_fcgid') == 1 || (int) \Froxlor\Settings::Get('phpfpm.enabled') == 1)),
'label' => $lng['admin']['phpsettings']['title'],
'type' => 'select',
'select_var' => $phpconfigs,
'selected' => $result['phpsettingid']
),
'phpsettingsforsubdomains' => array(
'visible' => ($userinfo['change_serversettings'] == '1' ? true : false),
'visible' => $userinfo['change_serversettings'] == '1',
'label' => $lng['admin']['phpsettingsforsubdomains'],
'desc' => $lng['serversettings']['phpsettingsforsubdomains']['description'],
'type' => 'checkbox',
@@ -397,13 +397,13 @@ return array(
'checked' => \Froxlor\Settings::Get('system.apply_phpconfigs_default') == 1 ? '1' : '0'
),
'mod_fcgid_starter' => array(
'visible' => ((int) \Froxlor\Settings::Get('system.mod_fcgid') == 1 ? true : false),
'visible' => (int) \Froxlor\Settings::Get('system.mod_fcgid') == 1,
'label' => $lng['admin']['mod_fcgid_starter']['title'],
'type' => 'number',
'value' => ((int) $result['mod_fcgid_starter'] != -1 ? $result['mod_fcgid_starter'] : '')
),
'mod_fcgid_maxrequests' => array(
'visible' => ((int) \Froxlor\Settings::Get('system.mod_fcgid') == 1 ? true : false),
'visible' => (int) \Froxlor\Settings::Get('system.mod_fcgid') == 1,
'label' => $lng['admin']['mod_fcgid_maxrequests']['title'],
'type' => 'number',
'value' => ((int) $result['mod_fcgid_maxrequests'] != -1 ? $result['mod_fcgid_maxrequests'] : '')
@@ -413,7 +413,7 @@ return array(
'section_d' => array(
'title' => $lng['admin']['nameserversettings'],
'image' => 'icons/domain_edit.png',
'visible' => (\Froxlor\Settings::Get('system.bind_enable') == '1' && $userinfo['change_serversettings'] == '1' ? true : false),
'visible' => \Froxlor\Settings::Get('system.bind_enable') == '1' && $userinfo['change_serversettings'] == '1',
'fields' => array(
'isbinddomain' => array(
'label' => 'Nameserver',

View File

@@ -54,7 +54,7 @@ return array(
'label' => $lng['admin']['ipsandports']['create_namevirtualhost_statement'],
'type' => 'checkbox',
'value' => '1',
'checked' => \Froxlor\Settings::Get('system.webserver') == 'apache2' && (int) \Froxlor\Settings::Get('system.apache24') == 0 ? true : false
'checked' => \Froxlor\Settings::Get('system.webserver') == 'apache2' && (int) \Froxlor\Settings::Get('system.apache24') == 0
),
'vhostcontainer' => array(
'label' => $lng['admin']['ipsandports']['create_vhostcontainer'],
@@ -95,7 +95,7 @@ return array(
'rows' => 12
),
'ssl_default_vhostconf_domain' => array(
'visible' => (\Froxlor\Settings::Get('system.use_ssl') == 1 ? true : false),
'visible' => \Froxlor\Settings::Get('system.use_ssl') == 1,
'label' => $lng['admin']['ipsandports']['ssl_default_vhostconf_domain'],
'desc' => $lng['serversettings']['default_vhostconf_domain']['description'],
'type' => 'textarea',
@@ -113,7 +113,7 @@ return array(
'section_d' => array(
'title' => $lng['admin']['ipsandports']['webserverssldomainconfig'],
'image' => 'icons/ipsports_add.png',
'visible' => (\Froxlor\Settings::Get('system.use_ssl') == 1 ? true : false),
'visible' => \Froxlor\Settings::Get('system.use_ssl') == 1,
'fields' => array(
'ssl' => array(
'label' => $lng['admin']['ipsandports']['enable_ssl'],

View File

@@ -99,7 +99,7 @@ return array(
'value' => $result['default_vhostconf_domain']
),
'ssl_default_vhostconf_domain' => array(
'visible' => (\Froxlor\Settings::Get('system.use_ssl') == 1 ? true : false),
'visible' => \Froxlor\Settings::Get('system.use_ssl') == 1,
'label' => $lng['admin']['ipsandports']['ssl_default_vhostconf_domain'],
'desc' => $lng['serversettings']['default_vhostconf_domain']['description'],
'type' => 'textarea',
@@ -118,7 +118,7 @@ return array(
'section_d' => array(
'title' => $lng['admin']['ipsandports']['webserverssldomainconfig'],
'image' => 'icons/ipsports_edit.png',
'visible' => (\Froxlor\Settings::Get('system.use_ssl') == 1 ? true : false),
'visible' => \Froxlor\Settings::Get('system.use_ssl') == 1,
'fields' => array(
'ssl' => array(
'label' => $lng['admin']['ipsandports']['enable_ssl'],

View File

@@ -29,21 +29,21 @@ return array(
'maxlength' => 50
),
'binary' => array(
'visible' => (\Froxlor\Settings::Get('system.mod_fcgid') == 1 ? true : false),
'visible' => \Froxlor\Settings::Get('system.mod_fcgid') == 1,
'label' => $lng['admin']['phpsettings']['binary'],
'type' => 'text',
'maxlength' => 255,
'value' => '/usr/bin/php-cgi'
),
'fpmconfig' => array(
'visible' => (\Froxlor\Settings::Get('phpfpm.enabled') == 1 ? true : false),
'visible' => \Froxlor\Settings::Get('phpfpm.enabled') == 1,
'label' => $lng['admin']['phpsettings']['fpmdesc'],
'type' => 'select',
'select_var' => $fpmconfigs,
'selected' => 1
),
'file_extensions' => array(
'visible' => (\Froxlor\Settings::Get('system.mod_fcgid') == 1 ? true : false),
'visible' => \Froxlor\Settings::Get('system.mod_fcgid') == 1,
'label' => $lng['admin']['phpsettings']['file_extensions'],
'desc' => $lng['admin']['phpsettings']['file_extensions_note'],
'type' => 'text',
@@ -51,59 +51,59 @@ return array(
'value' => 'php'
),
'mod_fcgid_starter' => array(
'visible' => (\Froxlor\Settings::Get('system.mod_fcgid') == 1 ? true : false),
'visible' => \Froxlor\Settings::Get('system.mod_fcgid') == 1,
'label' => $lng['admin']['mod_fcgid_starter']['title'],
'type' => 'number'
),
'mod_fcgid_maxrequests' => array(
'visible' => (\Froxlor\Settings::Get('system.mod_fcgid') == 1 ? true : false),
'visible' => \Froxlor\Settings::Get('system.mod_fcgid') == 1,
'label' => $lng['admin']['mod_fcgid_maxrequests']['title'],
'type' => 'number'
),
'mod_fcgid_umask' => array(
'visible' => (\Froxlor\Settings::Get('system.mod_fcgid') == 1 ? true : false),
'visible' => \Froxlor\Settings::Get('system.mod_fcgid') == 1,
'label' => $lng['admin']['mod_fcgid_umask']['title'],
'type' => 'text',
'maxlength' => 3,
'value' => '022'
),
'phpfpm_enable_slowlog' => array(
'visible' => (\Froxlor\Settings::Get('phpfpm.enabled') == 1 ? true : false),
'visible' => \Froxlor\Settings::Get('phpfpm.enabled') == 1,
'label' => $lng['admin']['phpsettings']['enable_slowlog'],
'type' => 'checkbox',
'value' => '1',
'checked' => false
),
'phpfpm_reqtermtimeout' => array(
'visible' => (\Froxlor\Settings::Get('phpfpm.enabled') == 1 ? true : false),
'visible' => \Froxlor\Settings::Get('phpfpm.enabled') == 1,
'label' => $lng['admin']['phpsettings']['request_terminate_timeout'],
'type' => 'text',
'maxlength' => 10,
'value' => '60s'
),
'phpfpm_reqslowtimeout' => array(
'visible' => (\Froxlor\Settings::Get('phpfpm.enabled') == 1 ? true : false),
'visible' => \Froxlor\Settings::Get('phpfpm.enabled') == 1,
'label' => $lng['admin']['phpsettings']['request_slowlog_timeout'],
'type' => 'text',
'maxlength' => 10,
'value' => '5s'
),
'phpfpm_pass_authorizationheader' => array(
'visible' => (\Froxlor\Settings::Get('phpfpm.enabled') == 1 ? true : false),
'visible' => \Froxlor\Settings::Get('phpfpm.enabled') == 1,
'label' => $lng['admin']['phpsettings']['pass_authorizationheader'],
'type' => 'checkbox',
'value' => '1',
'checked' => false
),
'override_fpmconfig' => array(
'visible' => (\Froxlor\Settings::Get('phpfpm.enabled') == 1 ? true : false),
'visible' => \Froxlor\Settings::Get('phpfpm.enabled') == 1,
'label' => $lng['serversettings']['phpfpm_settings']['override_fpmconfig'],
'type' => 'checkbox',
'value' => '1',
'checked' => false
),
'pm' => array(
'visible' => (\Froxlor\Settings::Get('phpfpm.enabled') == 1 ? true : false),
'visible' => \Froxlor\Settings::Get('phpfpm.enabled') == 1,
'label' => $lng['serversettings']['phpfpm_settings']['pm'],
'desc' => $lng['serversettings']['phpfpm_settings']['override_fpmconfig_addinfo'],
'type' => 'select',
@@ -114,49 +114,49 @@ return array(
]
),
'max_children' => array(
'visible' => (\Froxlor\Settings::Get('phpfpm.enabled') == 1 ? true : false),
'visible' => \Froxlor\Settings::Get('phpfpm.enabled') == 1,
'label' => $lng['serversettings']['phpfpm_settings']['max_children']['title'],
'desc' => $lng['serversettings']['phpfpm_settings']['max_children']['description'] . $lng['serversettings']['phpfpm_settings']['override_fpmconfig_addinfo'],
'type' => 'number',
'value' => 1
),
'start_servers' => array(
'visible' => (\Froxlor\Settings::Get('phpfpm.enabled') == 1 ? true : false),
'visible' => \Froxlor\Settings::Get('phpfpm.enabled') == 1,
'label' => $lng['serversettings']['phpfpm_settings']['start_servers']['title'],
'desc' => $lng['serversettings']['phpfpm_settings']['start_servers']['description'] . $lng['serversettings']['phpfpm_settings']['override_fpmconfig_addinfo'],
'type' => 'number',
'value' => 20
),
'min_spare_servers' => array(
'visible' => (\Froxlor\Settings::Get('phpfpm.enabled') == 1 ? true : false),
'visible' => \Froxlor\Settings::Get('phpfpm.enabled') == 1,
'label' => $lng['serversettings']['phpfpm_settings']['min_spare_servers']['title'],
'desc' => $lng['serversettings']['phpfpm_settings']['min_spare_servers']['description'] . $lng['serversettings']['phpfpm_settings']['override_fpmconfig_addinfo'],
'type' => 'number',
'value' => 5
),
'max_spare_servers' => array(
'visible' => (\Froxlor\Settings::Get('phpfpm.enabled') == 1 ? true : false),
'visible' => \Froxlor\Settings::Get('phpfpm.enabled') == 1,
'label' => $lng['serversettings']['phpfpm_settings']['max_spare_servers']['title'],
'desc' => $lng['serversettings']['phpfpm_settings']['max_spare_servers']['description'] . $lng['serversettings']['phpfpm_settings']['override_fpmconfig_addinfo'],
'type' => 'number',
'value' => 35
),
'max_requests' => array(
'visible' => (\Froxlor\Settings::Get('phpfpm.enabled') == 1 ? true : false),
'visible' => \Froxlor\Settings::Get('phpfpm.enabled') == 1,
'label' => $lng['serversettings']['phpfpm_settings']['max_requests']['title'],
'desc' => $lng['serversettings']['phpfpm_settings']['max_requests']['description'] . $lng['serversettings']['phpfpm_settings']['override_fpmconfig_addinfo'],
'type' => 'number',
'value' => 0
),
'idle_timeout' => array(
'visible' => (\Froxlor\Settings::Get('phpfpm.enabled') == 1 ? true : false),
'visible' => \Froxlor\Settings::Get('phpfpm.enabled') == 1,
'label' => $lng['serversettings']['phpfpm_settings']['idle_timeout']['title'],
'desc' => $lng['serversettings']['phpfpm_settings']['idle_timeout']['description'] . $lng['serversettings']['phpfpm_settings']['override_fpmconfig_addinfo'],
'type' => 'number',
'value' => 10
),
'limit_extensions' => array(
'visible' => (\Froxlor\Settings::Get('phpfpm.enabled') == 1 ? true : false),
'visible' => \Froxlor\Settings::Get('phpfpm.enabled') == 1,
'label' => $lng['serversettings']['phpfpm_settings']['limit_extensions']['title'],
'desc' => $lng['serversettings']['phpfpm_settings']['limit_extensions']['description'] . $lng['serversettings']['phpfpm_settings']['override_fpmconfig_addinfo'],
'type' => 'text',

View File

@@ -30,21 +30,21 @@ return array(
'value' => $result['description']
),
'binary' => array(
'visible' => (\Froxlor\Settings::Get('system.mod_fcgid') == 1 ? true : false),
'visible' => \Froxlor\Settings::Get('system.mod_fcgid') == 1,
'label' => $lng['admin']['phpsettings']['binary'],
'type' => 'text',
'maxlength' => 255,
'value' => $result['binary']
),
'fpmconfig' => array(
'visible' => (\Froxlor\Settings::Get('phpfpm.enabled') == 1 ? true : false),
'visible' => \Froxlor\Settings::Get('phpfpm.enabled') == 1,
'label' => $lng['admin']['phpsettings']['fpmdesc'],
'type' => 'select',
'select_var' => $fpmconfigs,
'selected' => $result['fpmsettingid']
),
'file_extensions' => array(
'visible' => (\Froxlor\Settings::Get('system.mod_fcgid') == 1 ? true : false),
'visible' => \Froxlor\Settings::Get('system.mod_fcgid') == 1,
'label' => $lng['admin']['phpsettings']['file_extensions'],
'desc' => $lng['admin']['phpsettings']['file_extensions_note'],
'type' => 'text',
@@ -52,47 +52,47 @@ return array(
'value' => $result['file_extensions']
),
'mod_fcgid_starter' => array(
'visible' => (\Froxlor\Settings::Get('system.mod_fcgid') == 1 ? true : false),
'visible' => \Froxlor\Settings::Get('system.mod_fcgid') == 1,
'label' => $lng['admin']['mod_fcgid_starter']['title'],
'type' => 'number',
'value' => ((int) $result['mod_fcgid_starter'] != -1 ? $result['mod_fcgid_starter'] : '')
),
'mod_fcgid_maxrequests' => array(
'visible' => (\Froxlor\Settings::Get('system.mod_fcgid') == 1 ? true : false),
'visible' => \Froxlor\Settings::Get('system.mod_fcgid') == 1,
'label' => $lng['admin']['mod_fcgid_maxrequests']['title'],
'type' => 'number',
'value' => ((int) $result['mod_fcgid_maxrequests'] != -1 ? $result['mod_fcgid_maxrequests'] : '')
),
'mod_fcgid_umask' => array(
'visible' => (\Froxlor\Settings::Get('system.mod_fcgid') == 1 ? true : false),
'visible' => \Froxlor\Settings::Get('system.mod_fcgid') == 1,
'label' => $lng['admin']['mod_fcgid_umask']['title'],
'type' => 'text',
'maxlength' => 3,
'value' => $result['mod_fcgid_umask']
),
'phpfpm_enable_slowlog' => array(
'visible' => (\Froxlor\Settings::Get('phpfpm.enabled') == 1 ? true : false),
'visible' => \Froxlor\Settings::Get('phpfpm.enabled') == 1,
'label' => $lng['admin']['phpsettings']['enable_slowlog'],
'type' => 'checkbox',
'value' => '1',
'checked' => $result['fpm_slowlog']
),
'phpfpm_reqtermtimeout' => array(
'visible' => (\Froxlor\Settings::Get('phpfpm.enabled') == 1 ? true : false),
'visible' => \Froxlor\Settings::Get('phpfpm.enabled') == 1,
'label' => $lng['admin']['phpsettings']['request_terminate_timeout'],
'type' => 'text',
'maxlength' => 10,
'value' => $result['fpm_reqterm']
),
'phpfpm_reqslowtimeout' => array(
'visible' => (\Froxlor\Settings::Get('phpfpm.enabled') == 1 ? true : false),
'visible' => \Froxlor\Settings::Get('phpfpm.enabled') == 1,
'label' => $lng['admin']['phpsettings']['request_slowlog_timeout'],
'type' => 'text',
'maxlength' => 10,
'value' => $result['fpm_reqslow']
),
'phpfpm_pass_authorizationheader' => array(
'visible' => (\Froxlor\Settings::Get('phpfpm.enabled') == 1 ? true : false),
'visible' => \Froxlor\Settings::Get('phpfpm.enabled') == 1,
'label' => $lng['admin']['phpsettings']['pass_authorizationheader'],
'type' => 'checkbox',
'value' => '1',
@@ -105,7 +105,7 @@ return array(
'checked' => $result['override_fpmconfig']
),
'pm' => array(
'visible' => (\Froxlor\Settings::Get('phpfpm.enabled') == 1 ? true : false),
'visible' => \Froxlor\Settings::Get('phpfpm.enabled') == 1,
'label' => $lng['serversettings']['phpfpm_settings']['pm'],
'desc' => $lng['serversettings']['phpfpm_settings']['override_fpmconfig_addinfo'],
'type' => 'select',
@@ -117,49 +117,49 @@ return array(
'selected' => $result['pm']
),
'max_children' => array(
'visible' => (\Froxlor\Settings::Get('phpfpm.enabled') == 1 ? true : false),
'visible' => \Froxlor\Settings::Get('phpfpm.enabled') == 1,
'label' => $lng['serversettings']['phpfpm_settings']['max_children']['title'],
'desc' => $lng['serversettings']['phpfpm_settings']['max_children']['description'] . $lng['serversettings']['phpfpm_settings']['override_fpmconfig_addinfo'],
'type' => 'number',
'value' => $result['max_children']
),
'start_servers' => array(
'visible' => (\Froxlor\Settings::Get('phpfpm.enabled') == 1 ? true : false),
'visible' => \Froxlor\Settings::Get('phpfpm.enabled') == 1,
'label' => $lng['serversettings']['phpfpm_settings']['start_servers']['title'],
'desc' => $lng['serversettings']['phpfpm_settings']['start_servers']['description'] . $lng['serversettings']['phpfpm_settings']['override_fpmconfig_addinfo'],
'type' => 'number',
'value' => $result['start_servers']
),
'min_spare_servers' => array(
'visible' => (\Froxlor\Settings::Get('phpfpm.enabled') == 1 ? true : false),
'visible' => \Froxlor\Settings::Get('phpfpm.enabled') == 1,
'label' => $lng['serversettings']['phpfpm_settings']['min_spare_servers']['title'],
'desc' => $lng['serversettings']['phpfpm_settings']['min_spare_servers']['description'] . $lng['serversettings']['phpfpm_settings']['override_fpmconfig_addinfo'],
'type' => 'number',
'value' => $result['min_spare_servers']
),
'max_spare_servers' => array(
'visible' => (\Froxlor\Settings::Get('phpfpm.enabled') == 1 ? true : false),
'visible' => \Froxlor\Settings::Get('phpfpm.enabled') == 1,
'label' => $lng['serversettings']['phpfpm_settings']['max_spare_servers']['title'],
'desc' => $lng['serversettings']['phpfpm_settings']['max_spare_servers']['description'] . $lng['serversettings']['phpfpm_settings']['override_fpmconfig_addinfo'],
'type' => 'number',
'value' => $result['max_spare_servers']
),
'max_requests' => array(
'visible' => (\Froxlor\Settings::Get('phpfpm.enabled') == 1 ? true : false),
'visible' => \Froxlor\Settings::Get('phpfpm.enabled') == 1,
'label' => $lng['serversettings']['phpfpm_settings']['max_requests']['title'],
'desc' => $lng['serversettings']['phpfpm_settings']['max_requests']['description'] . $lng['serversettings']['phpfpm_settings']['override_fpmconfig_addinfo'],
'type' => 'number',
'value' => $result['max_requests']
),
'idle_timeout' => array(
'visible' => (\Froxlor\Settings::Get('phpfpm.enabled') == 1 ? true : false),
'visible' => \Froxlor\Settings::Get('phpfpm.enabled') == 1,
'label' => $lng['serversettings']['phpfpm_settings']['idle_timeout']['title'],
'desc' => $lng['serversettings']['phpfpm_settings']['idle_timeout']['description'] . $lng['serversettings']['phpfpm_settings']['override_fpmconfig_addinfo'],
'type' => 'number',
'value' => $result['idle_timeout']
),
'limit_extensions' => array(
'visible' => (\Froxlor\Settings::Get('phpfpm.enabled') == 1 ? true : false),
'visible' => \Froxlor\Settings::Get('phpfpm.enabled') == 1,
'label' => $lng['serversettings']['phpfpm_settings']['limit_extensions']['title'],
'desc' => $lng['serversettings']['phpfpm_settings']['limit_extensions']['description'] . $lng['serversettings']['phpfpm_settings']['override_fpmconfig_addinfo'],
'type' => 'text',

View File

@@ -51,12 +51,12 @@ return array(
'note' => $pathSelect['note'] ?? '',
),
'url' => array(
'visible' => (Settings::Get('panel.pathedit') == 'Dropdown' ? true : false),
'visible' => Settings::Get('panel.pathedit') == 'Dropdown',
'label' => $lng['panel']['urloverridespath'],
'type' => 'text'
),
'redirectcode' => array(
'visible' => (Settings::Get('customredirect.enabled') == '1' ? true : false),
'visible' => Settings::Get('customredirect.enabled') == '1',
'label' => $lng['domains']['redirectifpathisurl'],
'desc' => $lng['domains']['redirectifpathisurlinfo'],
'type' => 'select',
@@ -74,7 +74,7 @@ return array(
'select_var' => $openbasedir
),
'phpsettingid' => array(
'visible' => (((int) Settings::Get('system.mod_fcgid') == 1 || (int) Settings::Get('phpfpm.enabled') == 1) && count($phpconfigs) > 0 ? true : false),
'visible' => ((int) Settings::Get('system.mod_fcgid') == 1 || (int) Settings::Get('phpfpm.enabled') == 1) && count($phpconfigs) > 0,
'label' => $lng['admin']['phpsettings']['title'],
'type' => 'select',
'select_var' => $phpconfigs,
@@ -85,7 +85,7 @@ return array(
'section_bssl' => array(
'title' => $lng['admin']['webserversettings_ssl'],
'image' => 'icons/domain_add.png',
'visible' => Settings::Get('system.use_ssl') == '1' ? ($ssl_ipsandports ? true : false) : false,
'visible' => Settings::Get('system.use_ssl') == '1' && $ssl_ipsandports,
'fields' => array(
'sslenabled' => array(
'label' => $lng['admin']['domain_sslenabled'],
@@ -101,7 +101,7 @@ return array(
'checked' => false
),
'letsencrypt' => array(
'visible' => (Settings::Get('system.leenabled') == '1' ? true : false),
'visible' => Settings::Get('system.leenabled') == '1',
'label' => $lng['customer']['letsencrypt']['title'],
'desc' => $lng['customer']['letsencrypt']['description'],
'type' => 'checkbox',
@@ -109,7 +109,7 @@ return array(
'checked' => false
),
'http2' => array(
'visible' => ($ssl_ipsandports ? true : false) && Settings::Get('system.webserver') != 'lighttpd' && Settings::Get('system.http2_support') == '1',
'visible' => $ssl_ipsandports && Settings::Get('system.webserver') != 'lighttpd' && Settings::Get('system.http2_support') == '1',
'label' => $lng['admin']['domain_http2']['title'],
'desc' => $lng['admin']['domain_http2']['description'],
'type' => 'checkbox',

View File

@@ -34,7 +34,7 @@ return array(
'values' => $domainips
),
'alias' => array(
'visible' => ($alias_check == '0' ? true : false),
'visible' => $alias_check == '0',
'label' => $lng['domains']['aliasdomain'],
'type' => 'select',
'select_var' => $domains,
@@ -48,13 +48,13 @@ return array(
'selected' => $pathSelect['value']
),
'url' => array(
'visible' => (\Froxlor\Settings::Get('panel.pathedit') == 'Dropdown' ? true : false),
'visible' => \Froxlor\Settings::Get('panel.pathedit') == 'Dropdown',
'label' => $lng['panel']['urloverridespath'],
'type' => 'text',
'value' => $urlvalue
),
'redirectcode' => array(
'visible' => (\Froxlor\Settings::Get('customredirect.enabled') == '1' ? true : false),
'visible' => \Froxlor\Settings::Get('customredirect.enabled') == '1',
'label' => $lng['domains']['redirectifpathisurl'],
'desc' => $lng['domains']['redirectifpathisurlinfo'],
'type' => 'select',
@@ -62,7 +62,7 @@ return array(
'selected' => $def_code
),
'selectserveralias' => array(
'visible' => ((($result['parentdomainid'] == '0' && $userinfo['subdomains'] != '0') || $result['parentdomainid'] != '0') ? true : false),
'visible' => ($result['parentdomainid'] == '0' && $userinfo['subdomains'] != '0') || $result['parentdomainid'] != '0',
'label' => $lng['admin']['selectserveralias'],
'desc' => $lng['admin']['selectserveralias_desc'],
'type' => 'select',
@@ -70,21 +70,21 @@ return array(
'selected' => $serveraliasoptions_selected
),
'isemaildomain' => array(
'visible' => ((($result['subcanemaildomain'] == '1' || $result['subcanemaildomain'] == '2') && $result['parentdomainid'] != '0') ? true : false),
'visible' => ($result['subcanemaildomain'] == '1' || $result['subcanemaildomain'] == '2') && $result['parentdomainid'] != '0',
'label' => 'Emaildomain',
'type' => 'checkbox',
'value' => '1',
'checked' => $result['isemaildomain']
),
'openbasedir_path' => array(
'visible' => ($result['openbasedir'] == '1') ? true : false,
'visible' => $result['openbasedir'] == '1',
'label' => $lng['domain']['openbasedirpath'],
'type' => 'select',
'select_var' => $openbasedir,
'selected' => $result['openbasedir_path']
),
'phpsettingid' => array(
'visible' => (((int) \Froxlor\Settings::Get('system.mod_fcgid') == 1 || (int) \Froxlor\Settings::Get('phpfpm.enabled') == 1) && count($phpconfigs) > 0 ? true : false),
'visible' => ((int) \Froxlor\Settings::Get('system.mod_fcgid') == 1 || (int) \Froxlor\Settings::Get('phpfpm.enabled') == 1) && count($phpconfigs) > 0,
'label' => $lng['admin']['phpsettings']['title'],
'type' => 'select',
'select_var' => $phpconfigs,
@@ -95,7 +95,7 @@ return array(
'section_bssl' => array(
'title' => $lng['admin']['webserversettings_ssl'],
'image' => 'icons/domain_edit.png',
'visible' => \Froxlor\Settings::Get('system.use_ssl') == '1' ? ($ssl_ipsandports ? (\Froxlor\Domain\Domain::domainHasSslIpPort($result['id']) ? true : false) : false) : false,
'visible' => \Froxlor\Settings::Get('system.use_ssl') == '1' && $ssl_ipsandports && \Froxlor\Domain\Domain::domainHasSslIpPort($result['id']),
'fields' => array(
'sslenabled' => array(
'label' => $lng['admin']['domain_sslenabled'],
@@ -111,7 +111,7 @@ return array(
'checked' => $result['ssl_redirect']
),
'letsencrypt' => array(
'visible' => \Froxlor\Settings::Get('system.leenabled') == '1' ? true : false,
'visible' => \Froxlor\Settings::Get('system.leenabled') == '1',
'label' => $lng['customer']['letsencrypt']['title'],
'desc' => $lng['customer']['letsencrypt']['description'],
'type' => 'checkbox',
@@ -119,7 +119,7 @@ return array(
'checked' => $result['letsencrypt']
),
'http2' => array(
'visible' => ($ssl_ipsandports ? true : false) && \Froxlor\Settings::Get('system.webserver') != 'lighttpd' && \Froxlor\Settings::Get('system.http2_support') == '1',
'visible' => $ssl_ipsandports && \Froxlor\Settings::Get('system.webserver') != 'lighttpd' && \Froxlor\Settings::Get('system.http2_support') == '1',
'label' => $lng['admin']['domain_http2']['title'],
'desc' => $lng['admin']['domain_http2']['description'],
'type' => 'checkbox',

View File

@@ -43,14 +43,14 @@ return array(
]
),
'email_quota' => array(
'visible' => (\Froxlor\Settings::Get('system.mail_quota_enabled') == '1' ? true : false),
'visible' => \Froxlor\Settings::Get('system.mail_quota_enabled') == '1',
'label' => $lng['emails']['quota'],
'desc' => "MiB",
'type' => 'number',
'value' => $quota
),
'alternative_email' => array(
'visible' => (\Froxlor\Settings::Get('panel.sendalternativemail') == '1' ? true : false),
'visible' => \Froxlor\Settings::Get('panel.sendalternativemail') == '1',
'label' => $lng['emails']['alternative_emailaddress'],
'type' => 'text'
)

View File

@@ -30,7 +30,7 @@ return array(
'value' => $result['email_full']
),
'account_yes' => array(
'visible' => ((int) $result['popaccountid'] != 0 ? true : false),
'visible' => (int) $result['popaccountid'] != 0,
'label' => $lng['emails']['account'],
'type' => 'label',
'value' => $lng['panel']['yes'],
@@ -50,7 +50,7 @@ return array(
]
),
'account_no' => array(
'visible' => ((int) $result['popaccountid'] == 0 ? true : false),
'visible' => (int) $result['popaccountid'] == 0,
'label' => $lng['emails']['account'],
'type' => 'label',
'value' => $lng['panel']['no'],

View File

@@ -23,7 +23,7 @@ return array(
'image' => 'icons/user_add.png',
'fields' => array(
'ftp_username' => array(
'visible' => (\Froxlor\Settings::Get('customer.ftpatdomain') == '1' ? true : false),
'visible' => \Froxlor\Settings::Get('customer.ftpatdomain') == '1',
'label' => $lng['login']['username'],
'type' => 'text',
'next_to' => (\Froxlor\Settings::Get('customer.ftpatdomain') == '1' && count($domainlist) > 0 ? [
@@ -66,7 +66,7 @@ return array(
'checked' => false
),
'shell' => array(
'visible' => (\Froxlor\Settings::Get('system.allow_customer_shell') == '1' ? true : false),
'visible' => \Froxlor\Settings::Get('system.allow_customer_shell') == '1',
'label' => $lng['panel']['shell'],
'type' => 'select',
'select_var' => $shells_avail,

View File

@@ -53,7 +53,7 @@ return array(
'value' => \Froxlor\System\Crypt::generatePassword()
),
'shell' => array(
'visible' => (\Froxlor\Settings::Get('system.allow_customer_shell') == '1' ? true : false),
'visible' => \Froxlor\Settings::Get('system.allow_customer_shell') == '1',
'label' => $lng['panel']['shell'],
'type' => 'select',
'select_var' => $shells_avail,

View File

@@ -25,7 +25,7 @@ return array(
'image' => 'icons/mysql_add.png',
'fields' => array(
'custom_suffix' => array(
'visible' => (strtoupper(Settings::Get('customer.mysqlprefix')) == 'DBNAME') ? true : false,
'visible' => strtoupper(Settings::Get('customer.mysqlprefix')) == 'DBNAME',
'label' => $lng['mysql']['databasename'],
'type' => 'text'
),
@@ -34,7 +34,7 @@ return array(
'type' => 'text'
),
'mysql_server' => array(
'visible' => (count($mysql_servers) > 1 ? true : false),
'visible' => count($mysql_servers) > 1,
'label' => $lng['mysql']['mysql_server'],
'type' => 'select',
'select_var' => $mysql_servers

View File

@@ -33,7 +33,7 @@ return array(
'value' => $result['description']
),
'mysql_server' => array(
'visible' => ($count_mysql_servers > 1 ? true : false),
'visible' => $count_mysql_servers > 1,
'label' => $lng['mysql']['mysql_server'],
'type' => 'label',
'value' => $sql_root['caption']