parent
6258230fdb
commit
52e412002f
|
@ -116,7 +116,7 @@ class IcingaCommandArgumentForm extends DirectorObjectForm
|
|||
$this->translate('The argument %s has successfully been stored'),
|
||||
$object->argument_name
|
||||
);
|
||||
$object->store($this->db);
|
||||
$cmd->store($this->db);
|
||||
} else {
|
||||
$this->setHttpResponseCode(304);
|
||||
$msg = $this->translate('No action taken, object has not been modified');
|
||||
|
|
|
@ -82,9 +82,16 @@ class IcingaArguments implements Iterator, Countable, IcingaConfigRenderer
|
|||
|
||||
public function set($key, $value)
|
||||
{
|
||||
$argument = IcingaCommandArgument::create(
|
||||
$this->mungeCommandArgument($key, $value)
|
||||
)->set('command_id', $this->object->id);
|
||||
if ($value instanceof IcingaCommandArgument) {
|
||||
$argument = $value;
|
||||
} else {
|
||||
$argument = IcingaCommandArgument::create(
|
||||
$this->mungeCommandArgument($key, $value)
|
||||
);
|
||||
}
|
||||
|
||||
$argument->set('command_id', $this->object->id);
|
||||
|
||||
$key = $argument->argument_name;
|
||||
if (array_key_exists($key, $this->arguments)) {
|
||||
$this->arguments[$key]->replaceWith($argument);
|
||||
|
|
Loading…
Reference in New Issue