summaryrefslogtreecommitdiffstats
path: root/library/Director/Resolver/TemplateTree.php
diff options
context:
space:
mode:
Diffstat (limited to 'library/Director/Resolver/TemplateTree.php')
-rw-r--r--library/Director/Resolver/TemplateTree.php12
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(