From 1f0cd40dc7988411681162485388e6e020d3f18c Mon Sep 17 00:00:00 2001 From: fcki1984 <39592566+fcki1984@users.noreply.github.com> Date: Fri, 12 May 2023 22:15:42 +0800 Subject: [PATCH] Update BookmarkMapper.php --- lib/Db/BookmarkMapper.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/Db/BookmarkMapper.php b/lib/Db/BookmarkMapper.php index 8f5ff09..6ed45ee 100644 --- a/lib/Db/BookmarkMapper.php +++ b/lib/Db/BookmarkMapper.php @@ -39,20 +39,20 @@ class BookmarkMapper extends ReaderMapper { public function get($fileId, $name, $type = null) { $query = $this->db->getQueryBuilder(); $query->select('*') - ->from($this->getTableName()) - ->where($query->expr()->eq('file_id', $query->createNamedParameter($fileId))) - ->andWhere($query->expr()->eq('user_id', $query->createNamedParameter($this->userId))); + ->from($this->getTableName()) + ->where($query->expr()->eq('file_id', $query->createNamedParameter($fileId))) + ->andWhere($query->expr()->eq('user_id', $query->createNamedParameter($this->userId))); if ($type !== null) { - $query->andWhere($query->expr()->eq('type', $query->createNamedParameter($type))); + $query->andWhere($query->expr()->eq('type', $query->createNamedParameter($type))); } if ($name !== null) { - $query->andWhere($query->expr()->eq('name', $query->createNamedParameter($name))); + $query->andWhere($query->expr()->eq('name', $query->createNamedParameter($name))); } return $this->findEntities($query); - } + } /** * @brief write bookmark to database