now the tests are working
Signed-off-by: Jakob Röhrl <jakob.roehrl@web.de>
This commit is contained in:
committed by
Julius Härtl
parent
ee20841ad6
commit
d11917e4ff
@@ -93,12 +93,13 @@ class LabelService {
|
|||||||
$this->permissionService->checkPermission(null, $boardId, Acl::PERMISSION_MANAGE);
|
$this->permissionService->checkPermission(null, $boardId, Acl::PERMISSION_MANAGE);
|
||||||
|
|
||||||
//$this->checkDuplicateTitle($boardId, $title);
|
//$this->checkDuplicateTitle($boardId, $title);
|
||||||
$boardLabels = array();
|
|
||||||
$boardLabels = $this->labelMapper->findAll($boardId);
|
$boardLabels = $this->labelMapper->findAll($boardId);
|
||||||
foreach($boardLabels as $boardLabel) {
|
if (is_array($boardLabels) || is_object($boardLabels)) {
|
||||||
if ($boardLabel->getTitle() === $title) {
|
foreach($boardLabels as $boardLabel) {
|
||||||
throw new BadRequestException('title must be unique');
|
if ($boardLabel->getTitle() === $title) {
|
||||||
break;
|
throw new BadRequestException('title must be unique');
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -169,13 +170,15 @@ class LabelService {
|
|||||||
|
|
||||||
$boardLabels = array();
|
$boardLabels = array();
|
||||||
$boardLabels = $this->labelMapper->findAll($label->getBoardId());
|
$boardLabels = $this->labelMapper->findAll($label->getBoardId());
|
||||||
foreach($boardLabels as $boardLabel) {
|
if (is_array($boardLabels) || is_object($boardLabels)) {
|
||||||
if ($boardLabel->getId() === $label->getId()) {
|
foreach($boardLabels as $boardLabel) {
|
||||||
continue;
|
if ($boardLabel->getId() === $label->getId()) {
|
||||||
}
|
continue;
|
||||||
if ($boardLabel->getTitle() === $title) {
|
}
|
||||||
throw new BadRequestException('title must be unique');
|
if ($boardLabel->getTitle() === $title) {
|
||||||
break;
|
throw new BadRequestException('title must be unique');
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user