diff options
author | Michael Gapczynski <GapczynskiM@gmail.com> | 2012-05-15 19:05:07 -0400 |
---|---|---|
committer | Michael Gapczynski <GapczynskiM@gmail.com> | 2012-05-15 19:05:26 -0400 |
commit | c04074692e1e97c5f249ec73e46b5ecd80ad19be (patch) | |
tree | 6eac4dd1f30ae382e96cb0c4d4c2af891cb60bd8 /apps | |
parent | 0f66870470ae17b706f30ea0b94b433763fe1a93 (diff) | |
download | nextcloud-server-c04074692e1e97c5f249ec73e46b5ecd80ad19be.tar.gz nextcloud-server-c04074692e1e97c5f249ec73e46b5ecd80ad19be.zip |
Fix incorrect toaddress being passed for emailing private links
Diffstat (limited to 'apps')
-rw-r--r-- | apps/files_sharing/js/share.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/apps/files_sharing/js/share.js b/apps/files_sharing/js/share.js index ac1209956d6..a1fa3bb4586 100644 --- a/apps/files_sharing/js/share.js +++ b/apps/files_sharing/js/share.js @@ -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(/\/[^\/]*$/, ''); |