[icinga-checkins] icinga.org: icingaweb2-module-director/fiddle/mfrosch: WIP: SyncRule: Allow disabling purge

git at icinga.org git at icinga.org
Fri Jul 22 13:55:48 CEST 2016


Module: icingaweb2-module-director
Branch: fiddle/mfrosch
Commit: fb01c09758e28a4065b0cd68f0636ef5d1682bf3
URL:    https://git.icinga.org/?p=icingaweb2-module-director.git;a=commit;h=fb01c09758e28a4065b0cd68f0636ef5d1682bf3

Author: Markus Frosch <lazyfrosch at icinga.org>
Date:   Fri Jul 22 13:55:32 2016 +0200

WIP: SyncRule: Allow disabling purge

---

 library/Director/Objects/SyncRule.php |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/library/Director/Objects/SyncRule.php b/library/Director/Objects/SyncRule.php
index 6566155..1a5603c 100644
--- a/library/Director/Objects/SyncRule.php
+++ b/library/Director/Objects/SyncRule.php
@@ -235,7 +235,7 @@ class SyncRule extends DbObject
     // TODO: Allow for more
     protected function loadConfiguredPurgeStrategy()
     {
-        if ($this->purge_existing) {
+        if ($this->purge_existing === 'y') { // TODO: proper true/false?
             return PurgeStrategy::load('ImportRunBased', $this);
         } else {
             return PurgeStrategy::load('PurgeNothing', $this);



More information about the icinga-checkins mailing list