harmonize since and before search params
Signed-off-by: Julien Veyssier <eneiluj@posteo.net>
This commit is contained in:
@@ -118,7 +118,7 @@ class BoardService {
|
||||
/**
|
||||
* Get all boards that are shared with a user, their groups or circles
|
||||
*/
|
||||
public function getUserBoards(int $since = -1, bool $includeArchived = true, ?int $before = null): array {
|
||||
public function getUserBoards(?int $since = null, bool $includeArchived = true, ?int $before = null): array {
|
||||
return $this->boardMapper->findAllForUser($this->userId, $since, $includeArchived, $before);
|
||||
}
|
||||
|
||||
|
||||
@@ -59,7 +59,7 @@ class FullTextSearchService {
|
||||
|
||||
/** @var CardMapper */
|
||||
private $cardMapper;
|
||||
|
||||
|
||||
public function __construct(
|
||||
BoardMapper $boardMapper, StackMapper $stackMapper, CardMapper $cardMapper
|
||||
) {
|
||||
@@ -187,6 +187,6 @@ class FullTextSearchService {
|
||||
* @return Board[]
|
||||
*/
|
||||
private function getBoardsFromUser(string $userId): array {
|
||||
return $this->boardMapper->findAllByUser($userId, null, null, -1);
|
||||
return $this->boardMapper->findAllByUser($userId, null, null, null);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -90,7 +90,7 @@ class SearchService {
|
||||
}
|
||||
|
||||
public function searchBoards(string $term, ?int $limit, ?int $cursor): array {
|
||||
$boards = $this->boardService->getUserBoards(-1, true, $cursor);
|
||||
$boards = $this->boardService->getUserBoards(null, true, $cursor);
|
||||
// get boards that have a lastmodified date which is lower than the cursor
|
||||
// and which match the search term
|
||||
$filteredBoards = array_filter($boards, static function (Board $board) use ($term, $cursor) {
|
||||
|
||||
Reference in New Issue
Block a user