Commit ef20902f authored by Till Brehm's avatar Till Brehm

Merge branch 'stable-3.1' into 'stable-3.1'

Show server hostname under system > server config (#5063)

See merge request ispconfig/ispconfig3!800
parents 67d81d3f cbd3cd11
......@@ -72,6 +72,14 @@ class page_action extends tform_actions {
$app->tpl->setVar($record);
}
function onShowEnd() {
global $app;
$app->tpl->setVar('server_name', $app->db->queryOneRecord("SELECT server_name FROM server WHERE server_id = ? AND ((SELECT COUNT(*) FROM server) > 1)", $this->id)['server_name']);
parent::onShowEnd();
}
function onUpdateSave($sql) {
global $app, $conf;
......
<div class='page-header'>
<h1><tmpl_var name="list_head_txt"></h1>
<h1><tmpl_var name="list_head_txt"> {tmpl_var name='server_name'}</h1>
</div>
<p><tmpl_var name="list_desc_txt"></p>
......@@ -21,4 +21,4 @@
<div class="clear"><div class="right">
<button class="btn btn-default formbutton-success" type="button" value="{tmpl_var name='btn_save_txt'}" data-submit-form="pageForm" data-form-action="admin/server_config_edit.php">{tmpl_var name='btn_save_txt'}</button>
<button class="btn btn-default formbutton-default" type="button" value="{tmpl_var name='btn_cancel_txt'}" data-load-content="admin/server_config_list.php">{tmpl_var name='btn_cancel_txt'}</button>
</div></div>
\ No newline at end of file
</div></div>
<div class='page-header'>
<h1><tmpl_var name="list_head_txt"></h1>
<h1><tmpl_var name="list_head_txt"> {tmpl_var name='server_name'}</h1>
</div>
<p><tmpl_var name="list_desc_txt"></p>
......
<div class='page-header'>
<h1><tmpl_var name="list_head_txt"></h1>
<h1><tmpl_var name="list_head_txt"> {tmpl_var name='server_name'}</h1>
</div>
<p><tmpl_var name="list_desc_txt"></p>
......@@ -39,4 +39,4 @@
<div class="clear"><div class="right">
<button class="btn btn-default formbutton-success" type="button" value="{tmpl_var name='btn_save_txt'}" data-submit-form="pageForm" data-form-action="admin/server_config_edit.php">{tmpl_var name='btn_save_txt'}</button>
<button class="btn btn-default formbutton-default" type="button" value="{tmpl_var name='btn_cancel_txt'}" data-load-content="admin/server_config_list.php">{tmpl_var name='btn_cancel_txt'}</button>
</div></div>
\ No newline at end of file
</div></div>
<div class='page-header'>
<h1><tmpl_var name="list_head_txt"></h1>
<h1><tmpl_var name="list_head_txt"> {tmpl_var name='server_name'}</h1>
</div>
<p><tmpl_var name="list_desc_txt"></p>
......@@ -15,4 +15,4 @@
<div class="clear"><div class="right">
<button class="btn btn-default formbutton-success" type="button" value="{tmpl_var name='btn_save_txt'}" data-submit-form="pageForm" data-form-action="admin/server_config_edit.php">{tmpl_var name='btn_save_txt'}</button>
<button class="btn btn-default formbutton-default" type="button" value="{tmpl_var name='btn_cancel_txt'}" data-load-content="admin/server_config_list.php">{tmpl_var name='btn_cancel_txt'}</button>
</div></div>
\ No newline at end of file
</div></div>
<div class='page-header'>
<h1><tmpl_var name="list_head_txt"></h1>
<h1><tmpl_var name="list_head_txt"> {tmpl_var name='server_name'}</h1>
</div>
<p><tmpl_var name="list_desc_txt"></p>
......@@ -24,4 +24,4 @@
<div class="clear"><div class="right">
<button class="btn btn-default formbutton-success" type="button" value="{tmpl_var name='btn_save_txt'}" data-submit-form="pageForm" data-form-action="admin/server_config_edit.php">{tmpl_var name='btn_save_txt'}</button>
<button class="btn btn-default formbutton-default" type="button" value="{tmpl_var name='btn_cancel_txt'}" data-load-content="admin/server_config_list.php">{tmpl_var name='btn_cancel_txt'}</button>
</div></div>
\ No newline at end of file
</div></div>
<div class='page-header'>
<h1><tmpl_var name="list_head_txt"></h1>
<h1><tmpl_var name="list_head_txt"> {tmpl_var name='server_name'}</h1>
</div>
<p><tmpl_var name="list_desc_txt"></p>
......
<div class='page-header'>
<h1><tmpl_var name="list_head_txt"></h1>
<h1><tmpl_var name="list_head_txt"> {tmpl_var name='server_name'}</h1>
</div>
<p><tmpl_var name="list_desc_txt"></p>
......
<div class='page-header'>
<h1><tmpl_var name="list_head_txt"></h1>
<h1><tmpl_var name="list_head_txt"> {tmpl_var name='server_name'}</h1>
</div>
<p><tmpl_var name="list_desc_txt"></p>
......
<div class='page-header'>
<h1><tmpl_var name="list_head_txt"></h1>
<h1><tmpl_var name="list_head_txt"> {tmpl_var name='server_name'}</h1>
</div>
<p><tmpl_var name="list_desc_txt"></p>
......@@ -60,4 +60,4 @@
<div class="clear"><div class="right">
<button class="btn btn-default formbutton-success" type="button" value="{tmpl_var name='btn_save_txt'}" data-submit-form="pageForm" data-form-action="admin/server_config_edit.php">{tmpl_var name='btn_save_txt'}</button>
<button class="btn btn-default formbutton-default" type="button" value="{tmpl_var name='btn_cancel_txt'}" data-load-content="admin/server_config_list.php">{tmpl_var name='btn_cancel_txt'}</button>
</div></div>
\ No newline at end of file
</div></div>
<div class='page-header'>
<h1><tmpl_var name="list_head_txt"></h1>
<h1><tmpl_var name="list_head_txt"> {tmpl_var name='server_name'}</h1>
</div>
<p><tmpl_var name="list_desc_txt"></p>
......@@ -15,4 +15,4 @@
<div class="clear"><div class="right">
<button class="btn btn-default formbutton-success" type="button" value="{tmpl_var name='btn_save_txt'}" data-submit-form="pageForm" data-form-action="admin/server_config_edit.php">{tmpl_var name='btn_save_txt'}</button>
<button class="btn btn-default formbutton-default" type="button" value="{tmpl_var name='btn_cancel_txt'}" data-load-content="admin/server_config_list.php">{tmpl_var name='btn_cancel_txt'}</button>
</div></div>
\ No newline at end of file
</div></div>
<div class='page-header'>
<h1><tmpl_var name="list_head_txt"></h1>
<h1><tmpl_var name="list_head_txt"> {tmpl_var name='server_name'}</h1>
</div>
<p><tmpl_var name="list_desc_txt"></p>
......
<div class='page-header'>
<h1><tmpl_var name="list_head_txt"></h1>
<h1><tmpl_var name="list_head_txt"> {tmpl_var name='server_name'}</h1>
</div>
<p><tmpl_var name="list_desc_txt"></p>
......
......@@ -74,8 +74,8 @@ class page_action extends tform_actions {
//* check the database for existing records
$server_data = $this->server_has_data($server_type, $server['server_id']);
foreach ($search as $needle)
// if (in_array($needle, $server_data) && strpos($options_servers, $server['server_name']) === false) {
if (in_array($needle, $server_data)) {
if (in_array($needle, $server_data) && strpos($options_servers, $server['server_name']) === false) {
// if (in_array($needle, $server_data)) {
$options_servers .= "<option value='$server[server_id]'>$server[server_name]</option>";
$server_count++;
}
......@@ -525,7 +525,7 @@ class page_action extends tform_actions {
$this->dataRecord['db_server_id'] = $this->dataRecord['all_server_id'];
$this->dataRecord['mail_server_id'] = $this->dataRecord['all_server_id'];
$this->dataRecord['mailbox_server_id'] = $this->dataRecord['all_server_id'];
$this->dataRecord['verserver_server_id'] = $this->dataRecord['all_server_id'];
$this->dataRecord['vserver_server_id'] = $this->dataRecord['all_server_id'];
$this->dataRecord['dns_server_id'] = $this->dataRecord['all_server_id'];
}
......@@ -596,7 +596,7 @@ class page_action extends tform_actions {
//* vserver
if($this->dataRecord['resync_vserver'] == 1)
$msg .= $this->do_resync('openvz_vm', 'vm_id', 'vserver', $this->dataRecord['verserver_server_id'], 'hostname', $app->tform->wordbook['do_vserver_txt']);
$msg .= $this->do_resync('openvz_vm', 'vm_id', 'vserver', $this->dataRecord['vserver_server_id'], 'hostname', $app->tform->wordbook['do_vserver_txt']);
//* dns
if($this->dataRecord['resync_dns'] == 1) {
......
Markdown is supported
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