mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-30 01:05:39 +02:00
2009-05-27 Evi Vanoost <vanooste@rcbi.rochester.edu>
* godmode/agentes/configurar_agente.php: Should fix bug #2785154. Wasn't clear on how to duplicate but from what I understand this should fix it. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1714 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
971b998862
commit
d24c74247f
@ -1,3 +1,8 @@
|
|||||||
|
2009-05-27 Evi Vanoost <vanooste@rcbi.rochester.edu>
|
||||||
|
|
||||||
|
* godmode/agentes/configurar_agente.php: Should fix bug #2785154. Wasn't
|
||||||
|
clear on how to duplicate but from what I understand this should fix it.
|
||||||
|
|
||||||
2009-05-27 Esteban Sanchez <estebans@artica.es>
|
2009-05-27 Esteban Sanchez <estebans@artica.es>
|
||||||
|
|
||||||
* godmode/agentes/configurar_agente.php: Style correction.
|
* godmode/agentes/configurar_agente.php: Style correction.
|
||||||
|
@ -260,9 +260,9 @@ if (isset( $_GET["fix_module"])) {
|
|||||||
// Update AGENT
|
// Update AGENT
|
||||||
if (isset($_POST["update_agent"])) { // if modified some agent paramenter
|
if (isset($_POST["update_agent"])) { // if modified some agent paramenter
|
||||||
$id_agente = (int) get_parameter_post ("id_agente");
|
$id_agente = (int) get_parameter_post ("id_agente");
|
||||||
$nombre_agente = (string) get_parameter_post ("agente");
|
$nombre_agente = (string) get_parameter_post ("agente", "");
|
||||||
$direccion_agente = (string) get_parameter_post ("direccion");
|
$direccion_agente = (string) get_parameter_post ("direccion", "");
|
||||||
$address_list = (string) get_parameter_post ("address_list");
|
$address_list = (string) get_parameter_post ("address_list", "");
|
||||||
if ($address_list != $direccion_agente && $direccion_agente == get_agent_address ($id_agente) && $address_list != get_agent_address ($id_agente)) {
|
if ($address_list != $direccion_agente && $direccion_agente == get_agent_address ($id_agente) && $address_list != get_agent_address ($id_agente)) {
|
||||||
//If we selected another IP in the drop down list to be 'primary':
|
//If we selected another IP in the drop down list to be 'primary':
|
||||||
// a) field is not the same as selectbox
|
// a) field is not the same as selectbox
|
||||||
@ -272,11 +272,11 @@ if (isset($_POST["update_agent"])) { // if modified some agent paramenter
|
|||||||
}
|
}
|
||||||
$grupo = (int) get_parameter_post ("grupo", 0);
|
$grupo = (int) get_parameter_post ("grupo", 0);
|
||||||
$intervalo = (int) get_parameter_post ("intervalo", 300);
|
$intervalo = (int) get_parameter_post ("intervalo", 300);
|
||||||
$comentarios = (string) get_parameter_post ("comentarios");
|
$comentarios = (string) get_parameter_post ("comentarios", "");
|
||||||
$modo = (bool) get_parameter_post ("modo", 0); //Mode: Learning or Normal
|
$modo = (bool) get_parameter_post ("modo", 0); //Mode: Learning or Normal
|
||||||
$id_os = (int) get_parameter_post ("id_os");
|
$id_os = (int) get_parameter_post ("id_os");
|
||||||
$disabled = (bool) get_parameter_post ("disabled");
|
$disabled = (bool) get_parameter_post ("disabled");
|
||||||
$server_name = (string) get_parameter_post ("server_name");
|
$server_name = (string) get_parameter_post ("server_name", "");
|
||||||
$id_parent = (int) get_parameter_post ("id_parent", 0);
|
$id_parent = (int) get_parameter_post ("id_parent", 0);
|
||||||
$custom_id = (string) get_parameter_post ("custom_id", "");
|
$custom_id = (string) get_parameter_post ("custom_id", "");
|
||||||
|
|
||||||
@ -310,11 +310,12 @@ if (isset($_POST["update_agent"])) { // if modified some agent paramenter
|
|||||||
'server_name' => $server_name,
|
'server_name' => $server_name,
|
||||||
'custom_id' => $custom_id),
|
'custom_id' => $custom_id),
|
||||||
array ('id_agente' => $id_agente));
|
array ('id_agente' => $id_agente));
|
||||||
|
|
||||||
if ($result === false) {
|
if ($result === false) {
|
||||||
echo '<h3 class="error">'.__('There was a problem updating agent').'</h3>';
|
print_error_message (__('There was a problem updating the agent'));
|
||||||
} else {
|
} else {
|
||||||
enterprise_hook ('update_agent', array ($id_agente));
|
enterprise_hook ('update_agent', array ($id_agente));
|
||||||
echo '<h3 class="suc">'.__('Agent successfully updated').'</h3>';
|
print_success_message (__('Agent successfully updated'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -333,7 +334,7 @@ if ($id_agente) {
|
|||||||
$agent = get_db_row ('tagente', 'id_agente', $id_agente);
|
$agent = get_db_row ('tagente', 'id_agente', $id_agente);
|
||||||
if (empty ($agent)) {
|
if (empty ($agent)) {
|
||||||
//Close out the page
|
//Close out the page
|
||||||
echo '<h3 class="error">'.__('There was a problem loading agent').'</h3>';
|
print_error_message (__('There was a problem loading the agent'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -539,11 +540,11 @@ if (isset ($_GET["delete_module"])){ // DELETE agent module !
|
|||||||
|
|
||||||
//Check for errors
|
//Check for errors
|
||||||
if ($error != 0) {
|
if ($error != 0) {
|
||||||
echo '<h3 class="error">'.__('There was a problem deleting the module').'</h3>';
|
|
||||||
process_sql_rollback ();
|
process_sql_rollback ();
|
||||||
|
print_error_message (__('There was a problem deleting the module'));
|
||||||
} else {
|
} else {
|
||||||
echo '<h3 class="suc">'.__('Module deleted successfully').'</h3>';
|
|
||||||
process_sql_commit ();
|
process_sql_commit ();
|
||||||
|
print_success_message (__('Module deleted succesfully'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -571,7 +572,7 @@ switch ($tab) {
|
|||||||
default:
|
default:
|
||||||
if (enterprise_hook ('switch_agent_tab', array ($tab)))
|
if (enterprise_hook ('switch_agent_tab', array ($tab)))
|
||||||
//This will make sure that blank pages will have at least some
|
//This will make sure that blank pages will have at least some
|
||||||
//debug info in them
|
//debug info in them - do not translate debug
|
||||||
echo '<h3 class="error">DEBUG: Invalid tab specified in '.__FILE__.':'.__LINE__.'</h3>';
|
print_error_message ("DEBUG: Invalid tab specified in ".__FILE__.":".__LINE__);
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user