more function moving

Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann
2018-12-20 08:33:32 +01:00
parent 8c896d60d6
commit bed069f269
41 changed files with 336 additions and 351 deletions

View File

@@ -43,18 +43,18 @@ return array(
),
'path' => array(
'label' => $lng['panel']['path'],
'desc' => (Settings::Get('panel.pathedit') != 'Dropdown' ? $lng['panel']['pathDescriptionSubdomain'] : null).(isset($pathSelect['note']) ? $pathSelect['note'].'<br />'.$pathSelect['value'] : ''),
'desc' => (\Froxlor\Settings::Get('panel.pathedit') != 'Dropdown' ? $lng['panel']['pathDescriptionSubdomain'] : null).(isset($pathSelect['note']) ? $pathSelect['note'].'<br />'.$pathSelect['value'] : ''),
'type' => $pathSelect['type'],
'select_var' => $pathSelect['value'],
'value' => $pathSelect['value']
),
'url' => array(
'visible' => (Settings::Get('panel.pathedit') == 'Dropdown' ? true : false),
'visible' => (\Froxlor\Settings::Get('panel.pathedit') == 'Dropdown' ? true : false),
'label' => $lng['panel']['urloverridespath'],
'type' => 'text'
),
'redirectcode' => array(
'visible' => (Settings::Get('customredirect.enabled') == '1' ? true : false),
'visible' => (\Froxlor\Settings::Get('customredirect.enabled') == '1' ? true : false),
'label' => $lng['domains']['redirectifpathisurl'],
'desc' => $lng['domains']['redirectifpathisurlinfo'],
'type' => 'select',
@@ -72,7 +72,7 @@ return array(
'select_var' => $openbasedir
),
'phpsettingid' => array(
'visible' => (((int) Settings::Get('system.mod_fcgid') == 1 || (int) Settings::Get('phpfpm.enabled') == 1) && $has_phpconfigs ? true : false),
'visible' => (((int) \Froxlor\Settings::Get('system.mod_fcgid') == 1 || (int) \Froxlor\Settings::Get('phpfpm.enabled') == 1) && $has_phpconfigs ? true : false),
'label' => $lng['admin']['phpsettings']['title'],
'type' => 'select',
'select_var' => $phpconfigs
@@ -82,7 +82,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' => \Froxlor\Settings::Get('system.use_ssl') == '1' ? ($ssl_ipsandports != '' ? true : false) : false,
'fields' => array(
'ssl_redirect' => array(
'label' => $lng['domains']['ssl_redirect']['title'],
@@ -94,7 +94,7 @@ return array(
'value' => array()
),
'letsencrypt' => array(
'visible' => (Settings::Get('system.leenabled') == '1' ? true : false),
'visible' => (\Froxlor\Settings::Get('system.leenabled') == '1' ? true : false),
'label' => $lng['customer']['letsencrypt']['title'],
'desc' => $lng['customer']['letsencrypt']['description'],
'type' => 'checkbox',

View File

@@ -42,19 +42,19 @@ return array(
),
'path' => array(
'label' => $lng['panel']['path'],
'desc' => (Settings::Get('panel.pathedit') != 'Dropdown' ? $lng['panel']['pathDescriptionSubdomain'] : null).(isset($pathSelect['note']) ? '<br />'.$pathSelect['value'] : ''),
'desc' => (\Froxlor\Settings::Get('panel.pathedit') != 'Dropdown' ? $lng['panel']['pathDescriptionSubdomain'] : null).(isset($pathSelect['note']) ? '<br />'.$pathSelect['value'] : ''),
'type' => $pathSelect['type'],
'select_var' => $pathSelect['value'],
'value' => $pathSelect['value']
),
'url' => array(
'visible' => (Settings::Get('panel.pathedit') == 'Dropdown' ? true : false),
'visible' => (\Froxlor\Settings::Get('panel.pathedit') == 'Dropdown' ? true : false),
'label' => $lng['panel']['urloverridespath'],
'type' => 'text',
'value' => $urlvalue
),
'redirectcode' => array(
'visible' => (Settings::Get('customredirect.enabled') == '1' ? true : false),
'visible' => (\Froxlor\Settings::Get('customredirect.enabled') == '1' ? true : false),
'label' => $lng['domains']['redirectifpathisurl'],
'desc' => $lng['domains']['redirectifpathisurlinfo'],
'type' => 'select',
@@ -83,7 +83,7 @@ return array(
'select_var' => $openbasedir
),
'phpsettingid' => array(
'visible' => (((int) Settings::Get('system.mod_fcgid') == 1 || (int) Settings::Get('phpfpm.enabled') == 1) && $has_phpconfigs ? true : false),
'visible' => (((int) \Froxlor\Settings::Get('system.mod_fcgid') == 1 || (int) \Froxlor\Settings::Get('phpfpm.enabled') == 1) && $has_phpconfigs ? true : false),
'label' => $lng['admin']['phpsettings']['title'],
'type' => 'select',
'select_var' => $phpconfigs
@@ -93,7 +93,7 @@ return array(
'section_bssl' => array(
'title' => $lng['admin']['webserversettings_ssl'],
'image' => 'icons/domain_edit.png',
'visible' => Settings::Get('system.use_ssl') == '1' ? ($ssl_ipsandports != '' ? (domainHasSslIpPort($result['id']) ? true : false) : false) : false,
'visible' => \Froxlor\Settings::Get('system.use_ssl') == '1' ? ($ssl_ipsandports != '' ? (domainHasSslIpPort($result['id']) ? true : false) : false) : false,
'fields' => array(
'ssl_redirect' => array(
'label' => $lng['domains']['ssl_redirect']['title'],
@@ -105,7 +105,7 @@ return array(
'value' => array($result['ssl_redirect'])
),
'letsencrypt' => array(
'visible' => Settings::Get('system.leenabled') == '1' ? true : false,
'visible' => \Froxlor\Settings::Get('system.leenabled') == '1' ? true : false,
'label' => $lng['customer']['letsencrypt']['title'],
'desc' => $lng['customer']['letsencrypt']['description'],
'type' => 'checkbox',

View File

@@ -37,8 +37,8 @@ return array(
'email_password_suggestion' => array(
'label' => $lng['customer']['generated_pwd'],
'type' => 'text',
'visible' => (Settings::Get('panel.password_regex') == ''),
'value' => \Froxlor\System::generatePassword(),
'visible' => (\Froxlor\Settings::Get('panel.password_regex') == ''),
'value' => \Froxlor\System\Crypt::generatePassword(),
)
)
)

View File

@@ -37,18 +37,18 @@ return array(
'email_password_suggestion' => array(
'label' => $lng['customer']['generated_pwd'],
'type' => 'text',
'visible' => (Settings::Get('panel.password_regex') == ''),
'value' => \Froxlor\System::generatePassword(),
'visible' => (\Froxlor\Settings::Get('panel.password_regex') == ''),
'value' => \Froxlor\System\Crypt::generatePassword(),
),
'email_quota' => array(
'visible' => (Settings::Get('system.mail_quota_enabled') == '1' ? true : false),
'visible' => (\Froxlor\Settings::Get('system.mail_quota_enabled') == '1' ? true : false),
'label' => $lng['emails']['quota'],
'desc' => "MiB",
'type' => 'text',
'value' => $quota
),
'alternative_email' => array(
'visible' => (Settings::Get('panel.sendalternativemail') == '1' ? true : false),
'visible' => (\Froxlor\Settings::Get('panel.sendalternativemail') == '1' ? true : false),
'label' => $lng['emails']['alternative_emailaddress'],
'type' => 'text'
)

View File

@@ -43,7 +43,7 @@ return array(
'value' => $lng['panel']['no'].'&nbsp;[<a href="'.$filename.'?page=accounts&amp;action=add&amp;id='.$result['id'].'&amp;s='.$s.'">'.$lng['emails']['account_add'].'</a>]'
),
'mail_quota' => array(
'visible' => ($result['popaccountid'] != 0 && Settings::Get('system.mail_quota_enabled')),
'visible' => ($result['popaccountid'] != 0 && \Froxlor\Settings::Get('system.mail_quota_enabled')),
'label' => $lng['customer']['email_quota'],
'type' => 'label',
'value' => $result['quota'].' MiB [<a href="'.$filename.'?page=accounts&amp;action=changequota&amp;id='.$result['id'].'&amp;s='.$s.'">'.$lng['emails']['quota_edit'].'</a>]'

View File

@@ -25,7 +25,7 @@ return array(
'fields' => array(
'path' => array(
'label' => $lng['panel']['backuppath']['title'],
'desc' => $lng['panel']['backuppath']['description'].'<br>'.(Settings::Get('panel.pathedit') != 'Dropdown' ? $lng['panel']['pathDescription'] : null).(isset($pathSelect['note']) ? '<br />'.$pathSelect['value'] : ''),
'desc' => $lng['panel']['backuppath']['description'].'<br>'.(\Froxlor\Settings::Get('panel.pathedit') != 'Dropdown' ? $lng['panel']['pathDescription'] : null).(isset($pathSelect['note']) ? '<br />'.$pathSelect['value'] : ''),
'type' => $pathSelect['type'],
'select_var' => $pathSelect['value'],
'value' => $pathSelect['value']

View File

@@ -26,7 +26,7 @@ return array(
'fields' => array(
'path' => array(
'label' => $lng['panel']['path'],
'desc' => (Settings::Get('panel.pathedit') != 'Dropdown' ? $lng['panel']['pathDescription'] : null).(isset($pathSelect['note']) ? '<br />'.$pathSelect['value'] : ''),
'desc' => (\Froxlor\Settings::Get('panel.pathedit') != 'Dropdown' ? $lng['panel']['pathDescription'] : null).(isset($pathSelect['note']) ? '<br />'.$pathSelect['value'] : ''),
'type' => $pathSelect['type'],
'select_var' => $pathSelect['value'],
'value' => $pathSelect['value']
@@ -45,13 +45,13 @@ return array(
'type' => 'text'
),
'error403path' => array(
'visible' => (Settings::Get('system.webserver') == 'apache2'),
'visible' => (\Froxlor\Settings::Get('system.webserver') == 'apache2'),
'label' => $lng['extras']['errordocument403path'],
'desc' => $lng['panel']['descriptionerrordocument'],
'type' => 'text'
),
'error500path' => array(
'visible' => (Settings::Get('system.webserver') == 'apache2'),
'visible' => (\Froxlor\Settings::Get('system.webserver') == 'apache2'),
'label' => $lng['extras']['errordocument500path'],
'desc' => $lng['panel']['descriptionerrordocument'],
'type' => 'text'

View File

@@ -44,14 +44,14 @@ return array(
'value' => $result['error404path']
),
'error403path' => array(
'visible' => (Settings::Get('system.webserver') == 'apache2'),
'visible' => (\Froxlor\Settings::Get('system.webserver') == 'apache2'),
'label' => $lng['extras']['errordocument403path'],
'desc' => $lng['panel']['descriptionerrordocument'],
'type' => 'text',
'value' => $result['error403path']
),
'error500path' => array(
'visible' => (Settings::Get('system.webserver') == 'apache2'),
'visible' => (\Froxlor\Settings::Get('system.webserver') == 'apache2'),
'label' => $lng['extras']['errordocument500path'],
'desc' => $lng['panel']['descriptionerrordocument'],
'type' => 'text',

View File

@@ -26,7 +26,7 @@ return array(
'fields' => array(
'path' => array(
'label' => $lng['panel']['path'],
'desc' => (Settings::Get('panel.pathedit') != 'Dropdown' ? $lng['panel']['pathDescription'] : null).(isset($pathSelect['note']) ? '<br />'.$pathSelect['value'] : ''),
'desc' => (\Froxlor\Settings::Get('panel.pathedit') != 'Dropdown' ? $lng['panel']['pathDescription'] : null).(isset($pathSelect['note']) ? '<br />'.$pathSelect['value'] : ''),
'type' => $pathSelect['type'],
'select_var' => $pathSelect['value'],
'value' => $pathSelect['value']
@@ -43,8 +43,8 @@ return array(
'directory_password_suggestion' => array(
'label' => $lng['customer']['generated_pwd'],
'type' => 'text',
'visible' => (Settings::Get('panel.password_regex') == ''),
'value' => \Froxlor\System::generatePassword(),
'visible' => (\Froxlor\Settings::Get('panel.password_regex') == ''),
'value' => \Froxlor\System\Crypt::generatePassword(),
),
'directory_authname' => array(
'label' => $lng['extras']['htpasswdauthname'],

View File

@@ -42,8 +42,8 @@ return array(
'directory_password_suggestion' => array(
'label' => $lng['customer']['generated_pwd'],
'type' => 'text',
'visible' => (Settings::Get('panel.password_regex') == ''),
'value' => \Froxlor\System::generatePassword(),
'visible' => (\Froxlor\Settings::Get('panel.password_regex') == ''),
'value' => \Froxlor\System\Crypt::generatePassword(),
),
'directory_authname' => array(
'label' => $lng['extras']['htpasswdauthname'],

View File

@@ -24,12 +24,12 @@ return array(
'image' => 'icons/user_add.png',
'fields' => array(
'ftp_username' => array(
'visible' => (Settings::Get('customer.ftpatdomain') == '1' ? true : false),
'visible' => (\Froxlor\Settings::Get('customer.ftpatdomain') == '1' ? true : false),
'label' => $lng['login']['username'],
'type' => 'text'
),
'ftp_domain' => array(
'visible' => (Settings::Get('customer.ftpatdomain') == '1' ? true : false),
'visible' => (\Froxlor\Settings::Get('customer.ftpatdomain') == '1' ? true : false),
'label' => $lng['domains']['domainname'],
'type' => 'select',
'select_var' => (isset($domains) ? $domains : ""),
@@ -40,7 +40,7 @@ return array(
),
'path' => array(
'label' => $lng['panel']['path'],
'desc' => (Settings::Get('panel.pathedit') != 'Dropdown' ? $lng['panel']['pathDescription'] : null).(isset($pathSelect['note']) ? '<br />'.$pathSelect['value'] : ''),
'desc' => (\Froxlor\Settings::Get('panel.pathedit') != 'Dropdown' ? $lng['panel']['pathDescription'] : null).(isset($pathSelect['note']) ? '<br />'.$pathSelect['value'] : ''),
'type' => $pathSelect['type'],
'select_var' => $pathSelect['value'],
'value' => $pathSelect['value']
@@ -53,8 +53,8 @@ return array(
'ftp_password_suggestion' => array(
'label' => $lng['customer']['generated_pwd'],
'type' => 'text',
'visible' => (Settings::Get('panel.password_regex') == ''),
'value' => \Froxlor\System::generatePassword(),
'visible' => (\Froxlor\Settings::Get('panel.password_regex') == ''),
'value' => \Froxlor\System\Crypt::generatePassword(),
),
'sendinfomail' => array(
'label' => $lng['customer']['sendinfomail'],
@@ -65,7 +65,7 @@ return array(
'value' => array()
),
'shell' => array(
'visible' => (Settings::Get('system.allow_customer_shell') == '1' ? true : false),
'visible' => (\Froxlor\Settings::Get('system.allow_customer_shell') == '1' ? true : false),
'label' => $lng['panel']['shell'],
'type' => 'select',
'select_var' => (isset($shells) ? $shells : ""),

View File

@@ -35,7 +35,7 @@ return array(
),
'path' => array(
'label' => $lng['panel']['path'],
'desc' => (Settings::Get('panel.pathedit') != 'Dropdown' ? $lng['panel']['pathDescription'] : null).(isset($pathSelect['note']) ? '<br />'.$pathSelect['value'] : ''),
'desc' => (\Froxlor\Settings::Get('panel.pathedit') != 'Dropdown' ? $lng['panel']['pathDescription'] : null).(isset($pathSelect['note']) ? '<br />'.$pathSelect['value'] : ''),
'type' => $pathSelect['type'],
'select_var' => $pathSelect['value'],
'value' => $pathSelect['value']
@@ -49,11 +49,11 @@ return array(
'ftp_password_suggestion' => array(
'label' => $lng['customer']['generated_pwd'],
'type' => 'text',
'visible' => (Settings::Get('panel.password_regex') == ''),
'value' => \Froxlor\System::generatePassword(),
'visible' => (\Froxlor\Settings::Get('panel.password_regex') == ''),
'value' => \Froxlor\System\Crypt::generatePassword(),
),
'shell' => array(
'visible' => (Settings::Get('system.allow_customer_shell') == '1' ? true : false),
'visible' => (\Froxlor\Settings::Get('system.allow_customer_shell') == '1' ? true : false),
'label' => $lng['panel']['shell'],
'type' => 'select',
'select_var' => (isset($shells) ? $shells : ""),

View File

@@ -40,8 +40,8 @@ return array(
'mysql_password_suggestion' => array(
'label' => $lng['customer']['generated_pwd'],
'type' => 'text',
'visible' => (Settings::Get('panel.password_regex') == ''),
'value' => \Froxlor\System::generatePassword()
'visible' => (\Froxlor\Settings::Get('panel.password_regex') == ''),
'value' => \Froxlor\System\Crypt::generatePassword()
),
'sendinfomail' => array(
'label' => $lng['customer']['sendinfomail'],

View File

@@ -46,8 +46,8 @@ return array(
'mysql_password_suggestion' => array(
'label' => $lng['customer']['generated_pwd'],
'type' => 'text',
'visible' => (Settings::Get('panel.password_regex') == ''),
'value' => \Froxlor\System::generatePassword()
'visible' => (\Froxlor\Settings::Get('panel.password_regex') == ''),
'value' => \Froxlor\System\Crypt::generatePassword()
)
)
)