From 1ca41c5b10709a7721bfafc81e552ea11deaef80 Mon Sep 17 00:00:00 2001 From: Thomas Gelf Date: Thu, 14 Jun 2018 13:41:13 +0200 Subject: [PATCH] CloneSyncRuleForm: prepare for multi-db use --- library/Director/Web/Form/CloneSyncRuleForm.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/Director/Web/Form/CloneSyncRuleForm.php b/library/Director/Web/Form/CloneSyncRuleForm.php index 5b20ce24..4b3865e0 100644 --- a/library/Director/Web/Form/CloneSyncRuleForm.php +++ b/library/Director/Web/Form/CloneSyncRuleForm.php @@ -52,7 +52,7 @@ class CloneSyncRuleForm extends Form $export = $this->rule->export(); $newName = $this->getValue('rule_name'); $export->rule_name = $newName; - if (SyncRule::existsWithName($newName, $this->rule->getConnection())) { + if (SyncRule::existsWithName($newName, $this->getTargetDb())) { $this->getElement('rule_name')->addMessage('Name already exists'); } $this->newRule = SyncRule::import($export, $this->getTargetDb());