diff --git a/application/tables/IcingaCommandTable.php b/application/tables/IcingaCommandTable.php index a034a3e5..7e594496 100644 --- a/application/tables/IcingaCommandTable.php +++ b/application/tables/IcingaCommandTable.php @@ -35,7 +35,7 @@ class IcingaCommandTable extends QuickTable ); } - public function getBaseQuery() + protected function getUnfilteredQuery() { $db = $this->connection()->getConnection(); $query = $db->select()->from( @@ -49,4 +49,9 @@ class IcingaCommandTable extends QuickTable return $query; } + + public function getBaseQuery() + { + return $this->getUnfilteredQuery()->where('c.object_type = ?', 'object'); + } } diff --git a/application/tables/IcingaCommandTemplateTable.php b/application/tables/IcingaCommandTemplateTable.php new file mode 100644 index 00000000..b94814f8 --- /dev/null +++ b/application/tables/IcingaCommandTemplateTable.php @@ -0,0 +1,13 @@ +getUnfilteredQuery()->where('c.object_type = ?', 'template'); + } +}