[icinga-checkins] icinga.org: icingaweb2-module-director/master: IcingaObject: remove duplicated short name logic

git at icinga.org git at icinga.org
Wed Oct 12 11:11:20 CEST 2016


Module: icingaweb2-module-director
Branch: master
Commit: 34ed3da3b895e96699f5fb07ef88496437ff3298
URL:    https://git.icinga.org/?p=icingaweb2-module-director.git;a=commit;h=34ed3da3b895e96699f5fb07ef88496437ff3298

Author: Thomas Gelf <thomas at gelf.net>
Date:   Wed Oct 12 09:09:28 2016 +0000

IcingaObject: remove duplicated short name logic

---

 library/Director/Objects/IcingaObject.php |    7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/library/Director/Objects/IcingaObject.php b/library/Director/Objects/IcingaObject.php
index 8caea5b..8923bbe 100644
--- a/library/Director/Objects/IcingaObject.php
+++ b/library/Director/Objects/IcingaObject.php
@@ -916,12 +916,7 @@ abstract class IcingaObject extends DbObject implements IcingaConfigRenderer
     {
         $db = $this->getDb();
         $table = $this->getTableName();
-
-        $type = strtolower($this->getType());
-
-        if ($type === 'checkcommand') {
-            $type = 'command';
-        }
+        $type = $this->getShortTableName();
 
         $query = $db->select()->from(
             array('oi' => $table . '_inheritance'),



More information about the icinga-checkins mailing list