Clone..Form: fix for ImportSource and SyncRule

This commit is contained in:
Thomas Gelf 2018-11-07 11:03:38 +01:00
parent 62a16bd259
commit f3b972e904
2 changed files with 3 additions and 0 deletions

View File

@ -51,6 +51,7 @@ class CloneImportSourceForm extends Form
$export = $this->source->export();
$newName = $this->getValue('source_name');
$export->source_name = $newName;
unset($export->originalId);
if (ImportSource::existsWithName($newName, $this->source->getConnection())) {
$this->getElement('source_name')->addMessage('Name already exists');

View File

@ -52,6 +52,8 @@ class CloneSyncRuleForm extends Form
$export = $this->rule->export();
$newName = $this->getValue('rule_name');
$export->rule_name = $newName;
unset($export->originalId);
if (SyncRule::existsWithName($newName, $this->getTargetDb())) {
$this->getElement('rule_name')->addMessage('Name already exists');
}