From 67613930a2f739ce3c62813974f617d68566976f Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Wed, 9 Jan 2019 13:02:20 +0100 Subject: [PATCH] BpConfigForm: Don't override processes which have coincidentally the same name fixes #195 --- application/forms/BpConfigForm.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/application/forms/BpConfigForm.php b/application/forms/BpConfigForm.php index 9c85d23..53870fc 100644 --- a/application/forms/BpConfigForm.php +++ b/application/forms/BpConfigForm.php @@ -133,6 +133,14 @@ class BpConfigForm extends BpConfigBaseForm $name = $this->getValue('name'); if ($this->config === null) { + if ($this->storage->hasProcess($name)) { + $this->addError(sprintf( + $this->translate('A process named "%s" already exists'), + $name + )); + return; + } + // New config $config = new BpConfig(); $config->setName($name);