disable settings in 'froxlor vhost settings' that wont have any effect if no IP/port has the 'create vHost container' option enabled; fixes #642

Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann
2019-02-11 16:08:34 +01:00
parent 8fd910a92e
commit 8ab86a05b2
4 changed files with 71 additions and 14 deletions

View File

@@ -0,0 +1,16 @@
<?php
namespace Froxlor\Settings;
use Froxlor\Database\Database;
class FroxlorVhostSettings
{
public static function hasVhostContainerEnabled()
{
$sel_stmt = Database::prepare("SELECT COUNT(*) as vcentries FROM `" . TABLE_PANEL_IPSANDPORTS . "` WHERE `vhostcontainer`= '1'");
$result = Database::pexecute_first($sel_stmt);
return $result['vcentries'] > 0 ? true : false;
}
}