summaryrefslogtreecommitdiffstats
path: root/apps/dav/lib/Connector/Sabre/CommentPropertiesPlugin.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/dav/lib/Connector/Sabre/CommentPropertiesPlugin.php')
-rw-r--r--apps/dav/lib/Connector/Sabre/CommentPropertiesPlugin.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/apps/dav/lib/Connector/Sabre/CommentPropertiesPlugin.php b/apps/dav/lib/Connector/Sabre/CommentPropertiesPlugin.php
index a8d5f771122..e9559e361b8 100644
--- a/apps/dav/lib/Connector/Sabre/CommentPropertiesPlugin.php
+++ b/apps/dav/lib/Connector/Sabre/CommentPropertiesPlugin.php
@@ -99,13 +99,13 @@ class CommentPropertiesPlugin extends ServerPlugin {
*/
public function getCommentsLink(Node $node) {
$href = $this->server->getBaseUri();
- $entryPoint = strrpos($href, '/webdav/');
+ $entryPoint = strpos($href, '/remote.php/');
if($entryPoint === false) {
// in case we end up somewhere else, unexpectedly.
return null;
}
- $href = substr_replace($href, '/dav/', $entryPoint);
- $href .= 'comments/files/' . rawurldecode($node->getId());
+ $commentsPart = 'dav/comments/files/' . rawurldecode($node->getId());
+ $href = substr_replace($href, $commentsPart, $entryPoint + strlen('/remote.php/'));
return $href;
}