2011-07-08 Ramon Novoa <rnovoa@artica.es>

* lib/PandoraFMS/Core.pm: Fixed alert-only planned downtimes.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4532 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
Ramon Novoa 2011-07-08 08:58:32 +00:00
parent ef81f4b085
commit de6439e18a
2 changed files with 6 additions and 2 deletions

View File

@ -1,3 +1,7 @@
2011-07-08 Ramon Novoa <rnovoa@artica.es>
* lib/PandoraFMS/Core.pm: Fixed alert-only planned downtimes.
2011-07-08 Sergio Martin <sergio.martin@artica.es>
* util/recon_scripts/snmpdevices.pl: Fiexd bug in recon script

View File

@ -926,7 +926,7 @@ sub pandora_planned_downtime ($$) {
my @downtime_agents = get_db_rows($dbh, 'SELECT * FROM tplanned_downtime_agents WHERE id_downtime = ' . $downtime->{'id'});
foreach my $downtime_agent (@downtime_agents) {
if ($downtime_agent->{'only_alerts'} == 0) {
if ($downtime->{'only_alerts'} == 0) {
db_do ($dbh, 'UPDATE tagente SET disabled = 1 WHERE id_agente = ?', $downtime_agent->{'id_agent'});
} else {
db_do ($dbh, 'UPDATE talert_template_modules SET disabled = 1 WHERE id_agent_module IN (SELECT id_agente_modulo FROM tagente_modulo WHERE id_agente = ?)', $downtime_agent->{'id_agent'});
@ -947,7 +947,7 @@ sub pandora_planned_downtime ($$) {
my @downtime_agents = get_db_rows($dbh, 'SELECT * FROM tplanned_downtime_agents WHERE id_downtime = ' . $downtime->{'id'});
foreach my $downtime_agent (@downtime_agents) {
if ($downtime_agent->{'only_alerts'} == 0) {
if ($downtime->{'only_alerts'} == 0) {
db_do ($dbh, 'UPDATE tagente SET disabled = 0 WHERE id_agente = ?', $downtime_agent->{'id_agent'});
} else {
db_do ($dbh, 'UPDATE talert_template_modules SET disabled = 0 WHERE id_agent_module IN (SELECT id_agente_modulo FROM tagente_modulo WHERE id_agente = ?)', $downtime_agent->{'id_agent'});