summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorMichael Gapczynski <mtgap@owncloud.com>2012-08-24 10:01:01 -0400
committerMichael Gapczynski <mtgap@owncloud.com>2012-08-24 10:05:37 -0400
commit36487246eddc87342d113de8f133f8fb910c70ad (patch)
treef073b1cc6089e8b24241995b351ebf77722d06b1 /core
parentcfec290ad90f8bce01f37cd0ec1f957219770aad (diff)
downloadnextcloud-server-36487246eddc87342d113de8f133f8fb910c70ad.tar.gz
nextcloud-server-36487246eddc87342d113de8f133f8fb910c70ad.zip
Switch to using file cache ids instead of paths for file sharing
Diffstat (limited to 'core')
-rw-r--r--core/js/share.js13
1 files changed, 12 insertions, 1 deletions
diff --git a/core/js/share.js b/core/js/share.js
index 1c96cfa2232..810a4e7c0a5 100644
--- a/core/js/share.js
+++ b/core/js/share.js
@@ -32,7 +32,18 @@ OC.Share={
},
loadItem:function(itemType, itemSource) {
var data = '';
- if (typeof OC.Share.statuses[itemSource] === 'undefined') {
+ // Switch file sources to path to check if status is set
+ if (itemType == 'file' || itemType == 'folder') {
+ var filename = $('tr').filterAttr('data-id', String(itemSource)).data('file');
+ if ($('#dir').val() == '/') {
+ var item = $('#dir').val() + filename;
+ } else {
+ var item = $('#dir').val() + '/' + filename;
+ }
+ } else {
+ var item = itemSource;
+ }
+ if (typeof OC.Share.statuses[item] === 'undefined') {
checkShares = false;
} else {
checkShares = true;