]> 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:03:53 +0000 (17:03 +0100)
core/js/share.js

index c53fa4110b536824aa00ea3e15eafab1e89d952f..411f0d23c36bd7987f2c9c051eefc9a0191f0de8 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');
@@ -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);