]> source.dussan.org Git - nextcloud-server.git/commitdiff
Merge public link icon check
authorMichael Gapczynski <GapczynskiM@gmail.com>
Thu, 18 Aug 2011 17:14:06 +0000 (13:14 -0400)
committerMichael Gapczynski <GapczynskiM@gmail.com>
Thu, 18 Aug 2011 17:14:06 +0000 (13:14 -0400)
apps/files_sharing/js/share.js

index f9500ffd000249954740d98142a0f3a8cef6873b..1ae55b499372ef7d8b3b58751874ca71111df5ff 100644 (file)
@@ -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');
                                        }