fixed bugs where labels would dissappear

Signed-off-by: Manuel Arno Korfmann <manu@korfmann.info>
This commit is contained in:
Manuel Arno Korfmann
2018-08-05 22:33:42 +02:00
committed by Julius Härtl
parent 4d5353b8d4
commit 94e1b86eaf
7 changed files with 75 additions and 49 deletions

View File

@@ -54,22 +54,6 @@ class LabelMapper extends DeckMapper implements IPermissionMapper {
return $this->findEntities($sql, [$boardId], $limit, $offset);
}
public function liveOrMemoizedLabelsForBoardId($boardId) {
if(is_null($boardId)) {
return array();
}
if(!isset($this->memoizedLabelsByBoardId)) {
$this->memoizedLabelsByBoardId = array();
}
if(!array_key_exists($boardId, $this->memoizedLabelsByBoardId)) {
$this->memoizedLabelsByBoardId[$boardId] = $this->getAssignedLabelsForBoard($boardId);
}
return $this->memoizedLabelsByBoardId[$boardId];
}
public function getAssignedLabelsForBoard($boardId) {
$labels = $this->findAssignedLabelsForBoard($boardId);
$result = array();