refactor global array

Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann
2018-12-21 20:51:44 +01:00
parent c5a58e3f36
commit 370ccbdb74
220 changed files with 2227 additions and 2244 deletions

View File

@@ -16,11 +16,11 @@
*/
return array(
'domain_edit' => array(
'title' => $lng['admin']['domain_edit'],
'title' => \Froxlor\I18N\Lang::getAll()['admin']['domain_edit'],
'image' => 'icons/domain_edit.png',
'sections' => array(
'section_a' => array(
'title' => $lng['domains']['domainsettings'],
'title' => \Froxlor\I18N\Lang::getAll()['domains']['domainsettings'],
'image' => 'icons/domain_edit.png',
'fields' => array(
'domain' => array(
@@ -30,7 +30,7 @@ return array(
'mandatory' => true
),
'customerid' => array(
'label' => $lng['admin']['customer'],
'label' => \Froxlor\I18N\Lang::getAll()['admin']['customer'],
'type' => (\Froxlor\Settings::Get('panel.allow_domain_change_customer') == '1' ? 'select' : 'label'),
'select_var' => (isset($customers) ? $customers : null),
'value' => (isset($result['customername']) ? $result['customername'] : null),
@@ -38,7 +38,7 @@ return array(
),
'adminid' => array(
'visible' => (\Froxlor\User::getAll()['customers_see_all'] == '1' ? true : false),
'label' => $lng['admin']['admin'],
'label' => \Froxlor\I18N\Lang::getAll()['admin']['admin'],
'type' => (\Froxlor\Settings::Get('panel.allow_domain_change_admin') == '1' ? 'select' : 'label'),
'select_var' => (isset($admins) ? $admins : null),
'value' => (isset($result['adminname']) ? $result['adminname'] : null),
@@ -46,28 +46,28 @@ return array(
),
'alias' => array(
'visible' => ($alias_check == '0' ? true : false),
'label' => $lng['domains']['aliasdomain'],
'label' => \Froxlor\I18N\Lang::getAll()['domains']['aliasdomain'],
'type' => 'select',
'select_var' => $domains
),
'issubof' => array(
'label' => $lng['domains']['issubof'],
'desc' => $lng['domains']['issubofinfo'],
'label' => \Froxlor\I18N\Lang::getAll()['domains']['issubof'],
'desc' => \Froxlor\I18N\Lang::getAll()['domains']['issubofinfo'],
'type' => 'select',
'select_var' => $subtodomains
),
'associated_info' => array(
'label' => $lng['domains']['associated_with_domain'],
'label' => \Froxlor\I18N\Lang::getAll()['domains']['associated_with_domain'],
'type' => 'label',
'value' => $subdomains . ' ' . $lng['customer']['subdomains'] . ', ' . $alias_check . ' ' . $lng['domains']['aliasdomains'] . ', ' . $emails . ' ' . $lng['customer']['emails'] . ', ' . $email_accounts . ' ' . $lng['customer']['accounts'] . ', ' . $email_forwarders . ' ' . $lng['customer']['forwarders']
'value' => $subdomains . ' ' . \Froxlor\I18N\Lang::getAll()['customer']['subdomains'] . ', ' . $alias_check . ' ' . \Froxlor\I18N\Lang::getAll()['domains']['aliasdomains'] . ', ' . $emails . ' ' . \Froxlor\I18N\Lang::getAll()['customer']['emails'] . ', ' . $email_accounts . ' ' . \Froxlor\I18N\Lang::getAll()['customer']['accounts'] . ', ' . $email_forwarders . ' ' . \Froxlor\I18N\Lang::getAll()['customer']['forwarders']
),
'caneditdomain' => array(
'label' => $lng['admin']['domain_editable']['title'],
'desc' => $lng['admin']['domain_editable']['desc'],
'label' => \Froxlor\I18N\Lang::getAll()['admin']['domain_editable']['title'],
'desc' => \Froxlor\I18N\Lang::getAll()['admin']['domain_editable']['desc'],
'type' => 'checkbox',
'values' => array(
array(
'label' => $lng['panel']['yes'],
'label' => \Froxlor\I18N\Lang::getAll()['panel']['yes'],
'value' => '1'
)
),
@@ -76,21 +76,21 @@ return array(
)
),
'add_date' => array(
'label' => $lng['domains']['add_date'],
'desc' => $lng['panel']['dateformat'],
'label' => \Froxlor\I18N\Lang::getAll()['domains']['add_date'],
'desc' => \Froxlor\I18N\Lang::getAll()['panel']['dateformat'],
'type' => 'label',
'value' => $result['add_date']
),
'registration_date' => array(
'label' => $lng['domains']['registration_date'],
'desc' => $lng['panel']['dateformat'],
'label' => \Froxlor\I18N\Lang::getAll()['domains']['registration_date'],
'desc' => \Froxlor\I18N\Lang::getAll()['panel']['dateformat'],
'type' => 'text',
'value' => $result['registration_date'],
'size' => 10
),
'termination_date' => array(
'label' => $lng['domains']['termination_date'],
'desc' => $lng['panel']['dateformat'],
'label' => \Froxlor\I18N\Lang::getAll()['domains']['termination_date'],
'desc' => \Froxlor\I18N\Lang::getAll()['panel']['dateformat'],
'type' => 'text',
'value' => $result['termination_date'],
'size' => 10
@@ -98,19 +98,19 @@ return array(
)
),
'section_b' => array(
'title' => $lng['admin']['webserversettings'],
'title' => \Froxlor\I18N\Lang::getAll()['admin']['webserversettings'],
'image' => 'icons/domain_edit.png',
'fields' => array(
'documentroot' => array(
'visible' => (\Froxlor\User::getAll()['change_serversettings'] == '1' ? true : false),
'label' => 'DocumentRoot',
'desc' => $lng['panel']['emptyfordefault'],
'desc' => \Froxlor\I18N\Lang::getAll()['panel']['emptyfordefault'],
'type' => 'text',
'value' => $result['documentroot']
),
'ipandport' => array(
'label' => $lng['domains']['ipandport_multi']['title'],
'desc' => $lng['domains']['ipandport_multi']['description'],
'label' => \Froxlor\I18N\Lang::getAll()['domains']['ipandport_multi']['title'],
'desc' => \Froxlor\I18N\Lang::getAll()['domains']['ipandport_multi']['description'],
'type' => 'checkbox',
'values' => $ipsandports,
'value' => $usedips,
@@ -118,18 +118,18 @@ return array(
'mandatory' => true
),
'selectserveralias' => array(
'label' => $lng['admin']['selectserveralias'],
'desc' => $lng['admin']['selectserveralias_desc'],
'label' => \Froxlor\I18N\Lang::getAll()['admin']['selectserveralias'],
'desc' => \Froxlor\I18N\Lang::getAll()['admin']['selectserveralias_desc'],
'type' => 'select',
'select_var' => $serveraliasoptions
),
'speciallogfile' => array(
'label' => $lng['admin']['speciallogfile']['title'],
'desc' => $lng['admin']['speciallogfile']['description'],
'label' => \Froxlor\I18N\Lang::getAll()['admin']['speciallogfile']['title'],
'desc' => \Froxlor\I18N\Lang::getAll()['admin']['speciallogfile']['description'],
'type' => 'checkbox',
'values' => array(
array(
'label' => $lng['panel']['yes'],
'label' => \Froxlor\I18N\Lang::getAll()['panel']['yes'],
'value' => '1'
)
),
@@ -140,8 +140,8 @@ return array(
'specialsettings' => array(
'visible' => (\Froxlor\User::getAll()['change_serversettings'] == '1' ? true : false),
'style' => 'align-top',
'label' => $lng['admin']['ownvhostsettings'],
'desc' => $lng['serversettings']['default_vhostconf']['description'],
'label' => \Froxlor\I18N\Lang::getAll()['admin']['ownvhostsettings'],
'desc' => \Froxlor\I18N\Lang::getAll()['serversettings']['default_vhostconf']['description'],
'type' => 'textarea',
'value' => $result['specialsettings'],
'cols' => 60,
@@ -149,12 +149,12 @@ return array(
),
'specialsettingsforsubdomains' => array(
'visible' => (\Froxlor\User::getAll()['change_serversettings'] == '1' ? true : false),
'label' => $lng['admin']['specialsettingsforsubdomains'],
'desc' => $lng['serversettings']['specialsettingsforsubdomains']['description'],
'label' => \Froxlor\I18N\Lang::getAll()['admin']['specialsettingsforsubdomains'],
'desc' => \Froxlor\I18N\Lang::getAll()['serversettings']['specialsettingsforsubdomains']['description'],
'type' => 'checkbox',
'values' => array(
array(
'label' => $lng['panel']['yes'],
'label' => \Froxlor\I18N\Lang::getAll()['panel']['yes'],
'value' => '1'
)
),
@@ -164,12 +164,12 @@ return array(
),
'notryfiles' => array(
'visible' => (\Froxlor\Settings::Get('system.webserver') == 'nginx' && \Froxlor\User::getAll()['change_serversettings'] == '1'),
'label' => $lng['admin']['notryfiles']['title'],
'desc' => $lng['admin']['notryfiles']['description'],
'label' => \Froxlor\I18N\Lang::getAll()['admin']['notryfiles']['title'],
'desc' => \Froxlor\I18N\Lang::getAll()['admin']['notryfiles']['description'],
'type' => 'checkbox',
'values' => array(
array(
'label' => $lng['panel']['yes'],
'label' => \Froxlor\I18N\Lang::getAll()['panel']['yes'],
'value' => '1'
)
),
@@ -178,12 +178,12 @@ return array(
)
),
'writeaccesslog' => array(
'label' => $lng['admin']['writeaccesslog']['title'],
'desc' => $lng['admin']['writeaccesslog']['description'],
'label' => \Froxlor\I18N\Lang::getAll()['admin']['writeaccesslog']['title'],
'desc' => \Froxlor\I18N\Lang::getAll()['admin']['writeaccesslog']['description'],
'type' => 'checkbox',
'values' => array(
array(
'label' => $lng['panel']['yes'],
'label' => \Froxlor\I18N\Lang::getAll()['panel']['yes'],
'value' => '1'
)
),
@@ -192,12 +192,12 @@ return array(
)
),
'writeerrorlog' => array(
'label' => $lng['admin']['writeerrorlog']['title'],
'desc' => $lng['admin']['writeerrorlog']['description'],
'label' => \Froxlor\I18N\Lang::getAll()['admin']['writeerrorlog']['title'],
'desc' => \Froxlor\I18N\Lang::getAll()['admin']['writeerrorlog']['description'],
'type' => 'checkbox',
'values' => array(
array(
'label' => $lng['panel']['yes'],
'label' => \Froxlor\I18N\Lang::getAll()['panel']['yes'],
'value' => '1'
)
),
@@ -208,13 +208,13 @@ return array(
)
),
'section_bssl' => array(
'title' => $lng['admin']['webserversettings_ssl'],
'title' => \Froxlor\I18N\Lang::getAll()['admin']['webserversettings_ssl'],
'image' => 'icons/domain_edit.png',
'visible' => \Froxlor\Settings::Get('system.use_ssl') == '1' ? true : false,
'fields' => array(
'ssl_ipandport' => array(
'label' => $lng['domains']['ipandport_ssl_multi']['title'],
'desc' => $lng['domains']['ipandport_ssl_multi']['description'],
'label' => \Froxlor\I18N\Lang::getAll()['domains']['ipandport_ssl_multi']['title'],
'desc' => \Froxlor\I18N\Lang::getAll()['domains']['ipandport_ssl_multi']['description'],
'type' => 'checkbox',
'values' => $ssl_ipsandports,
'value' => $usedips,
@@ -222,12 +222,12 @@ return array(
),
'ssl_redirect' => array(
'visible' => ($ssl_ipsandports != '' ? true : false),
'label' => $lng['domains']['ssl_redirect']['title'],
'desc' => $lng['domains']['ssl_redirect']['description'] . ($result['temporary_ssl_redirect'] > 1 ? $lng['domains']['ssl_redirect_temporarilydisabled'] : ''),
'label' => \Froxlor\I18N\Lang::getAll()['domains']['ssl_redirect']['title'],
'desc' => \Froxlor\I18N\Lang::getAll()['domains']['ssl_redirect']['description'] . ($result['temporary_ssl_redirect'] > 1 ? \Froxlor\I18N\Lang::getAll()['domains']['ssl_redirect_temporarilydisabled'] : ''),
'type' => 'checkbox',
'values' => array(
array(
'label' => $lng['panel']['yes'],
'label' => \Froxlor\I18N\Lang::getAll()['panel']['yes'],
'value' => '1'
)
),
@@ -237,12 +237,12 @@ return array(
),
'letsencrypt' => array(
'visible' => (\Froxlor\Settings::Get('system.leenabled') == '1' ? ($ssl_ipsandports != '' ? true : false) : false),
'label' => $lng['admin']['letsencrypt']['title'],
'desc' => $lng['admin']['letsencrypt']['description'],
'label' => \Froxlor\I18N\Lang::getAll()['admin']['letsencrypt']['title'],
'desc' => \Froxlor\I18N\Lang::getAll()['admin']['letsencrypt']['description'],
'type' => 'checkbox',
'values' => array(
array(
'label' => $lng['panel']['yes'],
'label' => \Froxlor\I18N\Lang::getAll()['panel']['yes'],
'value' => '1'
)
),
@@ -252,12 +252,12 @@ return array(
),
'http2' => array(
'visible' => ($ssl_ipsandports != '' ? true : false) && \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'],
'label' => \Froxlor\I18N\Lang::getAll()['admin']['domain_http2']['title'],
'desc' => \Froxlor\I18N\Lang::getAll()['admin']['domain_http2']['description'],
'type' => 'checkbox',
'values' => array(
array(
'label' => $lng['panel']['yes'],
'label' => \Froxlor\I18N\Lang::getAll()['panel']['yes'],
'value' => '1'
)
),
@@ -269,12 +269,12 @@ return array(
'visible' => ($ssl_ipsandports == '' ? true : false),
'label' => 'SSL',
'type' => 'label',
'value' => $lng['panel']['nosslipsavailable']
'value' => \Froxlor\I18N\Lang::getAll()['panel']['nosslipsavailable']
),
'hsts_maxage' => array(
'visible' => ($ssl_ipsandports != '' ? true : false),
'label' => $lng['admin']['domain_hsts_maxage']['title'],
'desc' => $lng['admin']['domain_hsts_maxage']['description'],
'label' => \Froxlor\I18N\Lang::getAll()['admin']['domain_hsts_maxage']['title'],
'desc' => \Froxlor\I18N\Lang::getAll()['admin']['domain_hsts_maxage']['description'],
'type' => 'int',
'int_min' => 0,
'int_max' => 94608000, // 3-years
@@ -282,12 +282,12 @@ return array(
),
'hsts_sub' => array(
'visible' => ($ssl_ipsandports != '' ? true : false),
'label' => $lng['admin']['domain_hsts_incsub']['title'],
'desc' => $lng['admin']['domain_hsts_incsub']['description'],
'label' => \Froxlor\I18N\Lang::getAll()['admin']['domain_hsts_incsub']['title'],
'desc' => \Froxlor\I18N\Lang::getAll()['admin']['domain_hsts_incsub']['description'],
'type' => 'checkbox',
'values' => array(
array(
'label' => $lng['panel']['yes'],
'label' => \Froxlor\I18N\Lang::getAll()['panel']['yes'],
'value' => '1'
)
),
@@ -297,12 +297,12 @@ return array(
),
'hsts_preload' => array(
'visible' => ($ssl_ipsandports != '' ? true : false),
'label' => $lng['admin']['domain_hsts_preload']['title'],
'desc' => $lng['admin']['domain_hsts_preload']['description'],
'label' => \Froxlor\I18N\Lang::getAll()['admin']['domain_hsts_preload']['title'],
'desc' => \Froxlor\I18N\Lang::getAll()['admin']['domain_hsts_preload']['description'],
'type' => 'checkbox',
'values' => array(
array(
'label' => $lng['panel']['yes'],
'label' => \Froxlor\I18N\Lang::getAll()['panel']['yes'],
'value' => '1'
)
),
@@ -312,12 +312,12 @@ return array(
),
'ocsp_stapling' => array(
'visible' => ($ssl_ipsandports != '' ? true : false) && \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'] : ""),
'label' => \Froxlor\I18N\Lang::getAll()['admin']['domain_ocsp_stapling']['title'],
'desc' => \Froxlor\I18N\Lang::getAll()['admin']['domain_ocsp_stapling']['description'] . (\Froxlor\Settings::Get('system.webserver') == 'nginx' ? \Froxlor\I18N\Lang::getAll()['admin']['domain_ocsp_stapling']['nginx_version_warning'] : ""),
'type' => 'checkbox',
'values' => array(
array(
'label' => $lng['panel']['yes'],
'label' => \Froxlor\I18N\Lang::getAll()['panel']['yes'],
'value' => '1'
)
),
@@ -328,7 +328,7 @@ return array(
)
),
'section_c' => array(
'title' => $lng['admin']['phpserversettings'],
'title' => \Froxlor\I18N\Lang::getAll()['admin']['phpserversettings'],
'image' => 'icons/domain_edit.png',
'visible' => ((\Froxlor\User::getAll()['change_serversettings'] == '1' || \Froxlor\User::getAll()['caneditphpsettings'] == '1') ? true : false),
'fields' => array(
@@ -337,7 +337,7 @@ return array(
'type' => 'checkbox',
'values' => array(
array(
'label' => $lng['panel']['yes'],
'label' => \Froxlor\I18N\Lang::getAll()['panel']['yes'],
'value' => '1'
)
),
@@ -346,11 +346,11 @@ return array(
)
),
'phpenabled' => array(
'label' => $lng['admin']['phpenabled'],
'label' => \Froxlor\I18N\Lang::getAll()['admin']['phpenabled'],
'type' => 'checkbox',
'values' => array(
array(
'label' => $lng['panel']['yes'],
'label' => \Froxlor\I18N\Lang::getAll()['panel']['yes'],
'value' => '1'
)
),
@@ -360,18 +360,18 @@ return array(
),
'phpsettingid' => array(
'visible' => (((int) \Froxlor\Settings::Get('system.mod_fcgid') == 1 || (int) \Froxlor\Settings::Get('phpfpm.enabled') == 1) ? true : false),
'label' => $lng['admin']['phpsettings']['title'],
'label' => \Froxlor\I18N\Lang::getAll()['admin']['phpsettings']['title'],
'type' => 'select',
'select_var' => $phpconfigs
),
'phpsettingsforsubdomains' => array(
'visible' => (\Froxlor\User::getAll()['change_serversettings'] == '1' ? true : false),
'label' => $lng['admin']['phpsettingsforsubdomains'],
'desc' => $lng['serversettings']['phpsettingsforsubdomains']['description'],
'label' => \Froxlor\I18N\Lang::getAll()['admin']['phpsettingsforsubdomains'],
'desc' => \Froxlor\I18N\Lang::getAll()['serversettings']['phpsettingsforsubdomains']['description'],
'type' => 'checkbox',
'values' => array(
array(
'label' => $lng['panel']['yes'],
'label' => \Froxlor\I18N\Lang::getAll()['panel']['yes'],
'value' => '1'
)
),
@@ -381,20 +381,20 @@ return array(
),
'mod_fcgid_starter' => array(
'visible' => ((int) \Froxlor\Settings::Get('system.mod_fcgid') == 1 ? true : false),
'label' => $lng['admin']['mod_fcgid_starter']['title'],
'label' => \Froxlor\I18N\Lang::getAll()['admin']['mod_fcgid_starter']['title'],
'type' => 'text',
'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),
'label' => $lng['admin']['mod_fcgid_maxrequests']['title'],
'label' => \Froxlor\I18N\Lang::getAll()['admin']['mod_fcgid_maxrequests']['title'],
'type' => 'text',
'value' => ((int) $result['mod_fcgid_maxrequests'] != - 1 ? $result['mod_fcgid_maxrequests'] : '')
)
)
),
'section_d' => array(
'title' => $lng['admin']['nameserversettings'],
'title' => \Froxlor\I18N\Lang::getAll()['admin']['nameserversettings'],
'image' => 'icons/domain_edit.png',
'visible' => (\Froxlor\Settings::Get('system.bind_enable') == '1' && \Froxlor\User::getAll()['change_serversettings'] == '1' ? true : false),
'fields' => array(
@@ -403,7 +403,7 @@ return array(
'type' => 'checkbox',
'values' => array(
array(
'label' => $lng['panel']['yes'],
'label' => \Froxlor\I18N\Lang::getAll()['panel']['yes'],
'value' => '1'
)
),
@@ -413,22 +413,22 @@ return array(
),
'zonefile' => array(
'label' => 'Zonefile',
'desc' => $lng['admin']['bindzonewarning'],
'desc' => \Froxlor\I18N\Lang::getAll()['admin']['bindzonewarning'],
'type' => 'text',
'value' => $result['zonefile']
)
)
),
'section_e' => array(
'title' => $lng['admin']['mailserversettings'],
'title' => \Froxlor\I18N\Lang::getAll()['admin']['mailserversettings'],
'image' => 'icons/domain_edit.png',
'fields' => array(
'isemaildomain' => array(
'label' => $lng['admin']['emaildomain'],
'label' => \Froxlor\I18N\Lang::getAll()['admin']['emaildomain'],
'type' => 'checkbox',
'values' => array(
array(
'label' => $lng['panel']['yes'],
'label' => \Froxlor\I18N\Lang::getAll()['panel']['yes'],
'value' => '1'
)
),
@@ -437,11 +437,11 @@ return array(
)
),
'email_only' => array(
'label' => $lng['admin']['email_only'],
'label' => \Froxlor\I18N\Lang::getAll()['admin']['email_only'],
'type' => 'checkbox',
'values' => array(
array(
'label' => $lng['panel']['yes'],
'label' => \Froxlor\I18N\Lang::getAll()['panel']['yes'],
'value' => '1'
)
),
@@ -450,7 +450,7 @@ return array(
)
),
'subcanemaildomain' => array(
'label' => $lng['admin']['subdomainforemail'],
'label' => \Froxlor\I18N\Lang::getAll()['admin']['subdomainforemail'],
'type' => 'select',
'select_var' => $subcanemaildomain
),
@@ -460,7 +460,7 @@ return array(
'type' => 'checkbox',
'values' => array(
array(
'label' => $lng['panel']['yes'],
'label' => \Froxlor\I18N\Lang::getAll()['panel']['yes'],
'value' => '1'
)
),