Commit 1e121abc authored by Marius Cramer's avatar Marius Cramer
Browse files

Merge branch 'Cambra/ispconfig3-favourite_servers'

parents cbdc7aca adb0e74c
......@@ -53,7 +53,8 @@ if (isset($_POST['server_id'])) {
$server_id = $app->functions->intval($_POST['server_id_value']);
$post_server_id = true;
} else {
$server_id = 1;
$settings = $app->getconf->get_global_config('dns');
$server_id = $app->functions->intval($settings['default_dnsserver']);
$post_server_id = false;
}
......
......@@ -61,6 +61,9 @@ class page_action extends tform_actions {
if(!$app->tform->checkResellerLimit('limit_maildomain')) {
$app->error('Reseller: '.$app->tform->wordbook["limit_maildomain_txt"]);
}
} else {
$settings = $app->getconf->get_global_config('mail');
$app->tform->formDef['tabs']['domain']['fields']['server_id']['default'] = intval($settings['default_mailserver']);
}
parent::onShowNew();
......
......@@ -61,6 +61,9 @@ class page_action extends tform_actions {
if(!$app->tform->checkResellerLimit('limit_database')) {
$app->error('Reseller: '.$app->tform->wordbook["limit_database_txt"]);
}
} else {
$settings = $app->getconf->get_global_config('sites');
$app->tform->formDef['tabs']['database']['fields']['server_id']['default'] = intval($settings['default_dbserver']);
}
parent::onShowNew();
......
......@@ -115,6 +115,9 @@ class page_action extends tform_actions {
$web_servers = explode(',', $client['web_servers']);
$app->tpl->setVar("server_id_value", $web_servers[0]);
unset($web_servers);
} else {
$settings = $app->getconf->get_global_config('sites');
$app->tform->formDef['tabs']['domain']['fields']['server_id']['default'] = intval($settings['default_webserver']);
}
$app->tform->formDef['tabs']['domain']['readonly'] = false;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment