Fix missing error handling on tag manager actions (#4993)
This commit is contained in:
parent
de110b96a5
commit
a2a55110be
1 changed files with 9 additions and 0 deletions
|
@ -93,6 +93,9 @@ class kolab_tags_engine
|
|||
if ($this->backend->remove($uid)) {
|
||||
$response['delete'][] = $uid;
|
||||
}
|
||||
else {
|
||||
$error = true;
|
||||
}
|
||||
}
|
||||
|
||||
// tags creation
|
||||
|
@ -100,6 +103,9 @@ class kolab_tags_engine
|
|||
if ($tag = $this->backend->create($tag)) {
|
||||
$response['add'][] = $this->parse_tag($tag);
|
||||
}
|
||||
else {
|
||||
$error = true;
|
||||
}
|
||||
}
|
||||
|
||||
// tags update
|
||||
|
@ -107,6 +113,9 @@ class kolab_tags_engine
|
|||
if ($this->backend->update($tag)) {
|
||||
$response['update'][] = $this->parse_tag($tag);
|
||||
}
|
||||
else {
|
||||
$error = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (!empty($error)) {
|
||||
|
|
Loading…
Add table
Reference in a new issue