Fix incorrect toaddress being passed for emailing private links

This commit is contained in:
Michael Gapczynski 2012-05-15 19:05:07 -04:00
parent 0f66870470
commit c04074692e

View file

@ -200,13 +200,13 @@ OC.Share={
$('#emailButton').hide();
},
emailPrivateLink:function() {
var link = $('#privateLinkText').val();
var file = link.substr(link.lastIndexOf('/') + 1).replace(/%20/g, ' ');
$.post(OC.filePath('files_sharing', 'ajax', 'email.php'), { toaddress: $('#email').val(), link: link, file: file } );
$('#email').css('font-weight', 'bold');
$('#email').animate({ fontWeight: 'normal' }, 2000, function() {
$(this).val('');
}).val('Email sent');
var link = $('#privateLinkText').val();
var file = link.substr(link.lastIndexOf('/') + 1).replace(/%20/g, ' ');
$.post(OC.filePath('files_sharing', 'ajax', 'email.php'), { toaddress: $('#email').val(), link: link, file: file } );
},
dirname:function(path) {
return path.replace(/\\/g,'/').replace(/\/[^\/]*$/, '');