Private GIT

Skip to content
Snippets Groups Projects
Commit 645b4629 authored by Laurent Pinsivy's avatar Laurent Pinsivy
Browse files

#5057 - For CLAPI do not remove downtimes not linked to objects

parent 06b646ae
No related merge requests found
...@@ -63,10 +63,6 @@ $ext_cmd_del['svc'] = array( ...@@ -63,10 +63,6 @@ $ext_cmd_del['svc'] = array(
$pearDB = new CentreonDB(); $pearDB = new CentreonDB();
$downtimeObj = new CentreonDowntimeBroker($pearDB, _CENTREON_VARLIB_); $downtimeObj = new CentreonDowntimeBroker($pearDB, _CENTREON_VARLIB_);
/* Delete empty Downtimes */
$downtimeObj->purgeEmptyDowntimes();
/* Get approaching downtimes */ /* Get approaching downtimes */
$downtimes = $downtimeObj->getApproachingDowntimes(_DELAY_); $downtimes = $downtimeObj->getApproachingDowntimes(_DELAY_);
......
...@@ -407,16 +407,6 @@ class CentreonDowntimeBroker extends CentreonDowntime ...@@ -407,16 +407,6 @@ class CentreonDowntimeBroker extends CentreonDowntime
$this->db->query($query); $this->db->query($query);
} }
public function purgeEmptyDowntimes()
{
$query = 'DELETE FROM `downtime` '
. 'WHERE `dt_id` NOT IN (SELECT dt_id FROM downtime_host_relation) '
. 'AND `dt_id` NOT IN (SELECT dt_id FROM downtime_hostgroup_relation) '
. 'AND `dt_id` NOT IN (SELECT dt_id FROM downtime_service_relation) '
. 'AND `dt_id` NOT IN (SELECT dt_id FROM downtime_servicegroup_relation) ';
$this->db->query($query);
}
public function isScheduled($downtime) public function isScheduled($downtime)
{ {
$isScheduled = false; $isScheduled = false;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment