[icinga-checkins] icinga.org: icingaweb2-module-director/master: SyncRule: initialize hasServiceSet

git at icinga.org git at icinga.org
Tue Dec 13 13:51:56 CET 2016


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

Author: Thomas Gelf <thomas at gelf.net>
Date:   Tue Dec 13 13:51:41 2016 +0100

SyncRule: initialize hasServiceSet

---

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

diff --git a/library/Director/Objects/SyncRule.php b/library/Director/Objects/SyncRule.php
index 452a3dd..3d32dee 100644
--- a/library/Director/Objects/SyncRule.php
+++ b/library/Director/Objects/SyncRule.php
@@ -262,6 +262,7 @@ class SyncRule extends DbObject
             if ($this->get('object_type') === 'service') {
                 $hasHost = false;
                 $hasObjectName = false;
+                $hasServiceSet = false;
 
                 foreach ($this->getSyncProperties() as $key => $property) {
                     if ($property->destination_field === 'host') {
@@ -284,8 +285,7 @@ class SyncRule extends DbObject
                     );
 
                     $this->destinationKeyPattern = '${host}!${object_name}';
-                }
-                elseif ($hasServiceSet !== false && $hasObjectName !== false) {
+                } elseif ($hasServiceSet !== false && $hasObjectName !== false) {
                     $this->hasCombinedKey = true;
                     $this->sourceKeyPattern = sprintf(
                         '%s!%s',



More information about the icinga-checkins mailing list