summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorMichael Gapczynski <GapczynskiM@gmail.com>2011-08-18 13:14:06 -0400
committerMichael Gapczynski <GapczynskiM@gmail.com>2011-08-18 13:14:06 -0400
commit594532da9a786bbb43fe7f24ee29e0668d4fcad1 (patch)
tree8e7ac310ff374cc4ef30f58a26aea6ac0817834f /apps
parent31bcb2bd92f7e8c6170eafc71966071d65a665d7 (diff)
downloadnextcloud-server-594532da9a786bbb43fe7f24ee29e0668d4fcad1.tar.gz
nextcloud-server-594532da9a786bbb43fe7f24ee29e0668d4fcad1.zip
Merge public link icon check
Diffstat (limited to 'apps')
-rw-r--r--apps/files_sharing/js/share.js19
1 files changed, 5 insertions, 14 deletions
diff --git a/apps/files_sharing/js/share.js b/apps/files_sharing/js/share.js
index f9500ffd000..1ae55b49937 100644
--- a/apps/files_sharing/js/share.js
+++ b/apps/files_sharing/js/share.js
@@ -12,20 +12,11 @@ $(document).ready(function() {
success: function(users) {
if (users.length > 0) {
icon = OC.imagePath('core', 'actions/shared');
- } else {
- icon = OC.imagePath('core', 'actions/share');
- }
- }
- });
- $.ajax({
- type: 'GET',
- url: OC.linkTo('files_publiclink', 'ajax/getlink.php'),
- dataType: 'json',
- data: 'path='+file,
- async: false,
- success: function(link) {
- if (link.length > 0) {
- icon = OC.imagePath('core', 'actions/public');
+ $.each(users, function(index, row) {
+ if (row.uid_shared_with == 'public') {
+ icon = OC.imagePath('core', 'actions/public');
+ }
+ });
} else {
icon = OC.imagePath('core', 'actions/share');
}