diff --git a/library/Director/Objects/IcingaObject.php b/library/Director/Objects/IcingaObject.php index 89d53cf6..40f2047e 100644 --- a/library/Director/Objects/IcingaObject.php +++ b/library/Director/Objects/IcingaObject.php @@ -377,7 +377,7 @@ abstract class IcingaObject extends DbObject implements IcingaConfigRenderer array('f' => $this->getTableName() . '_field'), 'df.id = f.datafield_id', array() - )->where('f.host_id = ?', (int) $this->id) + )->where('f.' . $this->getShortTableName() . '_id = ?', (int) $this->id) ->order('df.caption ASC'); $res = $db->fetchAll($query); diff --git a/library/Director/Objects/IcingaService.php b/library/Director/Objects/IcingaService.php index b6aa6a20..1c92d25f 100644 --- a/library/Director/Objects/IcingaService.php +++ b/library/Director/Objects/IcingaService.php @@ -38,6 +38,8 @@ class IcingaService extends IcingaObject protected $supportsCustomVars = true; + protected $supportsFields = true; + protected $supportsImports = true; protected function renderCheck_command_id()