diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2017-07-20 09:04:56 +0200 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2017-08-01 08:20:16 +0200 |
commit | 201bbb962c982ca9aa5d1aed52fef2c587055ea3 (patch) | |
tree | 609dbd3c6a2e4886c0669cbcd87fcb895fdda7c4 /apps/comments/lib/Activity | |
parent | 19b039e6e0d4f3955758e001d62c93aca90424d3 (diff) | |
download | nextcloud-server-201bbb962c982ca9aa5d1aed52fef2c587055ea3.tar.gz nextcloud-server-201bbb962c982ca9aa5d1aed52fef2c587055ea3.zip |
Fix Comments
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'apps/comments/lib/Activity')
-rw-r--r-- | apps/comments/lib/Activity/Listener.php | 4 | ||||
-rw-r--r-- | apps/comments/lib/Activity/Provider.php | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/apps/comments/lib/Activity/Listener.php b/apps/comments/lib/Activity/Listener.php index 16852296cf1..94176921f05 100644 --- a/apps/comments/lib/Activity/Listener.php +++ b/apps/comments/lib/Activity/Listener.php @@ -84,7 +84,7 @@ class Listener { // Get all mount point owners $cache = $this->mountCollection->getMountCache(); - $mounts = $cache->getMountsForFileId($event->getComment()->getObjectId()); + $mounts = $cache->getMountsForFileId((int)$event->getComment()->getObjectId()); if (empty($mounts)) { return; } @@ -93,7 +93,7 @@ class Listener { foreach ($mounts as $mount) { $owner = $mount->getUser()->getUID(); $ownerFolder = $this->rootFolder->getUserFolder($owner); - $nodes = $ownerFolder->getById($event->getComment()->getObjectId()); + $nodes = $ownerFolder->getById((int)$event->getComment()->getObjectId()); if (!empty($nodes)) { /** @var Node $node */ $node = array_shift($nodes); diff --git a/apps/comments/lib/Activity/Provider.php b/apps/comments/lib/Activity/Provider.php index 7bf686e796e..ea4810f92ed 100644 --- a/apps/comments/lib/Activity/Provider.php +++ b/apps/comments/lib/Activity/Provider.php @@ -147,7 +147,7 @@ class Provider implements IProvider { trim($subjectParameters[1], '/'), ])) ->setRichSubject($this->l->t('You commented on {file}'), [ - 'file' => $this->generateFileParameter($event->getObjectId(), $subjectParameters[1]), + 'file' => $this->generateFileParameter((int)$event->getObjectId(), $subjectParameters[1]), ]); } else { $author = $this->generateUserParameter($subjectParameters[0]); @@ -157,7 +157,7 @@ class Provider implements IProvider { ])) ->setRichSubject($this->l->t('{author} commented on {file}'), [ 'author' => $author, - 'file' => $this->generateFileParameter($event->getObjectId(), $subjectParameters[1]), + 'file' => $this->generateFileParameter((int)$event->getObjectId(), $subjectParameters[1]), ]); } } else { @@ -173,7 +173,7 @@ class Provider implements IProvider { protected function parseMessage(IEvent $event) { $messageParameters = $event->getMessageParameters(); try { - $comment = $this->commentsManager->get((int) $messageParameters[0]); + $comment = $this->commentsManager->get((string) $messageParameters[0]); $message = $comment->getMessage(); $message = str_replace("\n", '<br />', str_replace(['<', '>'], ['<', '>'], $message)); |