BpConfigForm: Don't override processes which have coincidentally the same name

fixes #195
This commit is contained in:
Johannes Meyer 2019-01-09 13:02:20 +01:00
parent 20b957a999
commit 67613930a2

View file

@ -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);