summaryrefslogtreecommitdiffstats
path: root/apps/dav/lib
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2016-05-23 14:47:03 +0200
committerVincent Petry <pvince81@owncloud.com>2016-05-23 14:47:03 +0200
commitc10d8a37f70ecdfeea49b646cd2af96e12895c52 (patch)
tree34fadd93504035ae93d1715b43603a62c318a6b2 /apps/dav/lib
parent21df2eb5a1c8b305d953dcc34386da53ec953aee (diff)
parent2b30136ae9286026af4c8be8f0311f39bbedff06 (diff)
downloadnextcloud-server-c10d8a37f70ecdfeea49b646cd2af96e12895c52.tar.gz
nextcloud-server-c10d8a37f70ecdfeea49b646cd2af96e12895c52.zip
Merge pull request #22690 from owncloud/fix-comments-href-remote.php-files
ensure comments-href returns a value also when propfind is done again…
Diffstat (limited to 'apps/dav/lib')
-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;
}