2014-01-17 Miguel de Dios <miguel.dedios@artica.es>

* godmode/agentes/agent_manager.php: fixed the PHP warnings and
	notices.
	
	Fixes: #2414




git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@9336 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
mdtrooper 2014-01-17 12:04:09 +00:00
parent 557d5534e3
commit b362974d1e
2 changed files with 36 additions and 17 deletions

View File

@ -1,3 +1,10 @@
2014-01-17 Miguel de Dios <miguel.dedios@artica.es>
* godmode/agentes/agent_manager.php: fixed the PHP warnings and
notices.
Fixes: #2414
2014-01-17 Juan Manuel Ramon Vigo <juanmanuel.ramon@artica.es>
* godmode/events/event_edit_filter.php

View File

@ -168,14 +168,21 @@ if ($id_agente) {
// Remote configuration available
if (!$new_agent) {
if (file_exists ($filename['md5'])) {
$agent_name = agents_get_name($id_agente);
$agent_name = io_safe_output($agent_name);
$agent_md5 = md5 ($agent_name, false);
$table->data[0][1] .= '&nbsp;&nbsp;<a href="index.php?sec=gagente&amp;sec2=godmode/agentes/configurar_agente&amp;tab=main&amp;id_agente='.$id_agente.'&amp;disk_conf='.$agent_md5.'">';
$table->data[0][1] .= html_print_image ("images/application_edit.png", true, array ("border" => 0, "title" => __('This agent can be remotely configured')));
$table->data[0][1] .= '</a>'.ui_print_help_tip (__('You can remotely edit this agent configuration'), true);
if (isset($filename)) {
if (file_exists ($filename['md5'])) {
$agent_name = agents_get_name($id_agente);
$agent_name = io_safe_output($agent_name);
$agent_md5 = md5 ($agent_name, false);
$table->data[0][1] .= '&nbsp;&nbsp;<a href="index.php?sec=gagente&amp;sec2=godmode/agentes/configurar_agente&amp;tab=main&amp;id_agente='.$id_agente.'&amp;disk_conf='.$agent_md5.'">';
$table->data[0][1] .= html_print_image(
"images/application_edit.png",
true,
array ("border" => 0, "title" => __('This agent can be remotely configured')));
$table->data[0][1] .= '</a>' .
ui_print_help_tip (
__('You can remotely edit this agent configuration'), true);
}
}
}
@ -274,16 +281,21 @@ $table->data[2][1] .= __('Active') . ' ' .
$table->data[3][0] = __('Remote configuration');
if (!$new_agent) {
if (file_exists ($filename['md5'])) {
$table->data[3][1] = date ("F d Y H:i:s", fileatime ($filename['md5']));
// Delete remote configuration
$table->data[3][1] .= '<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->data[3][1] .= html_print_image ("images/cross.png", true, array ('title' => __('Delete remote configuration file'), 'style' => 'vertical-align: middle;')).'</a>';
$table->data[3][1] .= '</a>' .
ui_print_help_tip (__('Delete this conf file implies that for restore you must reactive remote config in the local agent.'), true);
$table->data[3][1] = '<em>' . __('Not available') . '</em>';
if (isset($filename)) {
if (file_exists ($filename['md5'])) {
$table->data[3][1] = date ("F d Y H:i:s", fileatime ($filename['md5']));
// Delete remote configuration
$table->data[3][1] .= '<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->data[3][1] .= html_print_image(
"images/cross.png", true,
array ('title' => __('Delete remote configuration file'), 'style' => 'vertical-align: middle;')).'</a>';
$table->data[3][1] .= '</a>' .
ui_print_help_tip(
__('Delete this conf file implies that for restore you must reactive remote config in the local agent.'),
true);
}
}
else
$table->data[3][1] = '<em>' . __('Not available') . '</em>';
}
else
$table->data[3][1] = '<em>' . __('Not available') . '</em>';