summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/lib
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@gmx.de>2014-11-25 16:28:41 +0100
committerJoas Schilling <nickvergessen@gmx.de>2014-11-25 16:30:21 +0100
commit2c39aec8cb8ce7f74c8edd1111e7f7b6a70cf7c5 (patch)
tree340a259839e2ce8260115d7aeae3798d91cb7768 /apps/files_sharing/lib
parent711912a7b3f48065b220a909e8889aba5a93d105 (diff)
downloadnextcloud-server-2c39aec8cb8ce7f74c8edd1111e7f7b6a70cf7c5.tar.gz
nextcloud-server-2c39aec8cb8ce7f74c8edd1111e7f7b6a70cf7c5.zip
Replace deprecated constant with new class constant
Diffstat (limited to 'apps/files_sharing/lib')
-rw-r--r--apps/files_sharing/lib/controllers/sharecontroller.php2
-rw-r--r--apps/files_sharing/lib/readonlycache.php4
-rw-r--r--apps/files_sharing/lib/readonlywrapper.php2
-rw-r--r--apps/files_sharing/lib/sharedstorage.php14
4 files changed, 11 insertions, 11 deletions
diff --git a/apps/files_sharing/lib/controllers/sharecontroller.php b/apps/files_sharing/lib/controllers/sharecontroller.php
index 076df3c46f6..ac92b5a3c13 100644
--- a/apps/files_sharing/lib/controllers/sharecontroller.php
+++ b/apps/files_sharing/lib/controllers/sharecontroller.php
@@ -182,7 +182,7 @@ class ShareController extends Controller {
$folder = new Template('files', 'list', '');
$folder->assign('dir', $getPath);
$folder->assign('dirToken', $linkItem['token']);
- $folder->assign('permissions', OCP\PERMISSION_READ);
+ $folder->assign('permissions', \OCP\Constants::PERMISSION_READ);
$folder->assign('isPublic', true);
$folder->assign('publicUploadEnabled', 'no');
$folder->assign('files', $files);
diff --git a/apps/files_sharing/lib/readonlycache.php b/apps/files_sharing/lib/readonlycache.php
index f129ca49433..6dd3b9cf61d 100644
--- a/apps/files_sharing/lib/readonlycache.php
+++ b/apps/files_sharing/lib/readonlycache.php
@@ -13,14 +13,14 @@ use OC\Files\Cache\Cache;
class ReadOnlyCache extends Cache {
public function get($path) {
$data = parent::get($path);
- $data['permissions'] &= (\OCP\PERMISSION_READ | \OCP\PERMISSION_SHARE);
+ $data['permissions'] &= (\OCP\Constants::PERMISSION_READ | \OCP\Constants::PERMISSION_SHARE);
return $data;
}
public function getFolderContents($path) {
$content = parent::getFolderContents($path);
foreach ($content as &$data) {
- $data['permissions'] &= (\OCP\PERMISSION_READ | \OCP\PERMISSION_SHARE);
+ $data['permissions'] &= (\OCP\Constants::PERMISSION_READ | \OCP\Constants::PERMISSION_SHARE);
}
return $content;
}
diff --git a/apps/files_sharing/lib/readonlywrapper.php b/apps/files_sharing/lib/readonlywrapper.php
index 45ed3fd68bb..58a5695aff8 100644
--- a/apps/files_sharing/lib/readonlywrapper.php
+++ b/apps/files_sharing/lib/readonlywrapper.php
@@ -24,7 +24,7 @@ class ReadOnlyWrapper extends Wrapper {
}
public function getPermissions($path) {
- return $this->storage->getPermissions($path) & (\OCP\PERMISSION_READ | \OCP\PERMISSION_SHARE);
+ return $this->storage->getPermissions($path) & (\OCP\Constants::PERMISSION_READ | \OCP\Constants::PERMISSION_SHARE);
}
public function rename($path1, $path2) {
diff --git a/apps/files_sharing/lib/sharedstorage.php b/apps/files_sharing/lib/sharedstorage.php
index 19ee6085e47..1ac57053e25 100644
--- a/apps/files_sharing/lib/sharedstorage.php
+++ b/apps/files_sharing/lib/sharedstorage.php
@@ -67,7 +67,7 @@ class Shared extends \OC\Files\Storage\Common implements ISharedStorage {
if ($source) {
$source['path'] .= '.part';
// All partial files have delete permission
- $source['permissions'] |= \OCP\PERMISSION_DELETE;
+ $source['permissions'] |= \OCP\Constants::PERMISSION_DELETE;
}
} else {
$source = \OC_Share_Backend_File::getSource($target, $this->getMountPoint(), $this->getItemType());
@@ -109,11 +109,11 @@ class Shared extends \OC\Files\Storage\Common implements ISharedStorage {
$permissions = $this->share['permissions'];
// part files and the mount point always have delete permissions
if ($target === '' || pathinfo($target, PATHINFO_EXTENSION) === 'part') {
- $permissions |= \OCP\PERMISSION_DELETE;
+ $permissions |= \OCP\Constants::PERMISSION_DELETE;
}
if (\OC_Util::isSharingDisabledForUser()) {
- $permissions &= ~\OCP\PERMISSION_SHARE;
+ $permissions &= ~\OCP\Constants::PERMISSION_SHARE;
}
return $permissions;
@@ -197,7 +197,7 @@ class Shared extends \OC\Files\Storage\Common implements ISharedStorage {
}
public function isCreatable($path) {
- return ($this->getPermissions($path) & \OCP\PERMISSION_CREATE);
+ return ($this->getPermissions($path) & \OCP\Constants::PERMISSION_CREATE);
}
public function isReadable($path) {
@@ -205,18 +205,18 @@ class Shared extends \OC\Files\Storage\Common implements ISharedStorage {
}
public function isUpdatable($path) {
- return ($this->getPermissions($path) & \OCP\PERMISSION_UPDATE);
+ return ($this->getPermissions($path) & \OCP\Constants::PERMISSION_UPDATE);
}
public function isDeletable($path) {
- return ($this->getPermissions($path) & \OCP\PERMISSION_DELETE);
+ return ($this->getPermissions($path) & \OCP\Constants::PERMISSION_DELETE);
}
public function isSharable($path) {
if (\OCP\Util::isSharingDisabledForUser()) {
return false;
}
- return ($this->getPermissions($path) & \OCP\PERMISSION_SHARE);
+ return ($this->getPermissions($path) & \OCP\Constants::PERMISSION_SHARE);
}
public function file_exists($path) {