summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2013-10-30 09:40:57 -0700
committerVincent Petry <pvince81@owncloud.com>2013-10-30 09:40:57 -0700
commitca4a1ee5f7e223b521e41784b0d9b7ed2af162af (patch)
tree3a54a55a5f35341eea95b36a50d5fbfecb884e0a
parent7ba803919bc314ee84b4e5adc9d7a6bf53af8233 (diff)
parent4c7082bf1ddd45824fd0f68fbdbb761d3e39a5ee (diff)
downloadnextcloud-server-ca4a1ee5f7e223b521e41784b0d9b7ed2af162af.tar.gz
nextcloud-server-ca4a1ee5f7e223b521e41784b0d9b7ed2af162af.zip
Merge pull request #5632 from owncloud/allow_nested_link_shares
allow nested link shares
-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 c53fa4110b5..411f0d23c36 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');
@@ -244,7 +244,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.mail_send, share.collection);