From 1a229355343a81e29a3dde8a667053a5eb14799d Mon Sep 17 00:00:00 2001 From: Marcel Klehr Date: Mon, 5 Aug 2024 18:16:01 +0200 Subject: [PATCH] feat(BookmarkController#countBookmarks): Fix root folder count used to be unique bookmarks including bookmarks in trashbin now it's the same as normal folder counts: every item is counted fixes #2202 Signed-off-by: Marcel Klehr --- lib/Controller/BookmarkController.php | 5 ----- 1 file changed, 5 deletions(-) diff --git a/lib/Controller/BookmarkController.php b/lib/Controller/BookmarkController.php index 4b3b4b4ba..67cb5311b 100644 --- a/lib/Controller/BookmarkController.php +++ b/lib/Controller/BookmarkController.php @@ -775,11 +775,6 @@ public function countBookmarks(int $folder): JSONResponse { return $res; } - if ($folder === -1 && $this->authorizer->getUserId() !== null) { - $count = $this->bookmarkMapper->countBookmarksOfUser($this->authorizer->getUserId()); - return new JSONResponse(['status' => 'success', 'item' => $count]); - } - $folder = $this->toInternalFolderId($folder); if ($folder === null) { $res = new JSONResponse(['status' => 'error', 'data' => ['Not found']], Http::STATUS_NOT_FOUND);