From ccb5e99395955233b6600b4bf04c90dfa1d08ede Mon Sep 17 00:00:00 2001 From: Michael Gapczynski Date: Wed, 11 Jul 2012 12:18:59 -0400 Subject: Generate random token for private links (more entropy than past private links) --- core/js/share.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'core') diff --git a/core/js/share.js b/core/js/share.js index 3c7d2619eb2..90da96259e7 100644 --- a/core/js/share.js +++ b/core/js/share.js @@ -253,11 +253,12 @@ $(document).ready(function() { }); $('#privateLinkCheckbox').live('change', function() { + var itemType = $('#dropdown').data('item-type'); var item = $('#dropdown').data('item'); if (this.checked) { // Create a private link - OC.Share.share(item, 'public', 0, function(token) { - OC.Share.showPrivateLink(item, token); + OC.Share.share(itemType, item, OC.Share.SHARE_TYPE_PRIVATE_LINK, 0, 0, function(token) { + OC.Share.showPrivateLink(item, 'foo'); // Change icon OC.Share.icons[item] = OC.imagePath('core', 'actions/public'); }); -- cgit v1.2.3