diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-14 13:17:48 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-14 13:17:48 +0000 |
commit | e6d4dfc040bbe3cb80a2ce65b82493b557f751fc (patch) | |
tree | 40bd6366b01b06f4d96fc8638f23a772263cb5e9 /library/Director/Resolver/TemplateTree.php | |
parent | Releasing progress-linux version 1.10.2-2~progress7.99u1. (diff) | |
download | icingaweb2-module-director-e6d4dfc040bbe3cb80a2ce65b82493b557f751fc.tar.xz icingaweb2-module-director-e6d4dfc040bbe3cb80a2ce65b82493b557f751fc.zip |
Merging upstream version 1.11.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'library/Director/Resolver/TemplateTree.php')
-rw-r--r-- | library/Director/Resolver/TemplateTree.php | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/library/Director/Resolver/TemplateTree.php b/library/Director/Resolver/TemplateTree.php index f8d8fed..bf941e2 100644 --- a/library/Director/Resolver/TemplateTree.php +++ b/library/Director/Resolver/TemplateTree.php @@ -80,13 +80,13 @@ class TemplateTree $map = []; $db = $this->db; $type = $this->type; - $table = "icinga_${type}_inheritance"; + $table = "icinga_{$type}_inheritance"; $query = $db->select()->from( ['i' => $table], [ - 'object' => "i.${type}_id", - 'parent' => "i.parent_${type}_id", + 'object' => "i.{$type}_id", + 'parent' => "i.parent_{$type}_id", ] )->order('i.weight'); @@ -439,12 +439,12 @@ class TemplateTree if ($type === 'command') { $joinCondition = $db->quoteInto( - "p.id = i.parent_${type}_id", + "p.id = i.parent_{$type}_id", 'template' ); } else { $joinCondition = $db->quoteInto( - "p.id = i.parent_${type}_id AND p.object_type = ?", + "p.id = i.parent_{$type}_id AND p.object_type = ?", 'template' ); } @@ -466,7 +466,7 @@ class TemplateTree ['p' => $table], $joinCondition, [] - )->order('o.id')->order('i.weight'); + )->order('o.object_name')->order('i.weight'); if ($type !== 'command') { $query->where( |