]> source.dussan.org Git - nextcloud-server.git/commitdiff
allow to share a file/folder as public link also if one of it parents was already...
authorBjoern Schiessle <schiessle@owncloud.com>
Wed, 30 Oct 2013 16:03:53 +0000 (17:03 +0100)
committerBjoern Schiessle <schiessle@owncloud.com>
Wed, 30 Oct 2013 16:44:56 +0000 (17:44 +0100)
core/js/share.js

index 7ed91ee785a121755ec1e64eee4f8503d098b805..a34542a8abde934931a6600946eb18f3f46b1139 100644 (file)
@@ -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);