Merge pull request #2517 from nextcloud/bugfix/2482
Filter out duplicate cards in overview
This commit is contained in:
@@ -86,6 +86,10 @@ class RelationalEntity extends Entity implements \JsonSerializable {
|
|||||||
return $json;
|
return $json;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function __toString(): string {
|
||||||
|
return (string)$this->getId();
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Resolve relational data from external methods
|
* Resolve relational data from external methods
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -119,15 +119,7 @@ class BoardService {
|
|||||||
$userBoards = $this->boardMapper->findAllByUser($userInfo['user'], null, null, $since, $includeArchived);
|
$userBoards = $this->boardMapper->findAllByUser($userInfo['user'], null, null, $since, $includeArchived);
|
||||||
$groupBoards = $this->boardMapper->findAllByGroups($userInfo['user'], $userInfo['groups'],null, null, $since, $includeArchived);
|
$groupBoards = $this->boardMapper->findAllByGroups($userInfo['user'], $userInfo['groups'],null, null, $since, $includeArchived);
|
||||||
$circleBoards = $this->boardMapper->findAllByCircles($userInfo['user'], null, null, $since, $includeArchived);
|
$circleBoards = $this->boardMapper->findAllByCircles($userInfo['user'], null, null, $since, $includeArchived);
|
||||||
$mergedBoards = array_merge($userBoards, $groupBoards, $circleBoards);
|
return array_unique(array_merge($userBoards, $groupBoards, $circleBoards));
|
||||||
$result = [];
|
|
||||||
/** @var Board $item */
|
|
||||||
foreach ($mergedBoards as &$item) {
|
|
||||||
if (!array_key_exists($item->getId(), $result)) {
|
|
||||||
$result[$item->getId()] = $item;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return array_values($result);
|
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* @return array
|
* @return array
|
||||||
|
|||||||
@@ -140,7 +140,7 @@ class OverviewService {
|
|||||||
$userBoards = $this->boardMapper->findAllByUser($userInfo['user'], null, null);
|
$userBoards = $this->boardMapper->findAllByUser($userInfo['user'], null, null);
|
||||||
$groupBoards = $this->boardMapper->findAllByGroups($userInfo['user'], $userInfo['groups'],null, null);
|
$groupBoards = $this->boardMapper->findAllByGroups($userInfo['user'], $userInfo['groups'],null, null);
|
||||||
$circleBoards = $this->boardMapper->findAllByCircles($userInfo['user'], null, null);
|
$circleBoards = $this->boardMapper->findAllByCircles($userInfo['user'], null, null);
|
||||||
return array_merge($userBoards, $groupBoards, $circleBoards);
|
return array_unique(array_merge($userBoards, $groupBoards, $circleBoards));
|
||||||
}
|
}
|
||||||
|
|
||||||
private function getBoardPrerequisites($userId): array {
|
private function getBoardPrerequisites($userId): array {
|
||||||
|
|||||||
Reference in New Issue
Block a user