From d253b77a49a4508e7cc8e1d35b66109630dcc539 Mon Sep 17 00:00:00 2001 From: Thomas Tanghus Date: Wed, 3 Oct 2012 18:47:02 +0200 Subject: [PATCH] Also show correct links for addressbooks. --- js/settings.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/js/settings.js b/js/settings.js index 3dc18b6c..e927d5f9 100644 --- a/js/settings.js +++ b/js/settings.js @@ -127,12 +127,16 @@ OC.Contacts.Settings = OC.Contacts.Settings || { showCardDAV:function(id) { console.log('showCardDAV: ', id); var row = this.adrsettings.find('tr[data-id="'+id+'"]'); - this.showLink(id, row, totalurl+'/'+encodeURIComponent(oc_current_user)+'/'+encodeURIComponent(row.data('uri'))); + var owner = row.data('owner'); + var uri = (owner === oc_current_user ) ? row.data('uri') : row.data('uri') + '_shared_by_' + owner; + this.showLink(id, row, totalurl+'/'+encodeURIComponent(oc_current_user)+'/'+encodeURIComponent(uri)); }, showVCF:function(id) { console.log('showVCF: ', id); var row = this.adrsettings.find('tr[data-id="'+id+'"]'); - var link = totalurl+'/'+encodeURIComponent(oc_current_user)+'/'+encodeURIComponent(row.data('uri'))+'?export'; + var owner = row.data('owner'); + var uri = (owner === oc_current_user ) ? row.data('uri') : row.data('uri') + '_shared_by_' + owner; + var link = totalurl+'/'+encodeURIComponent(oc_current_user)+'/'+encodeURIComponent(uri)+'?export'; console.log(link); this.showLink(id, row, link); }