From 0d8746624b5990f792952578d01f5f0c59dd2250 Mon Sep 17 00:00:00 2001 From: Thomas Gelf Date: Wed, 9 Dec 2015 11:45:04 +0100 Subject: [PATCH] Sync: fix variables passed to helper methods --- library/Director/Import/Sync.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/library/Director/Import/Sync.php b/library/Director/Import/Sync.php index 52928b82..9fe7518b 100644 --- a/library/Director/Import/Sync.php +++ b/library/Director/Import/Sync.php @@ -197,7 +197,7 @@ class Sync foreach ($properties as $p) { $sourceId = $p->source_id; - if (! array_key_exists($sourceId, $sources)) { + if (! array_key_exists($sourceId, $columns)) { $columns[$sourceId] = array(); } @@ -210,7 +210,7 @@ class Sync return $columns; } - protected function fetchImportedData($sources, $properties, $db) + protected function fetchImportedData($sources, $properties, SyncRule $rule, $db) { $imported = array(); @@ -255,8 +255,8 @@ class Sync { $db = $rule->getConnection(); $properties = $rule->fetchSyncProperties(); - $sources = $this->perpareImportSources($properties, $db); - $imported = $this->fetchImportedData($sources, $properties, $db); + $sources = $this->perpareImportSources($properties, $db); + $imported = $this->fetchImportedData($sources, $properties, $rule, $db); // TODO: Filter auf object, nicht template $objects = IcingaObject::loadAllByType($rule->object_type, $db);