From 4b80e8e8ed6fb7f5f85f93823b278a199d90a91c Mon Sep 17 00:00:00 2001 From: Jonas Heinrich Date: Sun, 15 Nov 2020 23:13:29 +0100 Subject: [PATCH] fix correct display recent --- lib/Db/RecentMapper.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/Db/RecentMapper.php b/lib/Db/RecentMapper.php index 10a3dd2..afbbd5d 100644 --- a/lib/Db/RecentMapper.php +++ b/lib/Db/RecentMapper.php @@ -23,7 +23,10 @@ class RecentMapper extends QBMapper { public function find(int $id, string $userId): Station { /* @var $qb IQueryBuilder */ $qb = $this->db->getQueryBuilder(); - $qb->select('*') + $qb->selectDistinct('stationuuid') + ->addSelect('name') + ->addSelect('favicon') + ->addSelect('urlresolved') ->from('recent') ->orderBy('id', 'DESC') ->where($qb->expr()->eq('id', $qb->createNamedParameter($id, IQueryBuilder::PARAM_INT))) @@ -38,7 +41,10 @@ class RecentMapper extends QBMapper { public function findAll(string $userId): array { /* @var $qb IQueryBuilder */ $qb = $this->db->getQueryBuilder(); - $qb->select('*') + $qb->selectDistinct('stationuuid') + ->addSelect('name') + ->addSelect('favicon') + ->addSelect('urlresolved') ->from('recent') ->orderBy('id', 'DESC') ->where($qb->expr()->eq('user_id', $qb->createNamedParameter($userId)));