albums: rearrange stuff in backend

Signed-off-by: Varun Patil <radialapps@gmail.com>
pull/767/head
Varun Patil 2023-08-02 18:08:16 -07:00
parent f82c4ab851
commit 8283516911
1 changed files with 5 additions and 5 deletions

View File

@ -91,14 +91,14 @@ class AlbumsBackend extends Backend
{ {
/** @var \OCP\IRequest $request */ /** @var \OCP\IRequest $request */
$request = \OC::$server->get(\OCP\IRequest::class); $request = \OC::$server->get(\OCP\IRequest::class);
// Run actual query
$list = [];
$fileid = (int) $request->getParam('fileid', -1); $fileid = (int) $request->getParam('fileid', -1);
// personal albums // Run actual queries
$list = [];
// Personal albums
$list = array_merge($list, $this->albumsQuery->getList(Util::getUID(), false, $fileid)); $list = array_merge($list, $this->albumsQuery->getList(Util::getUID(), false, $fileid));
// shared albums // Shared albums
$list = array_merge($list, $this->albumsQuery->getList(Util::getUID(), true, $fileid)); $list = array_merge($list, $this->albumsQuery->getList(Util::getUID(), true, $fileid));
// Remove elements with duplicate album_id // Remove elements with duplicate album_id