summaryrefslogtreecommitdiffstats
path: root/lib/public
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2014-11-26 08:31:23 +0100
committerMorris Jobke <hey@morrisjobke.de>2014-11-26 08:31:23 +0100
commitc5fa8f1bdc08b07d03fcc9f9c84033960ec4e20f (patch)
treeb2e989a445cf6afce925dea68765dc779dbc772a /lib/public
parent3766d98df6845397d810d583575c1fcedb51df90 (diff)
parent2c39aec8cb8ce7f74c8edd1111e7f7b6a70cf7c5 (diff)
downloadnextcloud-server-c5fa8f1bdc08b07d03fcc9f9c84033960ec4e20f.tar.gz
nextcloud-server-c5fa8f1bdc08b07d03fcc9f9c84033960ec4e20f.zip
Merge pull request #12421 from owncloud/issue/6101-remove-namespace-permission-constants
Issue/6101 remove namespace permission constants
Diffstat (limited to 'lib/public')
-rw-r--r--lib/public/constants.php28
-rw-r--r--lib/public/files/fileinfo.php12
-rw-r--r--lib/public/files/node.php10
-rw-r--r--lib/public/iavatar.php6
-rw-r--r--lib/public/template.php2
-rw-r--r--lib/public/util.php4
6 files changed, 42 insertions, 20 deletions
diff --git a/lib/public/constants.php b/lib/public/constants.php
index 350646a0ac0..78cafd11847 100644
--- a/lib/public/constants.php
+++ b/lib/public/constants.php
@@ -26,15 +26,37 @@
namespace OCP;
-/**
- * CRUDS permissions.
- */
+/** @deprecated Use \OCP\Constants::PERMISSION_CREATE instead */
const PERMISSION_CREATE = 4;
+
+/** @deprecated Use \OCP\Constants::PERMISSION_READ instead */
const PERMISSION_READ = 1;
+
+/** @deprecated Use \OCP\Constants::PERMISSION_UPDATE instead */
const PERMISSION_UPDATE = 2;
+
+/** @deprecated Use \OCP\Constants::PERMISSION_DELETE instead */
const PERMISSION_DELETE = 8;
+
+/** @deprecated Use \OCP\Constants::PERMISSION_SHARE instead */
const PERMISSION_SHARE = 16;
+
+/** @deprecated Use \OCP\Constants::PERMISSION_ALL instead */
const PERMISSION_ALL = 31;
+/** @deprecated Use \OCP\Constants::FILENAME_INVALID_CHARS instead */
const FILENAME_INVALID_CHARS = "\\/<>:\"|?*\n";
+class Constants {
+ /**
+ * CRUDS permissions.
+ */
+ const PERMISSION_CREATE = 4;
+ const PERMISSION_READ = 1;
+ const PERMISSION_UPDATE = 2;
+ const PERMISSION_DELETE = 8;
+ const PERMISSION_SHARE = 16;
+ const PERMISSION_ALL = 31;
+
+ const FILENAME_INVALID_CHARS = "\\/<>:\"|?*\n";
+}
diff --git a/lib/public/files/fileinfo.php b/lib/public/files/fileinfo.php
index ec81a541564..3a407ed67ca 100644
--- a/lib/public/files/fileinfo.php
+++ b/lib/public/files/fileinfo.php
@@ -103,12 +103,12 @@ interface FileInfo {
/**
* Get the permissions of the file or folder as bitmasked combination of the following constants
- * \OCP\PERMISSION_CREATE
- * \OCP\PERMISSION_READ
- * \OCP\PERMISSION_UPDATE
- * \OCP\PERMISSION_DELETE
- * \OCP\PERMISSION_SHARE
- * \OCP\PERMISSION_ALL
+ * \OCP\Constants::PERMISSION_CREATE
+ * \OCP\Constants::PERMISSION_READ
+ * \OCP\Constants::PERMISSION_UPDATE
+ * \OCP\Constants::PERMISSION_DELETE
+ * \OCP\Constants::PERMISSION_SHARE
+ * \OCP\Constants::PERMISSION_ALL
*
* @return int
*/
diff --git a/lib/public/files/node.php b/lib/public/files/node.php
index a380394095b..35c20b487c9 100644
--- a/lib/public/files/node.php
+++ b/lib/public/files/node.php
@@ -128,11 +128,11 @@ interface Node {
/**
* Get the permissions of the file or folder as a combination of one or more of the following constants:
- * - \OCP\PERMISSION_READ
- * - \OCP\PERMISSION_UPDATE
- * - \OCP\PERMISSION_CREATE
- * - \OCP\PERMISSION_DELETE
- * - \OCP\PERMISSION_SHARE
+ * - \OCP\Constants::PERMISSION_READ
+ * - \OCP\Constants::PERMISSION_UPDATE
+ * - \OCP\Constants::PERMISSION_CREATE
+ * - \OCP\Constants::PERMISSION_DELETE
+ * - \OCP\Constants::PERMISSION_SHARE
*
* @return int
*/
diff --git a/lib/public/iavatar.php b/lib/public/iavatar.php
index 1e80682c4f7..213d2e6cef5 100644
--- a/lib/public/iavatar.php
+++ b/lib/public/iavatar.php
@@ -23,9 +23,9 @@ interface IAvatar {
/**
* sets the users avatar
* @param Image $data mixed imagedata or path to set a new avatar
- * @throws Exception if the provided file is not a jpg or png image
- * @throws Exception if the provided image is not valid
- * @throws \OCP\NotSquareException if the image is not square
+ * @throws \Exception if the provided file is not a jpg or png image
+ * @throws \Exception if the provided image is not valid
+ * @throws \OC\NotSquareException if the image is not square
* @return void
*/
function set($data);
diff --git a/lib/public/template.php b/lib/public/template.php
index 2e265bb5e8e..a1b650649ff 100644
--- a/lib/public/template.php
+++ b/lib/public/template.php
@@ -88,7 +88,7 @@ function human_file_size( $bytes ) {
* Return the relative date in relation to today. Returns something like "last hour" or "two month ago"
* @param int $timestamp unix timestamp
* @param boolean $dateOnly
- * @return OC_L10N_String human readable interpretation of the timestamp
+ * @return \OC_L10N_String human readable interpretation of the timestamp
*/
function relative_modified_date( $timestamp, $dateOnly = false ) {
return(\relative_modified_date($timestamp, null, $dateOnly));
diff --git a/lib/public/util.php b/lib/public/util.php
index a87d26a4004..793a16c4d84 100644
--- a/lib/public/util.php
+++ b/lib/public/util.php
@@ -508,8 +508,8 @@ class Util {
/**
* Compare two strings to provide a natural sort
- * @param $a first string to compare
- * @param $b second string to compare
+ * @param string $a first string to compare
+ * @param string $b second string to compare
* @return -1 if $b comes before $a, 1 if $a comes before $b
* or 0 if the strings are identical
*/