diff --git a/apps/files/js/fileactions.js b/apps/files/js/fileactions.js
index 89e7bdd7ad7..f587e99f966 100644
--- a/apps/files/js/fileactions.js
+++ b/apps/files/js/fileactions.js
@@ -156,12 +156,12 @@ $(document).ready(function(){
} else {
var downloadScope = 'file';
}
- FileActions.register(downloadScope,'Download', FileActions.PERMISSION_READ, function(){return OC.imagePath('core','actions/download')},function(filename){
+ FileActions.register(downloadScope,'Download', OC.PERMISSION_READ, function(){return OC.imagePath('core','actions/download')},function(filename){
window.location=OC.filePath('files', 'ajax', 'download.php') + encodeURIComponent('?files='+encodeURIComponent(filename)+'&dir='+encodeURIComponent($('#dir').val()));
});
});
-FileActions.register('all','Delete', FileActions.PERMISSION_DELETE, function(){return OC.imagePath('core','actions/delete')},function(filename){
+FileActions.register('all','Delete', OC.PERMISSION_DELETE, function(){return OC.imagePath('core','actions/delete')},function(filename){
if(Files.cancelUpload(filename)) {
if(filename.substr){
filename=[filename];
@@ -179,11 +179,11 @@ FileActions.register('all','Delete', FileActions.PERMISSION_DELETE, function(){r
$('.tipsy').remove();
});
-FileActions.register('all','Rename', FileActions.PERMISSION_UPDATE, function(){return OC.imagePath('core','actions/rename')},function(filename){
+FileActions.register('all','Rename', OC.PERMISSION_UPDATE, function(){return OC.imagePath('core','actions/rename')},function(filename){
FileList.rename(filename);
});
-FileActions.register('dir','Open', FileActions.PERMISSION_READ, '', function(filename){
+FileActions.register('dir','Open', OC.PERMISSION_READ, '', function(filename){
window.location=OC.linkTo('files', 'index.php') + '&dir='+encodeURIComponent($('#dir').val()).replace(/%2F/g, '/')+'/'+encodeURIComponent(filename);
});
diff --git a/apps/files_sharing/js/public.js b/apps/files_sharing/js/public.js
index 1ab61d476ec..92b626bba18 100644
--- a/apps/files_sharing/js/public.js
+++ b/apps/files_sharing/js/public.js
@@ -10,7 +10,7 @@ $(document).ready(function() {
// Show file preview if previewer is available, images are already handled by the template
if (mimetype.substr(0, mimetype.indexOf('/')) != 'image') {
// Trigger default action if not download TODO
- var action = FileActions.getDefault(mimetype, 'file', FileActions.PERMISSION_READ);
+ var action = FileActions.getDefault(mimetype, 'file', OC.PERMISSION_READ);
if (typeof action === 'undefined') {
$('#noPreview').show();
} else {
diff --git a/apps/files_sharing/js/share.js b/apps/files_sharing/js/share.js
index 79ab4adebac..a171751589a 100644
--- a/apps/files_sharing/js/share.js
+++ b/apps/files_sharing/js/share.js
@@ -2,7 +2,7 @@ $(document).ready(function() {
if (typeof OC.Share !== 'undefined' && typeof FileActions !== 'undefined') {
OC.Share.loadIcons('file');
- FileActions.register('all', 'Share', FileActions.PERMISSION_READ, function(filename) {
+ FileActions.register('all', 'Share', OC.PERMISSION_READ, function(filename) {
// Return the correct sharing icon
if (scanFiles.scanning) { return; } // workaround to prevent additional http request block scanning feedback
if ($('#dir').val() == '/') {
diff --git a/apps/files_versions/js/versions.js b/apps/files_versions/js/versions.js
index e34a6f50cac..a9cf6171e45 100644
--- a/apps/files_versions/js/versions.js
+++ b/apps/files_versions/js/versions.js
@@ -11,7 +11,7 @@ $(document).ready(function() {
$(document).ready(function(){
if (typeof FileActions !== 'undefined') {
// Add history button to files/index.php
- FileActions.register('file','History', FileActions.PERMISSION_UPDATE, function(){return OC.imagePath('core','actions/history')},function(filename){
+ FileActions.register('file','History', OC.PERMISSION_UPDATE, function(){return OC.imagePath('core','actions/history')},function(filename){
if (scanFiles.scanning){return;}//workaround to prevent additional http request block scanning feedback
diff --git a/core/js/share.js b/core/js/share.js
index 8bfbdd36e19..f8ff6907329 100644
--- a/core/js/share.js
+++ b/core/js/share.js
@@ -129,7 +129,7 @@ OC.Share={
}
html += '
';
}
- if (possiblePermissions & OC.Share.PERMISSION_SHARE) {
+ if (possiblePermissions & OC.PERMISSION_SHARE) {
html += '';
html += '