summaryrefslogtreecommitdiffstats
path: root/core/js/share.js
diff options
context:
space:
mode:
authorMichael Gapczynski <mtgap@owncloud.com>2012-07-11 12:18:59 -0400
committerMichael Gapczynski <mtgap@owncloud.com>2012-07-11 12:18:59 -0400
commitccb5e99395955233b6600b4bf04c90dfa1d08ede (patch)
tree943f0d3d84d2a8026f1b47c95581b413361f89bb /core/js/share.js
parente896c0a9e3cdf34112ce722583d574f36dbbaf2a (diff)
downloadnextcloud-server-ccb5e99395955233b6600b4bf04c90dfa1d08ede.tar.gz
nextcloud-server-ccb5e99395955233b6600b4bf04c90dfa1d08ede.zip
Generate random token for private links (more entropy than past private links)
Diffstat (limited to 'core/js/share.js')
-rw-r--r--core/js/share.js5
1 files changed, 3 insertions, 2 deletions
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');
});