aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/ajax
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/ajax
parent711912a7b3f48065b220a909e8889aba5a93d105 (diff)
downloadnextcloud-server-2c39aec8cb8ce7f74c8edd1111e7f7b6a70cf7c5.tar.gz
nextcloud-server-2c39aec8cb8ce7f74c8edd1111e7f7b6a70cf7c5.zip
Replace deprecated constant with new class constant
Diffstat (limited to 'apps/files_sharing/ajax')
-rw-r--r--apps/files_sharing/ajax/list.php4
-rw-r--r--apps/files_sharing/ajax/shareinfo.php2
2 files changed, 3 insertions, 3 deletions
diff --git a/apps/files_sharing/ajax/list.php b/apps/files_sharing/ajax/list.php
index 7e2e54a1bd9..073c86365be 100644
--- a/apps/files_sharing/ajax/list.php
+++ b/apps/files_sharing/ajax/list.php
@@ -65,7 +65,7 @@ $formattedFiles = array();
foreach ($files as $file) {
$entry = \OCA\Files\Helper::formatFileInfo($file);
unset($entry['directory']); // for now
- $entry['permissions'] = \OCP\PERMISSION_READ;
+ $entry['permissions'] = \OCP\Constants::PERMISSION_READ;
$formattedFiles[] = $entry;
}
@@ -78,7 +78,7 @@ $permissions = $linkItem['permissions'];
// if globally disabled
if (\OC::$server->getAppConfig()->getValue('core', 'shareapi_allow_public_upload', 'yes') === 'no') {
// only allow reading
- $permissions = \OCP\PERMISSION_READ;
+ $permissions = \OCP\Constants::PERMISSION_READ;
}
$data['permissions'] = $permissions;
diff --git a/apps/files_sharing/ajax/shareinfo.php b/apps/files_sharing/ajax/shareinfo.php
index e87b0779e8d..f196a67a9dd 100644
--- a/apps/files_sharing/ajax/shareinfo.php
+++ b/apps/files_sharing/ajax/shareinfo.php
@@ -31,7 +31,7 @@ $linkItem = $data['linkItem'];
// Load the files
$path = $data['realPath'];
-$isWritable = $linkItem['permissions'] & (\OCP\PERMISSION_UPDATE | \OCP\PERMISSION_CREATE);
+$isWritable = $linkItem['permissions'] & (\OCP\Constants::PERMISSION_UPDATE | \OCP\Constants::PERMISSION_CREATE);
if (!$isWritable) {
\OC\Files\Filesystem::addStorageWrapper('readonly', function ($mountPoint, $storage) {
return new \OCA\Files_Sharing\ReadOnlyWrapper(array('storage' => $storage));