[icinga-checkins] icinga.org: icingaweb2-module-director/master: Db: cosmetics

git at icinga.org git at icinga.org
Fri Dec 16 13:19:46 CET 2016


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

Author: Thomas Gelf <thomas at gelf.net>
Date:   Fri Dec 16 12:23:47 2016 +0100

Db: cosmetics

---

 library/Director/Db.php |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/library/Director/Db.php b/library/Director/Db.php
index bec0de3..adcc1c1 100644
--- a/library/Director/Db.php
+++ b/library/Director/Db.php
@@ -2,12 +2,10 @@
 
 namespace Icinga\Module\Director;
 
-use Icinga\Exception\IcingaException;
 use Icinga\Module\Director\Data\Db\DbConnection;
 use Icinga\Module\Director\Objects\DirectorDeploymentLog;
 use Icinga\Module\Director\Objects\IcingaEndpoint;
 use Icinga\Module\Director\Objects\IcingaObject;
-use Icinga\Module\Director\Util;
 use Icinga\Exception\ConfigurationError;
 use Zend_Db_Expr;
 use Zend_Db_Select;
@@ -43,7 +41,7 @@ class Db extends DbConnection
 
         if ($object !== null) {
             $query .= $db->quoteInto(' AND object_type = ?', $object->getTableName());
-            $query .= $db->quoteInto(' AND object_name = ?', $object->object_name);
+            $query .= $db->quoteInto(' AND object_name = ?', $object->getObjectName());
         }
         return (int) $db->fetchOne($query);
     }
@@ -224,7 +222,7 @@ class Db extends DbConnection
     public function fetchActivityLogChecksumById($id, $binary = true)
     {
         $sql = sprintf(
-            'SELECT %s AS checksum FROM director_activity_log WHERE id = %d',
+            'SELECT' . ' %s AS checksum FROM director_activity_log WHERE id = %d',
             $this->dbHexFunc('checksum'),
             (int) $id
         );



More information about the icinga-checkins mailing list