summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing
diff options
context:
space:
mode:
authorTom Needham <needham.thomas@gmail.com>2012-10-28 15:03:21 +0000
committerTom Needham <needham.thomas@gmail.com>2012-10-28 15:03:21 +0000
commit6675a46679ca85d28b1122e832fd0e85d4eb4d15 (patch)
tree12288ed95a243c4f22830de125f2821733b19b23 /apps/files_sharing
parentbcdf3a23db6867332232f8c1b69ba3fa394e191a (diff)
downloadnextcloud-server-6675a46679ca85d28b1122e832fd0e85d4eb4d15.tar.gz
nextcloud-server-6675a46679ca85d28b1122e832fd0e85d4eb4d15.zip
Fix url generated for public shared files
Diffstat (limited to 'apps/files_sharing')
-rw-r--r--apps/files_sharing/lib/api.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/files_sharing/lib/api.php b/apps/files_sharing/lib/api.php
index b1dc0d9e68e..b450b359a4b 100644
--- a/apps/files_sharing/lib/api.php
+++ b/apps/files_sharing/lib/api.php
@@ -14,7 +14,7 @@ class OC_Sharing_API {
'remote' => OCP\Share::SHARE_TYPE_USER,
);
$type = $typemap[$parameters['type']];
- $shareWith = isset($_POST['shareWith']) ? $_POST['shareWith'] : '';
+ $shareWith = isset($_POST['shareWith']) ? $_POST['shareWith'] : null;
$permissionstring = isset($_POST['permissions']) ? $_POST['permissions'] : '';
$permissionmap = array(
'C' => OCP\Share::PERMISSION_CREATE,
@@ -37,7 +37,7 @@ class OC_Sharing_API {
}
switch($type){
case OCP\Share::SHARE_TYPE_LINK:
- return array('url' => OC_Helper::linkToPublic('files') . '&file=' . OC_User::getUser() . '/files' . $path);
+ return array('url' => OC_Helper::linkToPublic('files') . '&file=/' . OC_User::getUser() . '/files' . $path);
break;
}