From bcf187761ccd5c3bc7d7a2af7e2573fa88e0fe94 Mon Sep 17 00:00:00 2001 From: "Roman Schmerold (BNoiZe)" Date: Sun, 15 Dec 2013 14:35:07 +0100 Subject: [PATCH] still implementing the new Settings-class, refs #1325 Signed-off-by: Roman Schmerold (BNoiZe) --- .../admin/admin/formfield.admin_add.php | 4 +- .../admin/admin/formfield.admin_edit.php | 4 +- .../admin/customer/formfield.customer_add.php | 4 +- .../customer/formfield.customer_edit.php | 28 ++++----- .../admin/domains/formfield.domains_add.php | 48 +++++++------- .../admin/domains/formfield.domains_edit.php | 62 +++++++++---------- .../ipsandports/formfield.ipsandports_add.php | 22 +++---- .../formfield.ipsandports_edit.php | 42 ++++++------- .../phpconfig/formfield.phpconfig_add.php | 18 +++--- .../phpconfig/formfield.phpconfig_edit.php | 16 ++--- .../templates/formfield.filetemplate_add.php | 4 +- .../templates/formfield.filetemplate_edit.php | 4 +- .../templates/formfield.template_add.php | 4 +- .../templates/formfield.template_edit.php | 4 +- .../domains/formfield.domains_add.php | 8 +-- .../domains/formfield.domains_edit.php | 8 +-- .../email/formfield.emails_addaccount.php | 4 +- .../customer/email/formfield.emails_edit.php | 2 +- .../extras/formfield.htaccess_add.php | 6 +- .../extras/formfield.htaccess_edit.php | 4 +- .../extras/formfield.htpasswd_add.php | 2 +- .../customer/ftp/formfield.ftp_add.php | 6 +- .../customer/ftp/formfield.ftp_edit.php | 2 +- 23 files changed, 153 insertions(+), 153 deletions(-) diff --git a/lib/formfields/admin/admin/formfield.admin_add.php b/lib/formfields/admin/admin/formfield.admin_add.php index fa897d06..7b47674c 100644 --- a/lib/formfields/admin/admin/formfield.admin_add.php +++ b/lib/formfields/admin/admin/formfield.admin_add.php @@ -173,7 +173,7 @@ return array( 'type' => 'textul', 'value' => 0, 'maxlength' => 9, - 'visible' => ($settings['system']['mail_quota_enabled'] == '1' ? true : false), + 'visible' => (Settings::Get('system.mail_quota_enabled') == '1' ? true : false), 'mandatory' => true, 'ul_field' => $email_quota_ul ), @@ -189,7 +189,7 @@ return array( 'type' => 'textul', 'value' => 0, 'maxlength' => 9, - 'visible' => ($settings['ticket']['enabled'] == '1' ? true : false), + 'visible' => (Settings::Get('ticket.enabled') == '1' ? true : false), 'ul_field' => $tickets_ul ), 'tickets_see_all' => array( diff --git a/lib/formfields/admin/admin/formfield.admin_edit.php b/lib/formfields/admin/admin/formfield.admin_edit.php index 99031eb5..f96a1705 100644 --- a/lib/formfields/admin/admin/formfield.admin_edit.php +++ b/lib/formfields/admin/admin/formfield.admin_edit.php @@ -187,7 +187,7 @@ return array( 'type' => 'textul', 'value' => $result['email_quota'], 'maxlength' => 9, - 'visible' => ($settings['system']['mail_quota_enabled'] == '1' ? true : false), + 'visible' => (Settings::Get('system.mail_quota_enabled') == '1' ? true : false), 'mandatory' => true, 'ul_field' => $email_quota_ul ), @@ -203,7 +203,7 @@ return array( 'type' => 'textul', 'value' => $result['tickets'], 'maxlength' => 9, - 'visible' => ($settings['ticket']['enabled'] == '1' ? true : false), + 'visible' => (Settings::Get('ticket.enabled') == '1' ? true : false), 'ul_field' => $tickets_ul ), 'tickets_see_all' => array( diff --git a/lib/formfields/admin/customer/formfield.customer_add.php b/lib/formfields/admin/customer/formfield.customer_add.php index 3d7cb23c..92e0c5a4 100644 --- a/lib/formfields/admin/customer/formfield.customer_add.php +++ b/lib/formfields/admin/customer/formfield.customer_add.php @@ -181,7 +181,7 @@ return array( 'type' => 'textul', 'value' => 0, 'maxlength' => 9, - 'visible' => ($settings['system']['mail_quota_enabled'] == '1' ? true : false), + 'visible' => (Settings::Get('system.mail_quota_enabled') == '1' ? true : false), 'mandatory' => true, 'ul_field' => $email_quota_ul ), @@ -215,7 +215,7 @@ return array( 'type' => 'textul', 'value' => 0, 'maxlength' => 9, - 'visible' => ($settings['ticket']['enabled'] == '1' ? true : false), + 'visible' => (Settings::Get('ticket.enabled') == '1' ? true : false), 'ul_field' => $tickets_ul ), 'mysqls' => array( diff --git a/lib/formfields/admin/customer/formfield.customer_edit.php b/lib/formfields/admin/customer/formfield.customer_edit.php index 4a20bbee..8d8d9bc0 100644 --- a/lib/formfields/admin/customer/formfield.customer_edit.php +++ b/lib/formfields/admin/customer/formfield.customer_edit.php @@ -38,16 +38,16 @@ return array( 'label' => $lng['admin']['stdsubdomain_add'].'?', 'type' => 'checkbox', 'values' => array( - array ('label' => $lng['panel']['yes'], 'value' => '1') - ), + array ('label' => $lng['panel']['yes'], 'value' => '1') + ), 'value' => array(($result['standardsubdomain'] != '0') ? '1' : '0') ), 'deactivated' => array( 'label' => $lng['admin']['deactivated_user'], 'type' => 'checkbox', 'values' => array( - array ('label' => $lng['panel']['yes'], 'value' => '1') - ), + array ('label' => $lng['panel']['yes'], 'value' => '1') + ), 'value' => array($result['deactivated']) ), 'new_customer_password' => array( @@ -189,7 +189,7 @@ return array( 'type' => 'textul', 'value' => $result['email_quota'], 'maxlength' => 9, - 'visible' => ($settings['system']['mail_quota_enabled'] == '1' ? true : false), + 'visible' => (Settings::Get('system.mail_quota_enabled') == '1' ? true : false), 'mandatory' => true, 'ul_field' => $email_quota_ul ), @@ -197,8 +197,8 @@ return array( 'label' => $lng['customer']['email_imap'], 'type' => 'checkbox', 'values' => array( - array ('label' => $lng['panel']['yes'], 'value' => '1') - ), + array ('label' => $lng['panel']['yes'], 'value' => '1') + ), 'value' => array($result['imap']), 'mandatory' => true ), @@ -206,8 +206,8 @@ return array( 'label' => $lng['customer']['email_pop3'], 'type' => 'checkbox', 'values' => array( - array ('label' => $lng['panel']['yes'], 'value' => '1') - ), + array ('label' => $lng['panel']['yes'], 'value' => '1') + ), 'value' => array($result['pop3']), 'mandatory' => true ), @@ -223,7 +223,7 @@ return array( 'type' => 'textul', 'value' => $result['tickets'], 'maxlength' => 9, - 'visible' => ($settings['ticket']['enabled'] == '1' ? true : false), + 'visible' => (Settings::Get('ticket.enabled') == '1' ? true : false), 'ul_field' => $tickets_ul ), 'mysqls' => array( @@ -238,16 +238,16 @@ return array( 'label' => $lng['admin']['phpenabled'].'?', 'type' => 'checkbox', 'values' => array( - array ('label' => $lng['panel']['yes'], 'value' => '1') - ), + array ('label' => $lng['panel']['yes'], 'value' => '1') + ), 'value' => array($result['phpenabled']) ), 'perlenabled' => array( 'label' => $lng['admin']['perlenabled'].'?', 'type' => 'checkbox', 'values' => array( - array ('label' => $lng['panel']['yes'], 'value' => '1') - ), + array ('label' => $lng['panel']['yes'], 'value' => '1') + ), 'value' => array($result['perlenabled']) ) ) diff --git a/lib/formfields/admin/domains/formfield.domains_add.php b/lib/formfields/admin/domains/formfield.domains_add.php index 512681b1..38ba8a17 100644 --- a/lib/formfields/admin/domains/formfield.domains_add.php +++ b/lib/formfields/admin/domains/formfield.domains_add.php @@ -58,8 +58,8 @@ return array( 'desc' => $lng['admin']['domain_editable']['desc'], 'type' => 'checkbox', 'values' => array( - array ('label' => $lng['panel']['yes'], 'value' => '1') - ), + array ('label' => $lng['panel']['yes'], 'value' => '1') + ), 'value' => array('1') ), 'add_date' => array( @@ -91,7 +91,7 @@ return array( 'desc' => $lng['domains']['ipandport_multi']['description'], 'type' => 'checkbox', 'values' => $ipsandports, - 'value' => array($settings['system']['defaultip']), + 'value' => array(Settings::Get('system.defaultip')), 'is_array' => 1, 'mandatory' => true ), @@ -104,17 +104,17 @@ return array( 'is_array' => 1 ), 'ssl_redirect' => array( - 'visible' => ($settings['system']['use_ssl'] == '1' ? ($ssl_ipsandports != '' ? true : false) : false), + 'visible' => (Settings::Get('system.use_ssl') == '1' ? ($ssl_ipsandports != '' ? true : false) : false), 'label' => $lng['domains']['ssl_redirect']['title'], 'desc' => $lng['domains']['ssl_redirect']['description'], 'type' => 'checkbox', 'values' => array( - array ('label' => $lng['panel']['yes'], 'value' => '1') - ), + array ('label' => $lng['panel']['yes'], 'value' => '1') + ), 'value' => array() ), 'no_ssl_available_info' => array( - 'visible' => ($settings['system']['use_ssl'] == '1' ? ($ssl_ipsandports == '' ? true : false) : false), + 'visible' => (Settings::Get('system.use_ssl') == '1' ? ($ssl_ipsandports == '' ? true : false) : false), 'label' => 'SSL', 'type' => 'label', 'value' => $lng['panel']['nosslipsavailable'] @@ -130,8 +130,8 @@ return array( 'desc' => $lng['admin']['speciallogfile']['description'], 'type' => 'checkbox', 'values' => array( - array ('label' => $lng['panel']['yes'], 'value' => '1') - ), + array ('label' => $lng['panel']['yes'], 'value' => '1') + ), 'value' => array() ), 'specialsettings' => array( @@ -154,23 +154,23 @@ return array( 'label' => 'OpenBasedir', 'type' => 'checkbox', 'values' => array( - array ('label' => $lng['panel']['yes'], 'value' => '1') - ), + array ('label' => $lng['panel']['yes'], 'value' => '1') + ), 'value' => array('1') ), 'phpsettingid' => array( - 'visible' => (((int)$settings['system']['mod_fcgid'] == 1 || (int)$settings['phpfpm']['enabled'] == 1) ? true : false), + 'visible' => (((int)Settings::Get('system.mod_fcgid') == 1 || (int)Settings::Get('phpfpm.enabled') == 1) ? true : false), 'label' => $lng['admin']['phpsettings']['title'], 'type' => 'select', 'select_var' => $phpconfigs ), 'mod_fcgid_starter' => array( - 'visible' => ((int)$settings['system']['mod_fcgid'] == 1 ? true : false), + 'visible' => ((int)Settings::Get('system.mod_fcgid') == 1 ? true : false), 'label' => $lng['admin']['mod_fcgid_starter']['title'], 'type' => 'text' ), 'mod_fcgid_maxrequests' => array( - 'visible' => ((int)$settings['system']['mod_fcgid'] == 1 ? true : false), + 'visible' => ((int)Settings::Get('system.mod_fcgid') == 1 ? true : false), 'label' => $lng['admin']['mod_fcgid_maxrequests']['title'], 'type' => 'text' ) @@ -179,14 +179,14 @@ return array( 'section_d' => array( 'title' => $lng['admin']['nameserversettings'], 'image' => 'icons/domain_add.png', - 'visible' => ($settings['system']['bind_enable'] == '1' && $userinfo['change_serversettings'] == '1' ? true : false), + 'visible' => (Settings::Get('system.bind_enable') == '1' && $userinfo['change_serversettings'] == '1' ? true : false), 'fields' => array( 'isbinddomain' => array( 'label' => 'Nameserver', 'type' => 'checkbox', 'values' => array( - array ('label' => $lng['panel']['yes'], 'value' => '1') - ), + array ('label' => $lng['panel']['yes'], 'value' => '1') + ), 'value' => array('1') ), 'zonefile' => array( @@ -204,16 +204,16 @@ return array( 'label' => $lng['admin']['emaildomain'], 'type' => 'checkbox', 'values' => array( - array ('label' => $lng['panel']['yes'], 'value' => '1') - ), + array ('label' => $lng['panel']['yes'], 'value' => '1') + ), 'value' => array('1') ), 'email_only' => array( 'label' => $lng['admin']['email_only'], 'type' => 'checkbox', 'values' => array( - array ('label' => $lng['panel']['yes'], 'value' => '1') - ), + array ('label' => $lng['panel']['yes'], 'value' => '1') + ), 'value' => array() ), 'subcanemaildomain' => array( @@ -222,12 +222,12 @@ return array( 'select_var' => $subcanemaildomain ), 'dkim' => array( - 'visible' => ($settings['dkim']['use_dkim'] == '1' ? true : false), + 'visible' => (Settings::Get('dkim.use_dkim') == '1' ? true : false), 'label' => 'DomainKeys', 'type' => 'checkbox', 'values' => array( - array ('label' => $lng['panel']['yes'], 'value' => '1') - ), + array ('label' => $lng['panel']['yes'], 'value' => '1') + ), 'value' => array('1') ) ) diff --git a/lib/formfields/admin/domains/formfield.domains_edit.php b/lib/formfields/admin/domains/formfield.domains_edit.php index cc4cb4d5..793ab8ad 100644 --- a/lib/formfields/admin/domains/formfield.domains_edit.php +++ b/lib/formfields/admin/domains/formfield.domains_edit.php @@ -32,7 +32,7 @@ return array( ), 'customerid' => array( 'label' => $lng['admin']['customer'], - 'type' => ($settings['panel']['allow_domain_change_customer'] == '1' ? 'select' : 'label'), + 'type' => (Settings::Get('panel.allow_domain_change_customer') == '1' ? 'select' : 'label'), 'select_var' => (isset($customers) ? $customers : null), 'value' => (isset($result['customername']) ? $result['customername'] : null), 'mandatory' => true, @@ -40,7 +40,7 @@ return array( 'adminid' => array( 'visible' => ($userinfo['customers_see_all'] == '1' ? true : false), 'label' => $lng['admin']['admin'], - 'type' => ($settings['panel']['allow_domain_change_admin'] == '1' ? 'select' : 'label'), + 'type' => (Settings::Get('panel.allow_domain_change_admin') == '1' ? 'select' : 'label'), 'select_var' => (isset($admins) ? $admins : null), 'value' => (isset($result['adminname']) ? $result['adminname'] : null), 'mandatory' => true, @@ -67,8 +67,8 @@ return array( 'desc' => $lng['admin']['domain_editable']['desc'], 'type' => 'checkbox', 'values' => array( - array ('label' => $lng['panel']['yes'], 'value' => '1') - ), + array ('label' => $lng['panel']['yes'], 'value' => '1') + ), 'value' => array($result['caneditdomain']) ), 'add_date' => array( @@ -115,34 +115,34 @@ return array( 'is_array' => 1 ), 'ssl_redirect' => array( - 'visible' => ($settings['system']['use_ssl'] == '1' ? ($ssl_ipsandports != '' ? true : false) : false), + 'visible' => (Settings::Get('system.use_ssl') == '1' ? ($ssl_ipsandports != '' ? true : false) : false), 'label' => $lng['domains']['ssl_redirect']['title'], 'desc' => $lng['domains']['ssl_redirect']['description'], 'type' => 'checkbox', 'values' => array( - array ('label' => $lng['panel']['yes'], 'value' => '1') - ), + array ('label' => $lng['panel']['yes'], 'value' => '1') + ), 'value' => array($result['ssl_redirect']) ), 'no_ssl_available_info' => array( - 'visible' => ($settings['system']['use_ssl'] == '1' ? ($ssl_ipsandports == '' ? true : false) : false), + 'visible' => (Settings::Get('system.use_ssl') == '1' ? ($ssl_ipsandports == '' ? true : false) : false), 'label' => 'SSL', 'type' => 'label', 'value' => $lng['panel']['nosslipsavailable'] ), 'selectserveralias' => array( - 'label' => $lng['admin']['selectserveralias'], - 'desc' => $lng['admin']['selectserveralias_desc'], - 'type' => 'select', - 'select_var' => $serveraliasoptions + 'label' => $lng['admin']['selectserveralias'], + 'desc' => $lng['admin']['selectserveralias_desc'], + 'type' => 'select', + 'select_var' => $serveraliasoptions ), 'speciallogfile' => array( 'label' => $lng['admin']['speciallogfile']['title'], 'desc' => $lng['admin']['speciallogfile']['description'], 'type' => 'checkbox', 'values' => array( - array ('label' => $lng['panel']['yes'], 'value' => '1') - ), + array ('label' => $lng['panel']['yes'], 'value' => '1') + ), 'value' => array($result['speciallogfile']) ), 'specialsettings' => array( @@ -161,8 +161,8 @@ return array( 'desc' => $lng['serversettings']['specialsettingsforsubdomains']['description'], 'type' => 'checkbox', 'values' => array( - array ('label' => $lng['panel']['yes'], 'value' => '1') - ), + array ('label' => $lng['panel']['yes'], 'value' => '1') + ), 'value' => array('1') ) ) @@ -176,24 +176,24 @@ return array( 'label' => 'OpenBasedir', 'type' => 'checkbox', 'values' => array( - array ('label' => $lng['panel']['yes'], 'value' => '1') - ), + array ('label' => $lng['panel']['yes'], 'value' => '1') + ), 'value' => array($result['openbasedir']) ), 'phpsettingid' => array( - 'visible' => (((int)$settings['system']['mod_fcgid'] == 1 || (int)$settings['phpfpm']['enabled'] == 1) ? true : false), + 'visible' => (((int)Settings::Get('system.mod_fcgid') == 1 || (int)Settings::Get('phpfpm.enabled') == 1) ? true : false), 'label' => $lng['admin']['phpsettings']['title'], 'type' => 'select', 'select_var' => $phpconfigs ), 'mod_fcgid_starter' => array( - 'visible' => ((int)$settings['system']['mod_fcgid'] == 1 ? true : false), + 'visible' => ((int)Settings::Get('system.mod_fcgid') == 1 ? true : false), 'label' => $lng['admin']['mod_fcgid_starter']['title'], 'type' => 'text', 'value' => ((int)$result['mod_fcgid_starter'] != - 1 ? $result['mod_fcgid_starter'] : '') ), 'mod_fcgid_maxrequests' => array( - 'visible' => ((int)$settings['system']['mod_fcgid'] == 1 ? true : false), + 'visible' => ((int)Settings::Get('system.mod_fcgid') == 1 ? true : false), 'label' => $lng['admin']['mod_fcgid_maxrequests']['title'], 'type' => 'text', 'value' => ((int)$result['mod_fcgid_maxrequests'] != - 1 ? $result['mod_fcgid_maxrequests'] : '') @@ -203,14 +203,14 @@ return array( 'section_d' => array( 'title' => $lng['admin']['nameserversettings'], 'image' => 'icons/domain_edit.png', - 'visible' => ($settings['system']['bind_enable'] == '1' && $userinfo['change_serversettings'] == '1' ? true : false), + 'visible' => (Settings::Get('system.bind_enable') == '1' && $userinfo['change_serversettings'] == '1' ? true : false), 'fields' => array( 'isbinddomain' => array( 'label' => 'Nameserver', 'type' => 'checkbox', 'values' => array( - array ('label' => $lng['panel']['yes'], 'value' => '1') - ), + array ('label' => $lng['panel']['yes'], 'value' => '1') + ), 'value' => array($result['isbinddomain']) ), 'zonefile' => array( @@ -229,16 +229,16 @@ return array( 'label' => $lng['admin']['emaildomain'], 'type' => 'checkbox', 'values' => array( - array ('label' => $lng['panel']['yes'], 'value' => '1') - ), + array ('label' => $lng['panel']['yes'], 'value' => '1') + ), 'value' => array($result['isemaildomain']) ), 'email_only' => array( 'label' => $lng['admin']['email_only'], 'type' => 'checkbox', 'values' => array( - array ('label' => $lng['panel']['yes'], 'value' => '1') - ), + array ('label' => $lng['panel']['yes'], 'value' => '1') + ), 'value' => array($result['email_only']) ), 'subcanemaildomain' => array( @@ -247,12 +247,12 @@ return array( 'select_var' => $subcanemaildomain ), 'dkim' => array( - 'visible' => ($settings['dkim']['use_dkim'] == '1' ? true : false), + 'visible' => (Settings::Get('dkim.use_dkim') == '1' ? true : false), 'label' => 'DomainKeys', 'type' => 'checkbox', 'values' => array( - array ('label' => $lng['panel']['yes'], 'value' => '1') - ), + array ('label' => $lng['panel']['yes'], 'value' => '1') + ), 'value' => array($result['dkim']) ) ) diff --git a/lib/formfields/admin/ipsandports/formfield.ipsandports_add.php b/lib/formfields/admin/ipsandports/formfield.ipsandports_add.php index 35a7fda1..98e82d0f 100644 --- a/lib/formfields/admin/ipsandports/formfield.ipsandports_add.php +++ b/lib/formfields/admin/ipsandports/formfield.ipsandports_add.php @@ -43,24 +43,24 @@ return array( 'label' => $lng['admin']['ipsandports']['create_listen_statement'], 'type' => 'checkbox', 'values' => array( - array ('label' => $lng['panel']['yes'], 'value' => '1') - ), + array ('label' => $lng['panel']['yes'], 'value' => '1') + ), 'value' => array('1') ), 'namevirtualhost_statement' => array( 'label' => $lng['admin']['ipsandports']['create_namevirtualhost_statement'], 'type' => 'checkbox', 'values' => array( - array ('label' => $lng['panel']['yes'], 'value' => '1') - ), + array ('label' => $lng['panel']['yes'], 'value' => '1') + ), 'value' => array('1') ), 'vhostcontainer' => array( 'label' => $lng['admin']['ipsandports']['create_vhostcontainer'], 'type' => 'checkbox', 'values' => array( - array ('label' => $lng['panel']['yes'], 'value' => '1') - ), + array ('label' => $lng['panel']['yes'], 'value' => '1') + ), 'value' => array('1') ), 'docroot' => array( @@ -80,8 +80,8 @@ return array( 'label' => $lng['admin']['ipsandports']['create_vhostcontainer_servername_statement'], 'type' => 'checkbox', 'values' => array( - array ('label' => $lng['panel']['yes'], 'value' => '1') - ), + array ('label' => $lng['panel']['yes'], 'value' => '1') + ), 'value' => array('1') ) ) @@ -103,14 +103,14 @@ return array( 'section_d' => array( 'title' => $lng['admin']['ipsandports']['webserverssldomainconfig'], 'image' => 'icons/ipsports_add.png', - 'visible' => ($settings['system']['use_ssl'] == 1 ? true : false), + 'visible' => (Settings::Get('system.use_ssl') == 1 ? true : false), 'fields' => array( 'ssl' => array( 'label' => $lng['admin']['ipsandports']['enable_ssl'], 'type' => 'checkbox', 'values' => array( - array ('label' => $lng['panel']['yes'], 'value' => '1') - ), + array ('label' => $lng['panel']['yes'], 'value' => '1') + ), 'value' => array() ), 'ssl_cert_file' => array( diff --git a/lib/formfields/admin/ipsandports/formfield.ipsandports_edit.php b/lib/formfields/admin/ipsandports/formfield.ipsandports_edit.php index 32f87e38..c850bafd 100644 --- a/lib/formfields/admin/ipsandports/formfield.ipsandports_edit.php +++ b/lib/formfields/admin/ipsandports/formfield.ipsandports_edit.php @@ -44,26 +44,26 @@ return array( 'listen_statement' => array( 'label' => $lng['admin']['ipsandports']['create_listen_statement'], 'type' => 'checkbox', - 'values' => array( - array ('label' => $lng['panel']['yes'], 'value' => '1') - ), - 'value' => array($result['listen_statement']) + 'values' => array( + array ('label' => $lng['panel']['yes'], 'value' => '1') + ), + 'value' => array($result['listen_statement']) ), 'namevirtualhost_statement' => array( 'label' => $lng['admin']['ipsandports']['create_namevirtualhost_statement'], 'type' => 'checkbox', - 'values' => array( - array ('label' => $lng['panel']['yes'], 'value' => '1') - ), - 'value' => array($result['namevirtualhost_statement']) + 'values' => array( + array ('label' => $lng['panel']['yes'], 'value' => '1') + ), + 'value' => array($result['namevirtualhost_statement']) ), 'vhostcontainer' => array( 'label' => $lng['admin']['ipsandports']['create_vhostcontainer'], 'type' => 'checkbox', - 'values' => array( - array ('label' => $lng['panel']['yes'], 'value' => '1') - ), - 'value' => array($result['vhostcontainer']) + 'values' => array( + array ('label' => $lng['panel']['yes'], 'value' => '1') + ), + 'value' => array($result['vhostcontainer']) ), 'docroot' => array( 'label' => $lng['admin']['ipsandports']['docroot']['title'], @@ -83,10 +83,10 @@ return array( 'vhostcontainer_servername_statement' => array( 'label' => $lng['admin']['ipsandports']['create_vhostcontainer_servername_statement'], 'type' => 'checkbox', - 'values' => array( - array ('label' => $lng['panel']['yes'], 'value' => '1') - ), - 'value' => array($result['vhostcontainer_servername_statement']) + 'values' => array( + array ('label' => $lng['panel']['yes'], 'value' => '1') + ), + 'value' => array($result['vhostcontainer_servername_statement']) ) ) ), @@ -108,15 +108,15 @@ return array( 'section_d' => array( 'title' => $lng['admin']['ipsandports']['webserverssldomainconfig'], 'image' => 'icons/ipsports_edit.png', - 'visible' => ($settings['system']['use_ssl'] == 1 ? true : false), + 'visible' => (Settings::Get('system.use_ssl') == 1 ? true : false), 'fields' => array( 'ssl' => array( 'label' => $lng['admin']['ipsandports']['enable_ssl'], 'type' => 'checkbox', - 'values' => array( - array ('label' => $lng['panel']['yes'], 'value' => '1') - ), - 'value' => array($result['ssl']) + 'values' => array( + array ('label' => $lng['panel']['yes'], 'value' => '1') + ), + 'value' => array($result['ssl']) ), 'ssl_cert_file' => array( 'label' => $lng['admin']['ipsandports']['ssl_cert_file'], diff --git a/lib/formfields/admin/phpconfig/formfield.phpconfig_add.php b/lib/formfields/admin/phpconfig/formfield.phpconfig_add.php index d68c532c..a273230d 100644 --- a/lib/formfields/admin/phpconfig/formfield.phpconfig_add.php +++ b/lib/formfields/admin/phpconfig/formfield.phpconfig_add.php @@ -30,14 +30,14 @@ return array( 'maxlength' => 50 ), 'binary' => array( - 'visible' => ($settings['system']['mod_fcgid'] == 1 ? true : false), + 'visible' => (Settings::Get('system.mod_fcgid') == 1 ? true : false), 'label' => $lng['admin']['phpsettings']['binary'], 'type' => 'text', 'maxlength' => 255, 'value' => '/usr/bin/php-cgi' ), 'file_extensions' => array( - 'visible' => ($settings['system']['mod_fcgid'] == 1 ? true : false), + 'visible' => (Settings::Get('system.mod_fcgid') == 1 ? true : false), 'label' => $lng['admin']['phpsettings']['file_extensions'], 'desc' => $lng['admin']['phpsettings']['file_extensions_note'], 'type' => 'text', @@ -45,33 +45,33 @@ return array( 'value' => 'php' ), 'mod_fcgid_starter' => array( - 'visible' => ($settings['system']['mod_fcgid'] == 1 ? true : false), + 'visible' => (Settings::Get('system.mod_fcgid') == 1 ? true : false), 'label' => $lng['admin']['mod_fcgid_starter']['title'], 'type' => 'text' ), 'mod_fcgid_maxrequests' => array( - 'visible' => ($settings['system']['mod_fcgid'] == 1 ? true : false), + 'visible' => (Settings::Get('system.mod_fcgid') == 1 ? true : false), 'label' => $lng['admin']['mod_fcgid_maxrequests']['title'], 'type' => 'text' ), 'phpfpm_enable_slowlog' => array( - 'visible' => ($settings['phpfpm']['enabled'] == 1 ? true : false), + 'visible' => (Settings::Get('phpfpm.enabled') == 1 ? true : false), 'label' => $lng['admin']['phpsettings']['enable_slowlog'], 'type' => 'checkbox', 'values' => array( - array ('label' => $lng['panel']['yes'], 'value' => '1') - ), + array ('label' => $lng['panel']['yes'], 'value' => '1') + ), 'value' => array() ), 'phpfpm_reqtermtimeout' => array( - 'visible' => ($settings['phpfpm']['enabled'] == 1 ? true : false), + 'visible' => (Settings::Get('phpfpm.enabled') == 1 ? true : false), 'label' => $lng['admin']['phpsettings']['request_terminate_timeout'], 'type' => 'text', 'maxlength' => 10, 'value' => '60s' ), 'phpfpm_reqslowtimeout' => array( - 'visible' => ($settings['phpfpm']['enabled'] == 1 ? true : false), + 'visible' => (Settings::Get('phpfpm.enabled') == 1 ? true : false), 'label' => $lng['admin']['phpsettings']['request_slowlog_timeout'], 'type' => 'text', 'maxlength' => 10, diff --git a/lib/formfields/admin/phpconfig/formfield.phpconfig_edit.php b/lib/formfields/admin/phpconfig/formfield.phpconfig_edit.php index 33332e76..1d52d498 100644 --- a/lib/formfields/admin/phpconfig/formfield.phpconfig_edit.php +++ b/lib/formfields/admin/phpconfig/formfield.phpconfig_edit.php @@ -31,14 +31,14 @@ return array( 'value' => $result['description'] ), 'binary' => array( - 'visible' => ($settings['system']['mod_fcgid'] == 1 ? true : false), + 'visible' => (Settings::Get('system.mod_fcgid') == 1 ? true : false), 'label' => $lng['admin']['phpsettings']['binary'], 'type' => 'text', 'maxlength' => 255, 'value' => $result['binary'] ), 'file_extensions' => array( - 'visible' => ($settings['system']['mod_fcgid'] == 1 ? true : false), + 'visible' => (Settings::Get('system.mod_fcgid') == 1 ? true : false), 'label' => $lng['admin']['phpsettings']['file_extensions'], 'desc' => $lng['admin']['phpsettings']['file_extensions_note'], 'type' => 'text', @@ -46,35 +46,35 @@ return array( 'value' => $result['file_extensions'] ), 'mod_fcgid_starter' => array( - 'visible' => ($settings['system']['mod_fcgid'] == 1 ? true : false), + 'visible' => (Settings::Get('system.mod_fcgid') == 1 ? true : false), 'label' => $lng['admin']['mod_fcgid_starter']['title'], 'type' => 'text', 'value' => ((int)$result['mod_fcgid_starter'] != - 1 ? $result['mod_fcgid_starter'] : '') ), 'mod_fcgid_maxrequests' => array( - 'visible' => ($settings['system']['mod_fcgid'] == 1 ? true : false), + 'visible' => (Settings::Get('system.mod_fcgid') == 1 ? true : false), 'label' => $lng['admin']['mod_fcgid_maxrequests']['title'], 'type' => 'text', 'value' => ((int)$result['mod_fcgid_maxrequests'] != - 1 ? $result['mod_fcgid_maxrequests'] : '') ), 'phpfpm_enable_slowlog' => array( - 'visible' => ($settings['phpfpm']['enabled'] == 1 ? true : false), + 'visible' => (Settings::Get('phpfpm.enabled') == 1 ? true : false), 'label' => $lng['admin']['phpsettings']['enable_slowlog'], 'type' => 'checkbox', 'values' => array( - array ('label' => $lng['panel']['yes'], 'value' => '1') + array ('label' => $lng['panel']['yes'], 'value' => '1') ), 'value' => array($result['fpm_slowlog']) ), 'phpfpm_reqtermtimeout' => array( - 'visible' => ($settings['phpfpm']['enabled'] == 1 ? true : false), + 'visible' => (Settings::Get('phpfpm.enabled') == 1 ? true : false), 'label' => $lng['admin']['phpsettings']['request_terminate_timeout'], 'type' => 'text', 'maxlength' => 10, 'value' => $result['fpm_reqterm'] ), 'phpfpm_reqslowtimeout' => array( - 'visible' => ($settings['phpfpm']['enabled'] == 1 ? true : false), + 'visible' => (Settings::Get('phpfpm.enabled') == 1 ? true : false), 'label' => $lng['admin']['phpsettings']['request_slowlog_timeout'], 'type' => 'text', 'maxlength' => 10, diff --git a/lib/formfields/admin/templates/formfield.filetemplate_add.php b/lib/formfields/admin/templates/formfield.filetemplate_add.php index 9860308b..699009af 100644 --- a/lib/formfields/admin/templates/formfield.filetemplate_add.php +++ b/lib/formfields/admin/templates/formfield.filetemplate_add.php @@ -34,8 +34,8 @@ return array( 'type' => 'textarea', 'cols' => 60, 'rows' => 12 - ) - ) + ) + ) ) ) ) diff --git a/lib/formfields/admin/templates/formfield.filetemplate_edit.php b/lib/formfields/admin/templates/formfield.filetemplate_edit.php index 035d8047..9fb7ad10 100644 --- a/lib/formfields/admin/templates/formfield.filetemplate_edit.php +++ b/lib/formfields/admin/templates/formfield.filetemplate_edit.php @@ -36,8 +36,8 @@ return array( 'cols' => 60, 'rows' => 12, 'value' => $row['value'] - ) - ) + ) + ) ) ) ) diff --git a/lib/formfields/admin/templates/formfield.template_add.php b/lib/formfields/admin/templates/formfield.template_add.php index 81725c65..0ecdd0be 100644 --- a/lib/formfields/admin/templates/formfield.template_add.php +++ b/lib/formfields/admin/templates/formfield.template_add.php @@ -44,8 +44,8 @@ return array( 'type' => 'textarea', 'cols' => 60, 'rows' => 12 - ) - ) + ) + ) ) ) ) diff --git a/lib/formfields/admin/templates/formfield.template_edit.php b/lib/formfields/admin/templates/formfield.template_edit.php index e795b1c6..aeb49dfb 100644 --- a/lib/formfields/admin/templates/formfield.template_edit.php +++ b/lib/formfields/admin/templates/formfield.template_edit.php @@ -47,8 +47,8 @@ return array( 'cols' => 60, 'rows' => 12, 'value' => $mailbody - ) - ) + ) + ) ) ) ) diff --git a/lib/formfields/customer/domains/formfield.domains_add.php b/lib/formfields/customer/domains/formfield.domains_add.php index 0d958c0d..55a1a67c 100644 --- a/lib/formfields/customer/domains/formfield.domains_add.php +++ b/lib/formfields/customer/domains/formfield.domains_add.php @@ -43,25 +43,25 @@ return array( ), 'path' => array( 'label' => $lng['panel']['path'], - 'desc' => ($settings['panel']['pathedit'] != 'Dropdown' ? $lng['panel']['pathDescriptionSubdomain'] : null).(isset($pathSelect['note']) ? $pathSelect['note'].'
'.$pathSelect['value'] : ''), + 'desc' => (Settings::Get('panel.pathedit') != 'Dropdown' ? $lng['panel']['pathDescriptionSubdomain'] : null).(isset($pathSelect['note']) ? $pathSelect['note'].'
'.$pathSelect['value'] : ''), 'type' => $pathSelect['type'], 'select_var' => $pathSelect['value'], 'value' => $pathSelect['value'] ), 'url' => array( - 'visible' => ($settings['panel']['pathedit'] == 'Dropdown' ? true : false), + 'visible' => (Settings::Get('panel.pathedit') == 'Dropdown' ? true : false), 'label' => $lng['panel']['urloverridespath'], 'type' => 'text' ), 'redirectcode' => array( - 'visible' => (($settings['system']['webserver'] == 'apache2' && $settings['customredirect']['enabled'] == '1') ? true : false), + 'visible' => ((Settings::Get('system.webserver') == 'apache2' && Settings::Get('customredirect.enabled') == '1') ? true : false), 'label' => $lng['domains']['redirectifpathisurl'], 'desc' => $lng['domains']['redirectifpathisurlinfo'], 'type' => 'select', 'select_var' => isset($redirectcode) ? $redirectcode : null ), 'ssl_redirect' => array( - 'visible' => ($settings['system']['use_ssl'] == '1' ? ($ssl_ipsandports != '' ? true : false) : false), + 'visible' => (Settings::Get('system.use_ssl') == '1' ? ($ssl_ipsandports != '' ? true : false) : false), 'label' => $lng['domains']['ssl_redirect']['title'], 'desc' => $lng['domains']['ssl_redirect']['description'], 'type' => 'checkbox', diff --git a/lib/formfields/customer/domains/formfield.domains_edit.php b/lib/formfields/customer/domains/formfield.domains_edit.php index c5155ba0..7d809532 100644 --- a/lib/formfields/customer/domains/formfield.domains_edit.php +++ b/lib/formfields/customer/domains/formfield.domains_edit.php @@ -42,19 +42,19 @@ return array( ), 'path' => array( 'label' => $lng['panel']['path'], - 'desc' => ($settings['panel']['pathedit'] != 'Dropdown' ? $lng['panel']['pathDescriptionSubdomain'] : null).(isset($pathSelect['note']) ? '
'.$pathSelect['value'] : ''), + 'desc' => (Settings::Get('panel.pathedit') != 'Dropdown' ? $lng['panel']['pathDescriptionSubdomain'] : null).(isset($pathSelect['note']) ? '
'.$pathSelect['value'] : ''), 'type' => $pathSelect['type'], 'select_var' => $pathSelect['value'], 'value' => $pathSelect['value'] ), 'url' => array( - 'visible' => ($settings['panel']['pathedit'] == 'Dropdown' ? true : false), + 'visible' => (Settings::Get('panel.pathedit') == 'Dropdown' ? true : false), 'label' => $lng['panel']['urloverridespath'], 'type' => 'text', 'value' => $urlvalue ), 'redirectcode' => array( - 'visible' => (($settings['system']['webserver'] == 'apache2' && $settings['customredirect']['enabled'] == '1') ? true : false), + 'visible' => ((Settings::Get('system.webserver') == 'apache2' && Settings::Get('customredirect.enabled') == '1') ? true : false), 'label' => $lng['domains']['redirectifpathisurl'], 'desc' => $lng['domains']['redirectifpathisurlinfo'], 'type' => 'select', @@ -77,7 +77,7 @@ return array( 'value' => array($result['isemaildomain']) ), 'ssl_redirect' => array( - 'visible' => ($settings['system']['use_ssl'] == '1' ? ($ssl_ipsandports != '' ? (domainHasSslIpPort($result['id']) ? true : false) : false) : false), + 'visible' => (Settings::Get('system.use_ssl') == '1' ? ($ssl_ipsandports != '' ? (domainHasSslIpPort($result['id']) ? true : false) : false) : false), 'label' => $lng['domains']['ssl_redirect']['title'], 'desc' => $lng['domains']['ssl_redirect']['description'], 'type' => 'checkbox', diff --git a/lib/formfields/customer/email/formfield.emails_addaccount.php b/lib/formfields/customer/email/formfield.emails_addaccount.php index 27589051..00cc56c5 100644 --- a/lib/formfields/customer/email/formfield.emails_addaccount.php +++ b/lib/formfields/customer/email/formfield.emails_addaccount.php @@ -40,14 +40,14 @@ return array( 'value' => generatePassword(), ), 'email_quota' => array( - 'visible' => ($settings['system']['mail_quota_enabled'] == '1' ? true : false), + 'visible' => (Settings::Get('system.mail_quota_enabled') == '1' ? true : false), 'label' => $lng['emails']['quota'], 'desc' => $lng['panel']['megabyte'], 'type' => 'text', 'value' => $quota ), 'alternative_email' => array( - 'visible' => ($settings['panel']['sendalternativemail'] == '1' ? true : false), + 'visible' => (Settings::Get('panel.sendalternativemail') == '1' ? true : false), 'label' => $lng['emails']['alternative_emailaddress'], 'type' => 'text' ) diff --git a/lib/formfields/customer/email/formfield.emails_edit.php b/lib/formfields/customer/email/formfield.emails_edit.php index 070a8a5d..b222c127 100644 --- a/lib/formfields/customer/email/formfield.emails_edit.php +++ b/lib/formfields/customer/email/formfield.emails_edit.php @@ -43,7 +43,7 @@ return array( 'value' => $lng['panel']['no'].' ['.$lng['emails']['account_add'].']' ), 'mail_quota' => array( - 'visible' => ($result['popaccountid'] != 0 && $settings['system']['mail_quota_enabled']), + 'visible' => ($result['popaccountid'] != 0 && Settings::Get('system.mail_quota_enabled')), 'label' => $lng['customer']['email_quota'], 'type' => 'label', 'value' => $result['quota'].' '.$lng['panel']['megabyte'].' ['.$lng['emails']['quota_edit'].']' diff --git a/lib/formfields/customer/extras/formfield.htaccess_add.php b/lib/formfields/customer/extras/formfield.htaccess_add.php index c2ea84c8..ab53337c 100644 --- a/lib/formfields/customer/extras/formfield.htaccess_add.php +++ b/lib/formfields/customer/extras/formfield.htaccess_add.php @@ -26,7 +26,7 @@ return array( 'fields' => array( 'path' => array( 'label' => $lng['panel']['path'], - 'desc' => ($settings['panel']['pathedit'] != 'Dropdown' ? $lng['panel']['pathDescription'] : null).(isset($pathSelect['note']) ? '
'.$pathSelect['value'] : ''), + 'desc' => (Settings::Get('panel.pathedit') != 'Dropdown' ? $lng['panel']['pathDescription'] : null).(isset($pathSelect['note']) ? '
'.$pathSelect['value'] : ''), 'type' => $pathSelect['type'], 'select_var' => $pathSelect['value'], 'value' => $pathSelect['value'] @@ -45,13 +45,13 @@ return array( 'type' => 'text' ), 'error403path' => array( - 'visible' => ($settings['system']['webserver'] == 'apache2'), + 'visible' => (Settings::Get('system.webserver') == 'apache2'), 'label' => $lng['extras']['errordocument403path'], 'desc' => $lng['panel']['descriptionerrordocument'], 'type' => 'text' ), 'error500path' => array( - 'visible' => ($settings['system']['webserver'] == 'apache2'), + 'visible' => (Settings::Get('system.webserver') == 'apache2'), 'label' => $lng['extras']['errordocument500path'], 'desc' => $lng['panel']['descriptionerrordocument'], 'type' => 'text' diff --git a/lib/formfields/customer/extras/formfield.htaccess_edit.php b/lib/formfields/customer/extras/formfield.htaccess_edit.php index 47a24ee2..e2364813 100644 --- a/lib/formfields/customer/extras/formfield.htaccess_edit.php +++ b/lib/formfields/customer/extras/formfield.htaccess_edit.php @@ -44,14 +44,14 @@ return array( 'value' => $result['error404path'] ), 'error403path' => array( - 'visible' => ($settings['system']['webserver'] == 'apache2'), + 'visible' => (Settings::Get('system.webserver') == 'apache2'), 'label' => $lng['extras']['errordocument403path'], 'desc' => $lng['panel']['descriptionerrordocument'], 'type' => 'text', 'value' => $result['error403path'] ), 'error500path' => array( - 'visible' => ($settings['system']['webserver'] == 'apache2'), + 'visible' => (Settings::Get('system.webserver') == 'apache2'), 'label' => $lng['extras']['errordocument500path'], 'desc' => $lng['panel']['descriptionerrordocument'], 'type' => 'text', diff --git a/lib/formfields/customer/extras/formfield.htpasswd_add.php b/lib/formfields/customer/extras/formfield.htpasswd_add.php index 85e8a1a2..8ec3507c 100644 --- a/lib/formfields/customer/extras/formfield.htpasswd_add.php +++ b/lib/formfields/customer/extras/formfield.htpasswd_add.php @@ -26,7 +26,7 @@ return array( 'fields' => array( 'path' => array( 'label' => $lng['panel']['path'], - 'desc' => ($settings['panel']['pathedit'] != 'Dropdown' ? $lng['panel']['pathDescription'] : null).(isset($pathSelect['note']) ? '
'.$pathSelect['value'] : ''), + 'desc' => (Settings::Get('panel.pathedit') != 'Dropdown' ? $lng['panel']['pathDescription'] : null).(isset($pathSelect['note']) ? '
'.$pathSelect['value'] : ''), 'type' => $pathSelect['type'], 'select_var' => $pathSelect['value'], 'value' => $pathSelect['value'] diff --git a/lib/formfields/customer/ftp/formfield.ftp_add.php b/lib/formfields/customer/ftp/formfield.ftp_add.php index c7913b8f..115c65b1 100644 --- a/lib/formfields/customer/ftp/formfield.ftp_add.php +++ b/lib/formfields/customer/ftp/formfield.ftp_add.php @@ -24,19 +24,19 @@ return array( 'image' => 'icons/user_add.png', 'fields' => array( 'ftp_username' => array( - 'visible' => ($settings['customer']['ftpatdomain'] == '1' ? true : false), + 'visible' => (Settings::Get('customer.ftpatdomain') == '1' ? true : false), 'label' => $lng['login']['username'], 'type' => 'text' ), 'ftp_domain' => array( - 'visible' => ($settings['customer']['ftpatdomain'] == '1' ? true : false), + 'visible' => (Settings::Get('customer.ftpatdomain') == '1' ? true : false), 'label' => $lng['domains']['domainname'], 'type' => 'select', 'select_var' => (isset($domains) ? $domains : ""), ), 'path' => array( 'label' => $lng['panel']['path'], - 'desc' => ($settings['panel']['pathedit'] != 'Dropdown' ? $lng['panel']['pathDescription'] : null).(isset($pathSelect['note']) ? '
'.$pathSelect['value'] : ''), + 'desc' => (Settings::Get('panel.pathedit') != 'Dropdown' ? $lng['panel']['pathDescription'] : null).(isset($pathSelect['note']) ? '
'.$pathSelect['value'] : ''), 'type' => $pathSelect['type'], 'select_var' => $pathSelect['value'], 'value' => $pathSelect['value'] diff --git a/lib/formfields/customer/ftp/formfield.ftp_edit.php b/lib/formfields/customer/ftp/formfield.ftp_edit.php index 3ac5cf6f..5915d5d1 100644 --- a/lib/formfields/customer/ftp/formfield.ftp_edit.php +++ b/lib/formfields/customer/ftp/formfield.ftp_edit.php @@ -30,7 +30,7 @@ return array( ), 'path' => array( 'label' => $lng['panel']['path'], - 'desc' => ($settings['panel']['pathedit'] != 'Dropdown' ? $lng['panel']['pathDescription'] : null).(isset($pathSelect['note']) ? '
'.$pathSelect['value'] : ''), + 'desc' => (Settings::Get('panel.pathedit') != 'Dropdown' ? $lng['panel']['pathDescription'] : null).(isset($pathSelect['note']) ? '
'.$pathSelect['value'] : ''), 'type' => $pathSelect['type'], 'select_var' => $pathSelect['value'], 'value' => $pathSelect['value']