diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2016-02-03 09:00:32 +0100 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2016-02-03 09:00:32 +0100 |
commit | 77942ad38afb982c3b7efa841a9bb0b46a0c039a (patch) | |
tree | 9af4ad86310a1758148a5986793d6b614fbe171a /lib | |
parent | 1531e7f440e3c17a9e8e1de975a7178c100aa67e (diff) | |
parent | 064b96ec1c0c6637493bf30fb97b0194cec9f89b (diff) | |
download | nextcloud-server-77942ad38afb982c3b7efa841a9bb0b46a0c039a.tar.gz nextcloud-server-77942ad38afb982c3b7efa841a9bb0b46a0c039a.zip |
Merge pull request #22059 from owncloud/comments-readmark-dav
Comments DAV methods for read mark manipulation (mark comments of a file as read) + return isUnread status
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/comments/manager.php | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/private/comments/manager.php b/lib/private/comments/manager.php index 23add3fd2c3..28bd3b0916a 100644 --- a/lib/private/comments/manager.php +++ b/lib/private/comments/manager.php @@ -629,9 +629,15 @@ class Manager implements ICommentsManager { $affectedRows = $qb ->update('comments_read_markers') ->set('user_id', $values['user_id']) - ->set('marker_datetime', $values['marker_datetime'], 'datetime') + ->set('marker_datetime', $values['marker_datetime']) ->set('object_type', $values['object_type']) ->set('object_id', $values['object_id']) + ->where($qb->expr()->eq('user_id', $qb->createParameter('user_id'))) + ->andWhere($qb->expr()->eq('object_type', $qb->createParameter('object_type'))) + ->andWhere($qb->expr()->eq('object_id', $qb->createParameter('object_id'))) + ->setParameter('user_id', $user->getUID(), \PDO::PARAM_STR) + ->setParameter('object_type', $objectType, \PDO::PARAM_STR) + ->setParameter('object_id', $objectId, \PDO::PARAM_STR) ->execute(); if ($affectedRows > 0) { |