From 486fbd599b586dfbfc1826096be342dfe2c3641c Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Wed, 17 Jun 2015 09:05:32 +0200 Subject: [PATCH] HoststatusQuery: Respect IDO schema version refs #9009 fixes #9425 --- .../Monitoring/Backend/Ido/Query/HoststatusQuery.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/modules/monitoring/library/Monitoring/Backend/Ido/Query/HoststatusQuery.php b/modules/monitoring/library/Monitoring/Backend/Ido/Query/HoststatusQuery.php index 5165897c7..f3c3bef44 100644 --- a/modules/monitoring/library/Monitoring/Backend/Ido/Query/HoststatusQuery.php +++ b/modules/monitoring/library/Monitoring/Backend/Ido/Query/HoststatusQuery.php @@ -193,6 +193,14 @@ SQL; */ protected function joinBaseTables() { + if (version_compare($this->getIdoVersion(), '1.10.0', '<')) { + $this->columnMap['hoststatus']['host_check_source'] = '(NULL)'; + } + + if (version_compare($this->getIdoVersion(), '1.13.0', '<')) { + $this->columnMap['hoststatus']['host_is_reachable'] = '(NULL)'; + } + $this->select->from( array('h' => $this->prefix . 'hosts'), array()