diff options
author | Björn Schießle <bjoern@schiessle.org> | 2015-12-14 16:04:05 +0100 |
---|---|---|
committer | Björn Schießle <bjoern@schiessle.org> | 2015-12-14 17:25:10 +0100 |
commit | c4b65170f2d77298f130f959d85ac3be5f6ea0a8 (patch) | |
tree | a6ca8534f66cb6d77e6b170bdf9396a087b67e9a /apps/files_sharing/js | |
parent | efc030aa25b047a7c9f720cf781f26cbe1d274e0 (diff) | |
download | nextcloud-server-c4b65170f2d77298f130f959d85ac3be5f6ea0a8.tar.gz nextcloud-server-c4b65170f2d77298f130f959d85ac3be5f6ea0a8.zip |
show display name but internally use the user name
Diffstat (limited to 'apps/files_sharing/js')
-rw-r--r-- | apps/files_sharing/js/external.js | 3 | ||||
-rw-r--r-- | apps/files_sharing/js/public.js | 7 |
2 files changed, 6 insertions, 4 deletions
diff --git a/apps/files_sharing/js/external.js b/apps/files_sharing/js/external.js index f658de307ab..45a6ef02758 100644 --- a/apps/files_sharing/js/external.js +++ b/apps/files_sharing/js/external.js @@ -19,7 +19,7 @@ */ OCA.Sharing.showAddExternalDialog = function (share, passwordProtected, callback) { var remote = share.remote; - var owner = share.owner; + var owner = share.ownerDisplayName || share.owner; var name = share.name; var remoteClean = (remote.substr(0, 8) === 'https://') ? remote.substr(8) : remote.substr(7); @@ -92,6 +92,7 @@ remote: share.remote, token: share.token, owner: share.owner, + ownerDisplayName: share.ownerDisplayName || share.owner, name: share.name, password: password}, function(result) { if (result.status === 'error') { diff --git a/apps/files_sharing/js/public.js b/apps/files_sharing/js/public.js index 70c1ba5c0c2..af808447381 100644 --- a/apps/files_sharing/js/public.js +++ b/apps/files_sharing/js/public.js @@ -242,9 +242,10 @@ OCA.Sharing.PublicApp = { var remote = $(this).find('input[type="text"]').val(); var token = $('#sharingToken').val(); var owner = $('#save').data('owner'); + var ownerDisplayName = $('#save').data('owner-display-name'); var name = $('#save').data('name'); var isProtected = $('#save').data('protected') ? 1 : 0; - OCA.Sharing.PublicApp._saveToOwnCloud(remote, token, owner, name, isProtected); + OCA.Sharing.PublicApp._saveToOwnCloud(remote, token, owner, ownerDisplayName, name, isProtected); }); $('#remote_address').on("keyup paste", function() { @@ -291,7 +292,7 @@ OCA.Sharing.PublicApp = { this.fileList.changeDirectory(params.path || params.dir, false, true); }, - _saveToOwnCloud: function (remote, token, owner, name, isProtected) { + _saveToOwnCloud: function (remote, token, owner, ownerDisplayName, name, isProtected) { var location = window.location.protocol + '//' + window.location.host + OC.webroot; if(remote.substr(-1) !== '/') { @@ -299,7 +300,7 @@ OCA.Sharing.PublicApp = { }; var url = remote + 'index.php/apps/files#' + 'remote=' + encodeURIComponent(location) // our location is the remote for the other server - + "&token=" + encodeURIComponent(token) + "&owner=" + encodeURIComponent(owner) + "&name=" + encodeURIComponent(name) + "&protected=" + isProtected; + + "&token=" + encodeURIComponent(token) + "&owner=" + encodeURIComponent(owner) +"&ownerDisplayName=" + encodeURIComponent(ownerDisplayName) + "&name=" + encodeURIComponent(name) + "&protected=" + isProtected; if (remote.indexOf('://') > 0) { |