Fixed problems with remote config view files of conf about server and satellite.

This commit is contained in:
m-lopez-f 2017-03-30 17:27:19 +02:00
parent c65d7d27a3
commit 599a8b7e11
2 changed files with 13 additions and 7 deletions

View File

@ -55,9 +55,9 @@ if (isset($_GET["server"])) {
}
elseif (isset($_GET["server_remote"])) {
// Headers
$id_server= get_parameter_get ("server_remote");
$ext = get_parameter ("ext", '');
ui_print_page_header (__('Remote Configuration'), "images/gm_servers.png", false, "servers", true);
enterprise_include("godmode/servers/server_disk_conf_editor.php");
}
@ -119,7 +119,8 @@ else {
$correct = false;
$id_server = get_parameter ("id_server");
$server_md5 = md5(io_safe_output(servers_get_name ($id_server,'none')), FALSE);
$ext = get_parameter ("ext", '');
$server_md5 = md5(io_safe_output(servers_get_name ($id_server,'none') . $ext), FALSE);
if (file_exists ($config["remote_config"] . "/md5/" . $server_md5 . ".srv.md5")) {
// Server remote configuration editor

View File

@ -124,9 +124,14 @@ foreach ($servers as $server) {
}
$data[7] = ui_print_timestamp ($server['keepalive'], true);
$ext = '_server';
if ($server['type'] != 'data')
$ext = '';
$safe_server_name = servers_get_name($server["id_server"]);
if (!isset($names_servers[$safe_server_name])){
if (servers_check_remote_config ($safe_server_name) && enterprise_installed()) {
if (($server['type'] == 'data' || $server['type'] == 'enterprise satellite')) {
if (servers_check_remote_config ($safe_server_name . $ext) && enterprise_installed()) {
$names_servers[$safe_server_name] = true;
} else {
$names_servers[$safe_server_name] = false;
@ -154,8 +159,8 @@ foreach ($servers as $server) {
array('title' => __('Edit')));
$data[8] .= '</a>';
if ($names_servers[$safe_server_name] === true) {
$data[8] .= '<a href="index.php?sec=gservers&sec2=godmode/servers/modificar_server&server_remote='.$server["id_server"].'">';
if (($names_servers[$safe_server_name] === true) && ($server['type'] == 'data' || $server['type'] == 'enterprise satellite')) {
$data[8] .= '<a href="index.php?sec=gservers&sec2=godmode/servers/modificar_server&server_remote='.$server["id_server"].'&ext='.$ext.'">';
$data[8] .= html_print_image ('images/remote_configuration.png', true,
array('title' => __('Remote configuration')));
$data[8] .= '</a>';