summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/api
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files_sharing/api')
-rw-r--r--apps/files_sharing/api/local.php3
-rw-r--r--apps/files_sharing/api/server2server.php2
2 files changed, 1 insertions, 4 deletions
diff --git a/apps/files_sharing/api/local.php b/apps/files_sharing/api/local.php
index 87a8fbbb21f..3cf541b3fab 100644
--- a/apps/files_sharing/api/local.php
+++ b/apps/files_sharing/api/local.php
@@ -303,8 +303,7 @@ class Local {
break;
}
}
- $url = \OCP\Util::linkToPublic('files&t='.$token);
- $data['url'] = $url; // '&' gets encoded to $amp;
+ $data['url'] = \OC::$server->getURLGenerator()->linkToRouteAbsolute('files_sharing.sharecontroller.showShare', ['token' => $token]);
$data['token'] = $token;
} else {
diff --git a/apps/files_sharing/api/server2server.php b/apps/files_sharing/api/server2server.php
index f2f7561598f..89a0262481c 100644
--- a/apps/files_sharing/api/server2server.php
+++ b/apps/files_sharing/api/server2server.php
@@ -64,8 +64,6 @@ class Server2Server {
$shareWith
);
- $name = \OCP\Files::buildNotExistingFileName('/', $name);
-
try {
$externalManager->addShare($remote, $token, '', $name, $owner, false, $shareWith, $remoteId);