Check for SSL enabled vhost-container for ssl-related settings in froxlor-vhost-settings; fixes #642
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user