aboutsummaryrefslogtreecommitdiffstats
path: root/core/js/share.js
diff options
context:
space:
mode:
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 e67b333dfc1..75448bfe208 100644
--- a/core/js/share.js
+++ b/core/js/share.js
@@ -166,7 +166,7 @@ OC.Share={
OC.Share.addShareWith(share.share_type, share.share_with, share.permissions, possiblePermissions, false);
}
}
- if (share.expiration.length > 0) {
+ if (share.expiration != null) {
OC.Share.showExpirationDate(share.expiration);
}
});
@@ -306,13 +306,14 @@ OC.Share={
OC.Share.itemShares[OC.Share.SHARE_TYPE_LINK] = true;
$('#linkCheckbox').attr('checked', true);
var filename = $('tr').filterAttr('data-id', String(itemSource)).data('file');
+ var type = $('tr').filterAttr('data-id', String(itemSource)).data('type');
if ($('#dir').val() == '/') {
var file = $('#dir').val() + filename;
} else {
var file = $('#dir').val() + '/' + filename;
}
file = '/'+OC.currentUser+'/files'+file;
- var link = parent.location.protocol+'//'+location.host+OC.linkTo('', 'public.php')+'?service=files&file='+file;
+ var link = parent.location.protocol+'//'+location.host+OC.linkTo('', 'public.php')+'?service=files&'+type+'='+file;
$('#linkText').val(link);
$('#linkText').show('blind');
$('#showPassword').show();