diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-14 13:17:47 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-14 13:17:47 +0000 |
commit | 5419d4428c86c488a43124f85e5407d7cbae6541 (patch) | |
tree | 772c4221a20fd7d1b3e7e67c6e21755a50e80fd7 /library/Director/Resolver/TemplateTree.php | |
parent | Adding upstream version 1.10.2. (diff) | |
download | icingaweb2-module-director-5419d4428c86c488a43124f85e5407d7cbae6541.tar.xz icingaweb2-module-director-5419d4428c86c488a43124f85e5407d7cbae6541.zip |
Adding upstream version 1.11.1.upstream/1.11.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-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( |