Skip to content

Commit 1aece9b

Browse files
author
Marius Cramer
committed
Fixed problem with new "multiple servers for clients" feature
1 parent 361156e commit 1aece9b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

interface/web/sites/web_vhost_domain_edit.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ function onShowEnd() {
188188
//* Fill the IPv4 select field with the IP addresses that are allowed for this client
189189
$sql = "SELECT ip_address FROM server_ip WHERE server_id IN (" . $client['web_servers'] . ") AND ip_type = 'IPv4' AND (client_id = 0 OR client_id=".$_SESSION['s']['user']['client_id'].")";
190190
$ips = $app->db->queryAllRecords($sql);
191-
$ip_select = ($web_config['enable_ip_wildcard'] == 'y')?"<option value='*'>*</option>":"";
191+
$ip_select = ($web_config[$server_id]['enable_ip_wildcard'] == 'y')?"<option value='*'>*</option>":"";
192192
//if(!in_array($this->dataRecord["ip_address"], $ips)) $ip_select .= "<option value='".$this->dataRecord["ip_address"]."' SELECTED>".$this->dataRecord["ip_address"]."</option>\r\n";
193193
//$ip_select = "";
194194
if(is_array($ips)) {
@@ -218,7 +218,7 @@ function onShowEnd() {
218218

219219
//PHP Version Selection (FastCGI)
220220
$server_type = 'apache';
221-
if(!empty($web_config['server_type'])) $server_type = $web_config['server_type'];
221+
if(!empty($web_config[$server_id]['server_type'])) $server_type = $web_config[$server_id]['server_type'];
222222
if($server_type == 'nginx' && $this->dataRecord['php'] == 'fast-cgi') $this->dataRecord['php'] = 'php-fpm';
223223

224224
if($this->_vhostdomain_type == 'domain') {
@@ -319,7 +319,7 @@ function onShowEnd() {
319319
//* Fill the IPv4 select field with the IP addresses that are allowed for this client
320320
$sql = "SELECT ip_address FROM server_ip WHERE server_id IN (" . $client['web_servers'] . ") AND ip_type = 'IPv4' AND (client_id = 0 OR client_id=".$_SESSION['s']['user']['client_id'].")";
321321
$ips = $app->db->queryAllRecords($sql);
322-
$ip_select = ($web_config['enable_ip_wildcard'] == 'y')?"<option value='*'>*</option>":"";
322+
$ip_select = ($web_config[$server_id]['enable_ip_wildcard'] == 'y')?"<option value='*'>*</option>":"";
323323
//if(!in_array($this->dataRecord["ip_address"], $ips)) $ip_select .= "<option value='".$this->dataRecord["ip_address"]."' SELECTED>".$this->dataRecord["ip_address"]."</option>\r\n";
324324
//$ip_select = "";
325325
if(is_array($ips)) {
@@ -349,7 +349,7 @@ function onShowEnd() {
349349

350350
//PHP Version Selection (FastCGI)
351351
$server_type = 'apache';
352-
if(!empty($web_config['server_type'])) $server_type = $web_config['server_type'];
352+
if(!empty($web_config[$server_id]['server_type'])) $server_type = $web_config[$server_id]['server_type'];
353353
if($server_type == 'nginx' && $this->dataRecord['php'] == 'fast-cgi') $this->dataRecord['php'] = 'php-fpm';
354354
$selected_client = $app->db->queryOneRecord("SELECT client_id FROM sys_group WHERE groupid = ".$app->functions->intval($selected_client_group_id));
355355
//$sql_where = " AND (client_id = 0 OR client_id=".$_SESSION['s']['user']['client_id']." OR client_id = ".intval($selected_client['client_id']).")";

0 commit comments

Comments
 (0)