Merge pull request #326 from Churro/froxlorMerge_vhostTemplates

Vhost templates: Added a field to select the target webserver
This commit is contained in:
Michael Kaufmann
2016-02-27 20:43:10 +01:00
12 changed files with 143 additions and 133 deletions

View File

@@ -1012,7 +1012,8 @@ if ($page == 'domains'
// vhost configs
$vhostconfigs = '';
$configsvhost = Database::query("SELECT * FROM `" . TABLE_PANEL_VHOSTCONFIGS . "` ORDER BY description ASC");
$configsvhost = Database::prepare("SELECT * FROM `" . TABLE_PANEL_VHOSTCONFIGS . "` WHERE `webserver` = :webserver ORDER BY description ASC");
Database::pexecute($configsvhost, array('webserver' => Settings::Get('system.webserver')));
$vhostconfigs.= makeoption($lng['admin']['vhostsettings']['novhostsettings'], 0);
while ($row = $configsvhost->fetch(PDO::FETCH_ASSOC)) {
@@ -2000,7 +2001,9 @@ if ($page == 'domains'
// vhost configs
$vhostconfigs = '';
$vhostconfigs_result_stmt = Database::query("SELECT * FROM `" . TABLE_PANEL_VHOSTCONFIGS . "` ORDER BY description ASC");
$vhostconfigs_result_stmt = Database::prepare("SELECT * FROM `" . TABLE_PANEL_VHOSTCONFIGS . "` WHERE `webserver` = :webserver ORDER BY description ASC");
Database::pexecute($vhostconfigs_result_stmt, array('webserver' => Settings::Get('system.webserver')));
$vhostconfigs .= makeoption($lng['admin']['vhostsettings']['novhostsettings'], 0);
while ($vhostconfig_row = $vhostconfigs_result_stmt->fetch(PDO::FETCH_ASSOC)) {
$vhostconfigs .= makeoption($vhostconfig_row['description'], $vhostconfig_row['id'], $result['vhostsettingid'], true, true);