Skip to content

Commit b4f3f51

Browse files
author
Marius Cramer
committed
Merge branch 'fix_initial_ip_select' into 'master'
Fix initial ip select See merge request !122
2 parents a7f96ca + eed9fb8 commit b4f3f51

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

interface/web/sites/web_vhost_domain_edit.php

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -458,9 +458,13 @@ function onShowEnd() {
458458
}
459459
$server_id = intval(@$this->dataRecord["server_id"]);
460460
} else {
461-
// Get the first server ID
462-
$tmp = $app->db->queryOneRecord("SELECT server_id FROM server WHERE web_server = 1 ORDER BY server_name LIMIT 0,1");
463-
$server_id = intval($tmp['server_id']);
461+
$settings = $app->getconf->get_global_config('sites');
462+
$server_id = intval($settings['default_webserver']);
463+
if (!$server_id) {
464+
// Get the first server ID
465+
$tmp = $app->db->queryOneRecord("SELECT server_id FROM server WHERE web_server = 1 ORDER BY server_name LIMIT 0,1");
466+
$server_id = intval($tmp['server_id']);
467+
}
464468
}
465469

466470
//* get global web config

0 commit comments

Comments
 (0)