diff options
author | Robin Appelman <icewind@owncloud.com> | 2012-11-15 00:37:54 +0100 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2012-11-15 00:37:54 +0100 |
commit | bf2ac9f113d41dc944f42d1516649a3a72e88a65 (patch) | |
tree | 36e0c3b8a6327321122fc8a63b7aa23d1ee0f789 /apps/files_sharing | |
parent | 41a61bc637c3d60efc5abe81c39fc726fd78cd1d (diff) | |
parent | a418a3ba65d0097047cfcad1b4ee82185c42d22a (diff) | |
download | nextcloud-server-bf2ac9f113d41dc944f42d1516649a3a72e88a65.tar.gz nextcloud-server-bf2ac9f113d41dc944f42d1516649a3a72e88a65.zip |
merge master into filesystem
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 69c526eae0f..1d22b32b503 100644 --- a/apps/files_sharing/appinfo/update.php +++ b/apps/files_sharing/appinfo/update.php @@ -21,11 +21,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 eeb12aa5749..5abdbf29f03 100644 --- a/apps/files_sharing/lib/sharedstorage.php +++ b/apps/files_sharing/lib/sharedstorage.php @@ -191,7 +191,7 @@ class Shared extends \OC\Files\Storage\Common { if ($path == '') { return false; } - return ($this->getPermissions($path) & \OCP\Share::PERMISSION_CREATE); + return ($this->getPermissions($path) & OCP\PERMISSION_CREATE); } public function isReadable($path) { @@ -202,21 +202,21 @@ class Shared extends \OC\Files\Storage\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 75374223656..edb8e011459 100644 --- a/apps/files_sharing/public.php +++ b/apps/files_sharing/public.php @@ -150,7 +150,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 |