adjustments in settings-arrays

Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann 2018-12-19 14:54:46 +01:00
parent e4a0cc73bd
commit 2c893fef25
No known key found for this signature in database
GPG Key ID: 55284EC83A4823B8
8 changed files with 32 additions and 93 deletions

View File

@ -11,7 +11,7 @@
* @copyright (c) the authors
* @author Froxlor team <team@froxlor.org> (2016-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Settings
* @package \Froxlor\Settings
*
*/
return array(
@ -40,7 +40,7 @@ return array(
'type' => 'bool',
'default' => false,
'save_method' => 'storeSettingClearCertificates',
'visible' => Settings::Get('system.leenabled')
'visible' => \Froxlor\Settings::Get('system.leenabled')
),
'system_le_froxlor_redirect' => array(
'label' => $lng['serversettings']['le_froxlor_redirect'],
@ -49,7 +49,7 @@ return array(
'type' => 'bool',
'default' => false,
'save_method' => 'storeSettingField',
'visible' => Settings::Get('system.use_ssl')
'visible' => \Froxlor\Settings::Get('system.use_ssl')
),
'system_hsts_maxage' => array(
'label' => $lng['admin']['domain_hsts_maxage'],
@ -60,7 +60,7 @@ return array(
'int_max' => 94608000, // 3-years
'default' => 0,
'save_method' => 'storeSettingField',
'visible' => Settings::Get('system.use_ssl')
'visible' => \Froxlor\Settings::Get('system.use_ssl')
),
'system_hsts_incsub' => array(
'label' => $lng['admin']['domain_hsts_incsub'],
@ -69,7 +69,7 @@ return array(
'type' => 'bool',
'default' => false,
'save_method' => 'storeSettingField',
'visible' => Settings::Get('system.use_ssl')
'visible' => \Froxlor\Settings::Get('system.use_ssl')
),
'system_hsts_preload' => array(
'label' => $lng['admin']['domain_hsts_preload'],
@ -78,7 +78,7 @@ return array(
'type' => 'bool',
'default' => false,
'save_method' => 'storeSettingField',
'visible' => Settings::Get('system.use_ssl')
'visible' => \Froxlor\Settings::Get('system.use_ssl')
),
/**
* FCGID
@ -93,7 +93,7 @@ return array(
'websrv_avail' => array(
'apache2'
),
'visible' => Settings::Get('system.mod_fcgid')
'visible' => \Froxlor\Settings::Get('system.mod_fcgid')
),
'system_mod_fcgid_httpuser' => array(
'label' => $lng['admin']['mod_fcgid_user'],
@ -105,7 +105,7 @@ return array(
'websrv_avail' => array(
'apache2'
),
'visible' => Settings::Get('system.mod_fcgid')
'visible' => \Froxlor\Settings::Get('system.mod_fcgid')
),
'system_mod_fcgid_httpgroup' => array(
'label' => $lng['admin']['mod_fcgid_group'],
@ -117,7 +117,7 @@ return array(
'websrv_avail' => array(
'apache2'
),
'visible' => Settings::Get('system.mod_fcgid')
'visible' => \Froxlor\Settings::Get('system.mod_fcgid')
),
'system_mod_fcgid_defaultini_ownvhost' => array(
'label' => $lng['serversettings']['mod_fcgid']['defaultini_ownvhost'],
@ -131,7 +131,7 @@ return array(
'websrv_avail' => array(
'apache2'
),
'visible' => Settings::Get('system.mod_fcgid')
'visible' => \Froxlor\Settings::Get('system.mod_fcgid')
),
/**
* php-fpm
@ -143,7 +143,7 @@ return array(
'type' => 'bool',
'default' => true,
'save_method' => 'storeSettingField',
'visible' => Settings::Get('phpfpm.enabled')
'visible' => \Froxlor\Settings::Get('phpfpm.enabled')
),
'system_phpfpm_httpuser' => array(
'label' => $lng['phpfpm']['vhost_httpuser'],
@ -152,7 +152,7 @@ return array(
'type' => 'string',
'default' => 'froxlorlocal',
'save_method' => 'storeSettingWebserverFcgidFpmUser',
'visible' => Settings::Get('phpfpm.enabled')
'visible' => \Froxlor\Settings::Get('phpfpm.enabled')
),
'system_phpfpm_httpgroup' => array(
'label' => $lng['phpfpm']['vhost_httpgroup'],
@ -161,7 +161,7 @@ return array(
'type' => 'string',
'default' => 'froxlorlocal',
'save_method' => 'storeSettingField',
'visible' => Settings::Get('phpfpm.enabled')
'visible' => \Froxlor\Settings::Get('phpfpm.enabled')
),
'system_phpfpm_defaultini_ownvhost' => array(
'label' => $lng['serversettings']['mod_fcgid']['defaultini_ownvhost'],
@ -172,7 +172,7 @@ return array(
'option_mode' => 'one',
'option_options_method' => 'getPhpConfigs',
'save_method' => 'storeSettingField',
'visible' => Settings::Get('phpfpm.enabled')
'visible' => \Froxlor\Settings::Get('phpfpm.enabled')
),
/**
* DNS
@ -184,7 +184,7 @@ return array(
'type' => 'bool',
'default' => false,
'save_method' => 'storeSettingField',
'visible' => Settings::Get('system.bind_enable')
'visible' => \Froxlor\Settings::Get('system.bind_enable')
)
)
)

View File

@ -13,7 +13,7 @@
* @author Florian Lippert <flo@syscp.org> (2003-2009)
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Settings
* @package \Froxlor\Settings
*
*/
return array(
@ -55,7 +55,7 @@ return array(
'type' => 'bool',
'default' => false,
'save_method' => 'storeSettingField',
'visible' => (Settings::Get('system.mod_fcgid') == 0 && Settings::Get('phpfpm.enabled') == 0),
'visible' => (\Froxlor\Settings::Get('system.mod_fcgid') == 0 && \Froxlor\Settings::Get('phpfpm.enabled') == 0),
'websrv_avail' => array(
'apache2'
)
@ -71,7 +71,7 @@ return array(
'apache2',
'nginx'
),
'visible' => Settings::Get('system.use_ssl')
'visible' => \Froxlor\Settings::Get('system.use_ssl')
),
'system_dhparams_file' => array(
'label' => $lng['serversettings']['dhparams_file'],
@ -82,7 +82,7 @@ return array(
'string_emptyallowed' => true,
'default' => '',
'save_method' => 'storeSettingField',
'visible' => Settings::Get('system.use_ssl')
'visible' => \Froxlor\Settings::Get('system.use_ssl')
),
'system_httpuser' => array(
'label' => $lng['admin']['webserver_user'],
@ -231,7 +231,7 @@ return array(
'type' => 'text',
'default' => '',
'save_method' => 'storeSettingField',
'visible' => (Settings::Get('system.mod_fcgid') == 0 && Settings::Get('phpfpm.enabled') == 0),
'visible' => (\Froxlor\Settings::Get('system.mod_fcgid') == 0 && \Froxlor\Settings::Get('phpfpm.enabled') == 0),
'websrv_avail' => array(
'apache2'
)

View File

@ -13,7 +13,7 @@
* @author Florian Lippert <flo@syscp.org> (2003-2009)
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Settings
* @package \Froxlor\Settings
*
*/
return array(
@ -102,7 +102,7 @@ return array(
'string_type' => 'string',
'string_emptyallowed' => false,
'default' => 'shmcb:/var/run/apache2/ocsp-stapling.cache(131072)',
'visible' => Settings::Get('system.webserver') == "apache2" && Settings::Get('system.apache24') == 1,
'visible' => \Froxlor\Settings::Get('system.webserver') == "apache2" && \Froxlor\Settings::Get('system.apache24') == 1,
'save_method' => 'storeSettingField'
),
'system_leenabled' => array(
@ -144,8 +144,8 @@ return array(
'default' => 'testing',
'option_mode' => 'one',
'option_options' => array(
'testing' => 'https://acme-staging' . (Settings::Get('system.leapiversion') == '2' ? '-v02' : '') . '.api.letsencrypt.org (Test)',
'production' => 'https://acme-v0' . Settings::Get('system.leapiversion') . '.api.letsencrypt.org (Live)'
'testing' => 'https://acme-staging' . (\Froxlor\Settings::Get('system.leapiversion') == '2' ? '-v02' : '') . '.api.letsencrypt.org (Test)',
'production' => 'https://acme-v0' . \Froxlor\Settings::Get('system.leapiversion') . '.api.letsencrypt.org (Live)'
),
'save_method' => 'storeSettingField'
),

View File

@ -11,7 +11,7 @@
* @copyright (c) the authors
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Settings
* @package \Froxlor\Settings
*
*/
@ -95,7 +95,7 @@ return array(
'varname' => 'use_mod_proxy',
'type' => 'bool',
'default' => false,
'visible' => Settings::Get('system.apache24'),
'visible' => \Froxlor\Settings::Get('system.apache24'),
'save_method' => 'storeSettingField'
),
'system_phpfpm_ini_flags' => array(

View File

@ -13,7 +13,7 @@
* @author Florian Lippert <flo@syscp.org> (2003-2009)
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Settings
* @package \Froxlor\Settings
*
*/
@ -81,7 +81,7 @@ return array(
'dkim_keylength' => array(
'label' => array(
'title' => $lng['dkim']['dkim_keylength']['title'],
'description' => sprintf($lng['dkim']['dkim_keylength']['description'], Settings::Get('dkim.dkim_prefix'))
'description' => sprintf($lng['dkim']['dkim_keylength']['description'], \Froxlor\Settings::Get('dkim.dkim_prefix'))
),
'settinggroup' => 'dkim',
'varname' => 'dkim_keylength',

View File

@ -183,18 +183,6 @@ class FroxlorLogger
self::$crondebug_flag = (bool) $_flag;
}
/**
* setter for crondebug-flag
*
* @param bool $_flag
*
* @return void
*/
public function setCronDebugFlag($_flag = false)
{
self::$crondebug_flag = (bool) $_flag;
}
private function getLogLevelDesc($type)
{
switch ($type) {

View File

@ -303,18 +303,18 @@ if (isset($userinfo['language']) && isset($languages[$userinfo['language']])) {
// include every english language file we can get
foreach ($langs['English'] as $key => $value) {
include_once makeSecurePath($value['file']);
include_once \Froxlor\FileDir::makeSecurePath($value['file']);
}
// now include the selected language if its not english
if ($language != 'English') {
foreach ($langs[$language] as $key => $value) {
include_once makeSecurePath($value['file']);
include_once \Froxlor\FileDir::makeSecurePath($value['file']);
}
}
// last but not least include language references file
include_once makeSecurePath('lng/lng_references.php');
include_once \Froxlor\FileDir::makeSecurePath('lng/lng_references.php');
// Initialize our new link - class
$linker = new linker('index.php', $s);
@ -394,7 +394,7 @@ if (isset($userinfo['loginname'])
*/
$navigation = "";
if (AREA == 'admin' || AREA == 'customer') {
if (hasUpdates($version) || hasDbUpdates($dbversion)) {
if (\Froxlor\Froxlor::hasUpdates() || \Froxlor\Froxlor::hasDbUpdates()) {
/*
* if froxlor-files have been updated
* but not yet configured by the admin
@ -436,43 +436,6 @@ if (AREA == 'admin' || AREA == 'customer') {
unset($navigation_data);
}
/**
* header information about open tickets (only if used)
*/
$awaitingtickets = 0;
$awaitingtickets_text = '';
if (Settings::Get('ticket.enabled') == '1') {
$opentickets = 0;
if (AREA == 'admin' && isset($userinfo['adminid'])) {
$opentickets_stmt = Database::prepare("
SELECT COUNT(`id`) as `count` FROM `" . TABLE_PANEL_TICKETS . "`
WHERE `answerto` = '0' AND (`status` = '0' OR `status` = '1')
AND `lastreplier` = '0' AND `adminid` = :adminid
");
$opentickets = Database::pexecute_first($opentickets_stmt, array('adminid' => $userinfo['adminid']));
$awaitingtickets = $opentickets['count'];
if ($opentickets > 0) {
$awaitingtickets_text = strtr($lng['ticket']['awaitingticketreply'], array('%s' => '<a href="admin_tickets.php?page=tickets&amp;s=' . $s . '">' . $opentickets['count'] . '</a>'));
}
}
elseif (AREA == 'customer' && isset($userinfo['customerid'])) {
$opentickets_stmt = Database::prepare("
SELECT COUNT(`id`) as `count` FROM `" . TABLE_PANEL_TICKETS . "`
WHERE `answerto` = '0' AND (`status` = '0' OR `status` = '2')
AND `lastreplier` = '1' AND `customerid` = :customerid
");
$opentickets = Database::pexecute_first($opentickets_stmt, array('customerid' => $userinfo['customerid']));
$awaitingtickets = $opentickets['count'];
if ($opentickets > 0) {
$awaitingtickets_text = strtr($lng['ticket']['awaitingticketreply'], array('%s' => '<a href="customer_tickets.php?page=tickets&amp;s=' . $s . '">' . $opentickets['count'] . '</a>'));
}
}
}
$js = "";
if (array_key_exists('js', $_themeoptions['variants'][$themevariant]) && is_array($_themeoptions['variants'][$themevariant]['js'])) {
foreach ($_themeoptions['variants'][$themevariant]['js'] as $jsfile) {

View File

@ -48,18 +48,6 @@
<a href="{$linker->getLink(array('section' => 'configfiles', 'page' => 'configfiles'))}">{$lng['panel']['not_configured']}</a>
</li>
</if>
<if \Froxlor\Settings::Get('ticket.enabled') == 1>
<li>
<a href="{$linker->getLink(array('section' => 'tickets', 'page' => 'tickets'))}">
<if 0 < $awaitingtickets>
<img src="templates/{$theme}/assets/img/icons/menubar_tickets.png" alt="{$lng['menue']['ticket']['ticket']}" />
<span class="countbubble">{$awaitingtickets}</span>
<else>
<img src="templates/{$theme}/assets/img/icons/menubar_tickets_null.png" alt="{$lng['menue']['ticket']['ticket']}" />
</if>
</a>
</li>
</if>
<li>{$userinfo['loginname']}</li>
<li><a href="{$linker->getLink(array('section' => 'index'))}">{$lng['panel']['dashboard']}</a></li>
<li><a href="#">{$lng['panel']['options']}&nbsp;&#x25BE;</a>