diff --git a/library/Director/DirectorObject/Automation/BasketSnapshot.php b/library/Director/DirectorObject/Automation/BasketSnapshot.php index 36d3ed40..4e5b2714 100644 --- a/library/Director/DirectorObject/Automation/BasketSnapshot.php +++ b/library/Director/DirectorObject/Automation/BasketSnapshot.php @@ -231,14 +231,6 @@ class BasketSnapshot extends DbObject } } - protected static function classWantsTemplate($class) - { - return strpos($class, '\\Icinga\\Module\\Director\\Objects\\Icinga') === 0 - && strpos($class, 'Choice') === false - && strpos($class, 'Group') === false - && strpos($class, 'Command') === false; - } - protected function addAll($typeName) { $class = static::getClassForType($typeName); @@ -279,9 +271,7 @@ class BasketSnapshot extends DbObject public static function instanceByIdentifier($typeName, $identifier, Db $connection) { $class = static::getClassForType($typeName); - if (static::classWantsTemplate($class) - && strpos($class, 'IcingaHost') === false - ) { + if (substr($class, -13) === 'IcingaService') { $identifier = [ 'object_type' => 'template', 'object_name' => $identifier,