summaryrefslogtreecommitdiffstats
path: root/apps/files_encryption/lib/helper.php
diff options
context:
space:
mode:
authorBjoern Schiessle <schiessle@owncloud.com>2013-11-27 11:46:24 +0100
committerBjoern Schiessle <schiessle@owncloud.com>2013-11-27 11:46:24 +0100
commit7f3b178d7340708ae6593e733552062a60de68d4 (patch)
tree7952196a1001b7a1a32959c0a274d7162614096d /apps/files_encryption/lib/helper.php
parent49038545f8d658b75865413444aebddedf178dec (diff)
downloadnextcloud-server-7f3b178d7340708ae6593e733552062a60de68d4.tar.gz
nextcloud-server-7f3b178d7340708ae6593e733552062a60de68d4.zip
some small changes according to the review comments
Diffstat (limited to 'apps/files_encryption/lib/helper.php')
-rwxr-xr-xapps/files_encryption/lib/helper.php11
1 files changed, 8 insertions, 3 deletions
diff --git a/apps/files_encryption/lib/helper.php b/apps/files_encryption/lib/helper.php
index a844fc6a398..998c78ec8be 100755
--- a/apps/files_encryption/lib/helper.php
+++ b/apps/files_encryption/lib/helper.php
@@ -225,7 +225,7 @@ class Helper {
* @return bool
*/
public static function isPublicAccess() {
- if (\OCP\USER::getUser() === false) {
+ if (\OCP\User::getUser() === false) {
return true;
} else {
return false;
@@ -252,6 +252,11 @@ class Helper {
return $relPath;
}
+ /**
+ * @brief try to get the user from the path if no user is logged in
+ * @param string $path
+ * @return mixed user or false if we couldn't determine a user
+ */
public static function getUser($path) {
$user = \OCP\User::getUser();
@@ -261,7 +266,7 @@ class Helper {
return $user;
}
- // if no user is logged in we try to access a publically shared files.
+ // if no user is logged in we try to access a publicly shared files.
// In this case we need to try to get the user from the path
$trimmed = ltrim($path, '/');
@@ -282,7 +287,7 @@ class Helper {
}
/**
- * @brief get path to the correspondig file in data/user/files if path points
+ * @brief get path to the corresponding file in data/user/files if path points
* to a version or to a file in cache
* @param string $path path to a version or a file in the trash
* @return string path to correspondig file relative to data/user/files