From a9b78614733cd143db9eec53569ce1b687645e03 Mon Sep 17 00:00:00 2001 From: Thomas Gelf Date: Fri, 24 Jun 2016 08:36:12 +0200 Subject: [PATCH] SyncRule: provide current runId --- library/Director/Objects/SyncRule.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/library/Director/Objects/SyncRule.php b/library/Director/Objects/SyncRule.php index 43d9a7db..eac58613 100644 --- a/library/Director/Objects/SyncRule.php +++ b/library/Director/Objects/SyncRule.php @@ -30,6 +30,8 @@ class SyncRule extends DbObject private $sync; + private $currentSyncRunId; + private $filter; public function listInvolvedSourceIds() @@ -119,9 +121,10 @@ class SyncRule extends DbObject if ($sync->hasModifications()) { Benchmark::measure('Got modifications for sync rule ' . $this->rule_name); $this->sync_state = 'pending-changes'; - if ($apply && $sync->apply()) { + if ($apply && $runId = $sync->apply()) { Benchmark::measure('Successfully synced rule ' . $this->rule_name); $this->sync_state = 'in-sync'; + $this->currentSyncRunId = $runId; } $hadChanges = true;