mirror of
https://github.com/Icinga/icingaweb2-module-businessprocess.git
synced 2025-12-20 23:00:16 -05:00
BpConfigForm: Don't override processes which have coincidentally the same name
fixes #195
This commit is contained in:
parent
20b957a999
commit
67613930a2
1 changed files with 8 additions and 0 deletions
|
|
@ -133,6 +133,14 @@ class BpConfigForm extends BpConfigBaseForm
|
||||||
$name = $this->getValue('name');
|
$name = $this->getValue('name');
|
||||||
|
|
||||||
if ($this->config === null) {
|
if ($this->config === null) {
|
||||||
|
if ($this->storage->hasProcess($name)) {
|
||||||
|
$this->addError(sprintf(
|
||||||
|
$this->translate('A process named "%s" already exists'),
|
||||||
|
$name
|
||||||
|
));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// New config
|
// New config
|
||||||
$config = new BpConfig();
|
$config = new BpConfig();
|
||||||
$config->setName($name);
|
$config->setName($name);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue