diff options
Diffstat (limited to 'apps')
-rw-r--r-- | apps/files/index.php | 8 | ||||
-rw-r--r-- | apps/files/templates/index.php | 2 | ||||
-rw-r--r-- | apps/files_sharing/appinfo/update.php | 6 | ||||
-rw-r--r-- | apps/files_sharing/lib/share/file.php | 6 | ||||
-rw-r--r-- | apps/files_sharing/lib/share/folder.php | 2 | ||||
-rw-r--r-- | apps/files_sharing/lib/sharedstorage.php | 8 | ||||
-rw-r--r-- | apps/files_sharing/public.php | 2 |
7 files changed, 17 insertions, 17 deletions
diff --git a/apps/files/index.php b/apps/files/index.php index c46ec59d03c..74332a439f6 100644 --- a/apps/files/index.php +++ b/apps/files/index.php @@ -89,15 +89,15 @@ $freeSpace=OC_Filesystem::free_space($dir); $freeSpace=max($freeSpace, 0); $maxUploadFilesize = min($maxUploadFilesize, $freeSpace); -$permissions = OCP\Share::PERMISSION_READ; +$permissions = OCP\PERMISSION_READ; if (OC_Filesystem::isUpdatable($dir.'/')) { - $permissions |= OCP\Share::PERMISSION_UPDATE; + $permissions |= OCP\PERMISSION_UPDATE; } if (OC_Filesystem::isDeletable($dir.'/')) { - $permissions |= OCP\Share::PERMISSION_DELETE; + $permissions |= OCP\PERMISSION_DELETE; } if (OC_Filesystem::isSharable($dir.'/')) { - $permissions |= OCP\Share::PERMISSION_SHARE; + $permissions |= OCP\PERMISSION_SHARE; } $tmpl = new OCP\Template( 'files', 'index', 'user' ); diff --git a/apps/files/templates/index.php b/apps/files/templates/index.php index e2640c1113c..725390d4505 100644 --- a/apps/files/templates/index.php +++ b/apps/files/templates/index.php @@ -58,7 +58,7 @@ <th id="headerSize"><?php echo $l->t( 'Size' ); ?></th> <th id="headerDate"> <span id="modified"><?php echo $l->t( 'Modified' ); ?></span> - <?php if ($_['permissions'] & OCP\Share::PERMISSION_DELETE): ?> + <?php if ($_['permissions'] & OCP\PERMISSION_DELETE): ?> <!-- NOTE: Temporary fix to allow unsharing of files in root of Shared folder --> <?php if ($_['dir'] == '/Shared'): ?> <span class="selectedActions"><a href="" class="delete"><?php echo $l->t('Unshare')?> <img class="svg" alt="<?php echo $l->t('Unshare')?>" src="<?php echo OCP\image_path("core", "actions/delete.svg"); ?>" /></a></span> diff --git a/apps/files_sharing/appinfo/update.php b/apps/files_sharing/appinfo/update.php index e75c538b150..e998626f4a4 100644 --- a/apps/files_sharing/appinfo/update.php +++ b/apps/files_sharing/appinfo/update.php @@ -19,11 +19,11 @@ if (version_compare($installedVersion, '0.3', '<')) { $itemType = 'file'; } if ($row['permissions'] == 0) { - $permissions = OCP\Share::PERMISSION_READ | OCP\Share::PERMISSION_SHARE; + $permissions = OCP\PERMISSION_READ | OCP\PERMISSION_SHARE; } else { - $permissions = OCP\Share::PERMISSION_READ | OCP\Share::PERMISSION_UPDATE | OCP\Share::PERMISSION_SHARE; + $permissions = OCP\PERMISSION_READ | OCP\PERMISSION_UPDATE | OCP\PERMISSION_SHARE; if ($itemType == 'folder') { - $permissions |= OCP\Share::PERMISSION_CREATE; + $permissions |= OCP\PERMISSION_CREATE; } } $pos = strrpos($row['uid_shared_with'], '@'); diff --git a/apps/files_sharing/lib/share/file.php b/apps/files_sharing/lib/share/file.php index 9a880505926..ac585236831 100644 --- a/apps/files_sharing/lib/share/file.php +++ b/apps/files_sharing/lib/share/file.php @@ -97,10 +97,10 @@ class OC_Share_Backend_File implements OCP\Share_Backend_File_Dependent { $file['permissions'] = $item['permissions']; if ($file['type'] == 'file') { // Remove Create permission if type is file - $file['permissions'] &= ~OCP\Share::PERMISSION_CREATE; + $file['permissions'] &= ~OCP\PERMISSION_CREATE; } // NOTE: Temporary fix to allow unsharing of files in root of Shared directory - $file['permissions'] |= OCP\Share::PERMISSION_DELETE; + $file['permissions'] |= OCP\PERMISSION_DELETE; $files[] = $file; } return $files; @@ -113,7 +113,7 @@ class OC_Share_Backend_File implements OCP\Share_Backend_File_Dependent { } $size += $item['size']; } - return array(0 => array('id' => -1, 'name' => 'Shared', 'mtime' => $mtime, 'mimetype' => 'httpd/unix-directory', 'size' => $size, 'writable' => false, 'type' => 'dir', 'directory' => '', 'permissions' => OCP\Share::PERMISSION_READ)); + return array(0 => array('id' => -1, 'name' => 'Shared', 'mtime' => $mtime, 'mimetype' => 'httpd/unix-directory', 'size' => $size, 'writable' => false, 'type' => 'dir', 'directory' => '', 'permissions' => OCP\PERMISSION_READ)); } else if ($format == self::FORMAT_OPENDIR) { $files = array(); foreach ($items as $item) { diff --git a/apps/files_sharing/lib/share/folder.php b/apps/files_sharing/lib/share/folder.php index bddda99f8bb..d414fcf10fc 100644 --- a/apps/files_sharing/lib/share/folder.php +++ b/apps/files_sharing/lib/share/folder.php @@ -41,7 +41,7 @@ class OC_Share_Backend_Folder extends OC_Share_Backend_File implements OCP\Share $file['permissions'] = $folder['permissions']; if ($file['type'] == 'file') { // Remove Create permission if type is file - $file['permissions'] &= ~OCP\Share::PERMISSION_CREATE; + $file['permissions'] &= ~OCP\PERMISSION_CREATE; } } return $files; diff --git a/apps/files_sharing/lib/sharedstorage.php b/apps/files_sharing/lib/sharedstorage.php index ac6fb1f683e..50db9166fe7 100644 --- a/apps/files_sharing/lib/sharedstorage.php +++ b/apps/files_sharing/lib/sharedstorage.php @@ -201,7 +201,7 @@ class OC_Filestorage_Shared extends OC_Filestorage_Common { if ($path == '') { return false; } - return ($this->getPermissions($path) & OCP\Share::PERMISSION_CREATE); + return ($this->getPermissions($path) & OCP\PERMISSION_CREATE); } public function isReadable($path) { @@ -212,21 +212,21 @@ class OC_Filestorage_Shared extends OC_Filestorage_Common { if ($path == '') { return false; } - return ($this->getPermissions($path) & OCP\Share::PERMISSION_UPDATE); + return ($this->getPermissions($path) & OCP\PERMISSION_UPDATE); } public function isDeletable($path) { if ($path == '') { return true; } - return ($this->getPermissions($path) & OCP\Share::PERMISSION_DELETE); + return ($this->getPermissions($path) & OCP\PERMISSION_DELETE); } public function isSharable($path) { if ($path == '') { return false; } - return ($this->getPermissions($path) & OCP\Share::PERMISSION_SHARE); + return ($this->getPermissions($path) & OCP\PERMISSION_SHARE); } public function file_exists($path) { diff --git a/apps/files_sharing/public.php b/apps/files_sharing/public.php index 598172aa855..1fc41b42756 100644 --- a/apps/files_sharing/public.php +++ b/apps/files_sharing/public.php @@ -147,7 +147,7 @@ if (isset($_GET['file']) || isset($_GET['dir'])) { if ($i['directory'] == '/') { $i['directory'] = ''; } - $i['permissions'] = OCP\Share::PERMISSION_READ; + $i['permissions'] = OCP\PERMISSION_READ; $files[] = $i; } // Make breadcrumb |