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:
16
lib/Froxlor/Settings/FroxlorVhostSettings.php
Normal file
16
lib/Froxlor/Settings/FroxlorVhostSettings.php
Normal 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;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user