diff options
author | Robin Appelman <icewind@owncloud.com> | 2013-01-15 17:52:32 +0400 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2013-01-15 17:52:32 +0400 |
commit | 985d5d91917bfb73a9f9a14ab30b2aa0b9e13d89 (patch) | |
tree | ba3946a2bf7d48706fdec18f26e19f8d501b1fa6 /files_archive | |
parent | f62b8d4dbb39bae84d653611df9b591d9d41562d (diff) | |
parent | 81fe02d1171013a47bd34896582d2c2f08f08dc5 (diff) |
Merge branch 'master' into filesystem
Diffstat (limited to 'files_archive')
-rw-r--r-- | files_archive/js/archive.js | 36 |
1 files changed, 19 insertions, 17 deletions
diff --git a/files_archive/js/archive.js b/files_archive/js/archive.js index b50d306f1..7b42b1805 100644 --- a/files_archive/js/archive.js +++ b/files_archive/js/archive.js @@ -6,22 +6,24 @@ */ $(document).ready(function() { - if(typeof FileActions!=='undefined'){ - FileActions.register('application/zip','Open', OC.PERMISSION_READ, '',function(filename){ - window.location=OC.linkTo('files', 'index.php')+'?dir='+encodeURIComponent($('#dir').val()).replace(/%2F/g, '/')+'/'+encodeURIComponent(filename); - }); - FileActions.setDefault('application/zip','Open'); - FileActions.register('application/x-gzip','Open', OC.PERMISSION_READ, '',function(filename){ - window.location=OC.linkTo('files', 'index.php')+'?dir='+encodeURIComponent($('#dir').val()).replace(/%2F/g, '/')+'/'+encodeURIComponent(filename); - }); - FileActions.setDefault('application/x-compressed','Open'); - FileActions.register('application/x-compressed','Open', OC.PERMISSION_READ, '',function(filename){ - window.location=OC.linkTo('files', 'index.php')+'?dir='+encodeURIComponent($('#dir').val()).replace(/%2F/g, '/')+'/'+encodeURIComponent(filename); - }); - FileActions.setDefault('application/x-compressed','Open'); - FileActions.register('application/x-tar','Open', OC.PERMISSION_READ, '',function(filename){ - window.location=OC.linkTo('files', 'index.php')+'?dir='+encodeURIComponent($('#dir').val()).replace(/%2F/g, '/')+'/'+encodeURIComponent(filename); - }); - FileActions.setDefault('application/x-tar','Open'); + if(OC.currentUser) { + if(typeof FileActions!=='undefined'){ + FileActions.register('application/zip','Open', OC.PERMISSION_READ, '',function(filename){ + window.location=OC.linkTo('files', 'index.php')+'?dir='+encodeURIComponent($('#dir').val()).replace(/%2F/g, '/')+'/'+encodeURIComponent(filename); + }); + FileActions.setDefault('application/zip','Open'); + FileActions.register('application/x-gzip','Open', OC.PERMISSION_READ, '',function(filename){ + window.location=OC.linkTo('files', 'index.php')+'?dir='+encodeURIComponent($('#dir').val()).replace(/%2F/g, '/')+'/'+encodeURIComponent(filename); + }); + FileActions.setDefault('application/x-compressed','Open'); + FileActions.register('application/x-compressed','Open', OC.PERMISSION_READ, '',function(filename){ + window.location=OC.linkTo('files', 'index.php')+'?dir='+encodeURIComponent($('#dir').val()).replace(/%2F/g, '/')+'/'+encodeURIComponent(filename); + }); + FileActions.setDefault('application/x-compressed','Open'); + FileActions.register('application/x-tar','Open', OC.PERMISSION_READ, '',function(filename){ + window.location=OC.linkTo('files', 'index.php')+'?dir='+encodeURIComponent($('#dir').val()).replace(/%2F/g, '/')+'/'+encodeURIComponent(filename); + }); + FileActions.setDefault('application/x-tar','Open'); + } } }); |