diff --git a/actions/admin/settings/122.froxlorvhost.php b/actions/admin/settings/122.froxlorvhost.php index 14911922..d1948060 100644 --- a/actions/admin/settings/122.froxlorvhost.php +++ b/actions/admin/settings/122.froxlorvhost.php @@ -53,7 +53,7 @@ return array( 'visible' => \Froxlor\Settings::Get('system.leenabled') && call_user_func(array( '\Froxlor\Settings\FroxlorVhostSettings', 'hasVhostContainerEnabled' - )) + ), true) ), 'system_le_froxlor_redirect' => array( 'label' => $lng['serversettings']['le_froxlor_redirect'], @@ -65,7 +65,7 @@ return array( 'visible' => \Froxlor\Settings::Get('system.use_ssl') && call_user_func(array( '\Froxlor\Settings\FroxlorVhostSettings', 'hasVhostContainerEnabled' - )) + ), true) ), 'system_hsts_maxage' => array( 'label' => $lng['admin']['domain_hsts_maxage'], @@ -79,7 +79,7 @@ return array( 'visible' => \Froxlor\Settings::Get('system.use_ssl') && call_user_func(array( '\Froxlor\Settings\FroxlorVhostSettings', 'hasVhostContainerEnabled' - )) + ), true) ), 'system_hsts_incsub' => array( 'label' => $lng['admin']['domain_hsts_incsub'], @@ -91,7 +91,7 @@ return array( 'visible' => \Froxlor\Settings::Get('system.use_ssl') && call_user_func(array( '\Froxlor\Settings\FroxlorVhostSettings', 'hasVhostContainerEnabled' - )) + ), true) ), 'system_hsts_preload' => array( 'label' => $lng['admin']['domain_hsts_preload'], @@ -103,7 +103,7 @@ return array( 'visible' => \Froxlor\Settings::Get('system.use_ssl') && call_user_func(array( '\Froxlor\Settings\FroxlorVhostSettings', 'hasVhostContainerEnabled' - )) + ), true) ), /** * FCGID diff --git a/lib/Froxlor/Settings/FroxlorVhostSettings.php b/lib/Froxlor/Settings/FroxlorVhostSettings.php index 2096552f..5ed2502c 100644 --- a/lib/Froxlor/Settings/FroxlorVhostSettings.php +++ b/lib/Froxlor/Settings/FroxlorVhostSettings.php @@ -6,9 +6,9 @@ use Froxlor\Database\Database; class FroxlorVhostSettings { - public static function hasVhostContainerEnabled() + public static function hasVhostContainerEnabled($need_ssl = false) { - $sel_stmt = Database::prepare("SELECT COUNT(*) as vcentries FROM `" . TABLE_PANEL_IPSANDPORTS . "` WHERE `vhostcontainer`= '1'"); + $sel_stmt = Database::prepare("SELECT COUNT(*) as vcentries FROM `" . TABLE_PANEL_IPSANDPORTS . "` WHERE `vhostcontainer`= '1'" . ($need_ssl ? " AND `ssl` = '1'" : "")); $result = Database::pexecute_first($sel_stmt); return $result['vcentries'] > 0 ? true : false; }