diff options
author | Arthur Schiwon <blizzz@arthur-schiwon.de> | 2016-10-07 17:27:33 +0200 |
---|---|---|
committer | Arthur Schiwon <blizzz@arthur-schiwon.de> | 2016-10-07 17:27:33 +0200 |
commit | 006da9afd725060d48fd81893094256ddced0099 (patch) | |
tree | fff71e54f81f9248ad9d6bc6c2cc56cf2389147f | |
parent | 522b053466aac53a0d3e329f15a29bb1ddc359a3 (diff) | |
download | nextcloud-server-006da9afd725060d48fd81893094256ddced0099.tar.gz nextcloud-server-006da9afd725060d48fd81893094256ddced0099.zip |
use different files route/controller
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
-rw-r--r-- | apps/comments/lib/Controller/Notifications.php | 8 | ||||
-rw-r--r-- | apps/comments/tests/Unit/Controller/NotificationsTest.php | 7 |
2 files changed, 2 insertions, 13 deletions
diff --git a/apps/comments/lib/Controller/Notifications.php b/apps/comments/lib/Controller/Notifications.php index f76f1605345..c2a8175d17a 100644 --- a/apps/comments/lib/Controller/Notifications.php +++ b/apps/comments/lib/Controller/Notifications.php @@ -102,13 +102,9 @@ class Notifications extends Controller { return new NotFoundResponse(); } - $dir = $this->folder->getRelativePath($files[0]->getParent()->getPath()); $url = $this->urlGenerator->linkToRouteAbsolute( - 'files.view.index', - [ - 'dir' => $dir, - 'scrollto' => $files[0]->getName() - ] + 'files.viewcontroller.showFile', + [ 'fileid' => $comment->getObjectId() ] ); $this->markProcessed($comment); diff --git a/apps/comments/tests/Unit/Controller/NotificationsTest.php b/apps/comments/tests/Unit/Controller/NotificationsTest.php index 5ab39788213..e887900a615 100644 --- a/apps/comments/tests/Unit/Controller/NotificationsTest.php +++ b/apps/comments/tests/Unit/Controller/NotificationsTest.php @@ -72,9 +72,6 @@ class NotificationsTest extends TestCase { ->will($this->returnValue($comment)); $file = $this->getMockBuilder('\OCP\Files\Node')->getMock(); - $file->expects($this->once()) - ->method('getParent') - ->will($this->returnValue($this->getMockBuilder('\OCP\Files\Folder')->getMock())); $this->folder->expects($this->once()) ->method('getById') @@ -106,10 +103,6 @@ class NotificationsTest extends TestCase { ->with('42') ->will($this->throwException(new NotFoundException())); - $file = $this->getMockBuilder('\OCP\Files\Node')->getMock(); - $file->expects($this->never()) - ->method('getParent'); - $this->folder->expects($this->never()) ->method('getById'); |