diff options
author | Thomas Tanghus <thomas@tanghus.net> | 2012-11-11 19:58:54 +0100 |
---|---|---|
committer | Thomas Tanghus <thomas@tanghus.net> | 2012-11-11 23:10:23 +0100 |
commit | 56239df2e7095d234a07240f22be368b41fbb9b6 (patch) | |
tree | c4f301ad0acf8af46bed441eddc1350d245e5122 /apps/files_sharing | |
parent | 7f0c69eb0ed2c4074aedb73d16eb675c08042354 (diff) | |
download | nextcloud-server-56239df2e7095d234a07240f22be368b41fbb9b6.tar.gz nextcloud-server-56239df2e7095d234a07240f22be368b41fbb9b6.zip |
Update all to use OCP\PERMISSION_* instead of OCP\Share::PERMISSION_*
Diffstat (limited to 'apps/files_sharing')
-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 |
5 files changed, 12 insertions, 12 deletions
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 |