summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorBjoern Schiessle <schiessle@owncloud.com>2013-10-30 17:03:53 +0100
committerBjoern Schiessle <schiessle@owncloud.com>2013-10-30 17:44:56 +0100
commit3b1c365c829b7d37a383fd9085ae66133d754da7 (patch)
treed963cf2a10c51facf85134e26678f67817d50d64 /core
parentc251ccfcfb336d234a6bd6e4282ba354d9a1b5ee (diff)
downloadnextcloud-server-3b1c365c829b7d37a383fd9085ae66133d754da7.tar.gz
nextcloud-server-3b1c365c829b7d37a383fd9085ae66133d754da7.zip
allow to share a file/folder as public link also if one of it parents was already shared as link
Diffstat (limited to 'core')
-rw-r--r--core/js/share.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/core/js/share.js b/core/js/share.js
index 7ed91ee785a..a34542a8abd 100644
--- a/core/js/share.js
+++ b/core/js/share.js
@@ -56,7 +56,7 @@ OC.Share={
var path = dir;
// Search for possible parent folders that are shared
while (path != last) {
- if (path == data['path']) {
+ if (path == data['path'] && !data['link']) {
var actions = $('.fileactions .action[data-action="Share"]');
$.each(actions, function(index, action) {
var img = $(action).find('img');
@@ -233,7 +233,9 @@ OC.Share={
if (data.shares) {
$.each(data.shares, function(index, share) {
if (share.share_type == OC.Share.SHARE_TYPE_LINK) {
- OC.Share.showLink(share.token, share.share_with, itemSource);
+ if ( !('file_target' in share) ) {
+ OC.Share.showLink(share.token, share.share_with, itemSource);
+ }
} else {
if (share.collection) {
OC.Share.addShareWith(share.share_type, share.share_with, share.share_with_displayname, share.permissions, possiblePermissions, share.collection);