Fixed a minor bug in remote config - #3611

Former-commit-id: 02a786832c8b02a7f5962cf9021cb5a2fe525bcc
This commit is contained in:
Tatiana Llorente 2019-05-13 15:02:13 +02:00
parent e9082c5d8a
commit e6fa42ddca
1 changed files with 13 additions and 14 deletions

View File

@ -488,8 +488,7 @@ if (enterprise_installed()) {
// Remote configuration // Remote configuration
$table_adv_remote = '<div class="label_select"><p class="input_label">'.__('Remote configuration').': </p>'; $table_adv_remote = '<div class="label_select"><p class="input_label">'.__('Remote configuration').': </p>';
if (!$new_agent && isset($filename)) { if (!$new_agent && isset($filename) && file_exists($filename['md5'])) {
if (file_exists($filename['md5'])) {
$table_adv_remote .= date('F d Y H:i:s', fileatime($filename['md5'])); $table_adv_remote .= date('F d Y H:i:s', fileatime($filename['md5']));
// Delete remote configuration // Delete remote configuration
$table_adv_remote .= '<a href="index.php?'.'sec=gagente&amp;'.'sec2=godmode/agentes/configurar_agente&amp;'.'tab=main&amp;'.'disk_conf_delete=1&amp;'.'id_agente='.$id_agente.'">'; $table_adv_remote .= '<a href="index.php?'.'sec=gagente&amp;'.'sec2=godmode/agentes/configurar_agente&amp;'.'tab=main&amp;'.'disk_conf_delete=1&amp;'.'id_agente='.$id_agente.'">';
@ -506,23 +505,23 @@ if (enterprise_installed()) {
true true
); );
} }
} else { } else {
$table_adv_remote .= '<em>'.__('Not available').'</em>'; $table_adv_remote .= '<em>'.__('Not available').'</em>';
} }
$table_adv_remote .= '</div>'; $table_adv_remote .= '</div>';
$cps_array[-1] = __('Disabled'); $cps_array[-1] = __('Disabled');
if ($cps > 0) { if ($cps > 0) {
$cps_array[$cps] = __('Enabled'); $cps_array[$cps] = __('Enabled');
} else { } else {
$cps_inc = 0; $cps_inc = 0;
if ($id_agente) { if ($id_agente) {
$cps_inc = service_agents_cps($id_agente); $cps_inc = service_agents_cps($id_agente);
} }
$cps_array[$cps_inc] = __('Enabled'); $cps_array[$cps_inc] = __('Enabled');
} }
$table_adv_cascade = '<div class="label_select"><p class="input_label">'.__('Cascade protection services').': '; $table_adv_cascade = '<div class="label_select"><p class="input_label">'.__('Cascade protection services').': ';
$table_adv_cascade .= ui_print_help_tip(__('Disable the alerts and events of the elements that belong to this service'), true).'</p>'; $table_adv_cascade .= ui_print_help_tip(__('Disable the alerts and events of the elements that belong to this service'), true).'</p>';