diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2016-02-18 16:45:40 +0100 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2016-02-18 16:45:40 +0100 |
commit | 2a9b0aaaa1249c47cd9cc9bfe7223a6b143ec3da (patch) | |
tree | cd76618d44fa792c21a9e5f12ef87c79cbb4304f | |
parent | d1ef43481d20ee10a05fcfb32a6349e150664a07 (diff) | |
parent | 6374472e2e1a85309085307d6d425a89f3442637 (diff) | |
download | nextcloud-server-2a9b0aaaa1249c47cd9cc9bfe7223a6b143ec3da.tar.gz nextcloud-server-2a9b0aaaa1249c47cd9cc9bfe7223a6b143ec3da.zip |
Merge pull request #22482 from owncloud/getowner-cache
cache result for getowner
-rw-r--r-- | lib/private/files/storage/common.php | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/private/files/storage/common.php b/lib/private/files/storage/common.php index 3d5898dcd80..edc570c967d 100644 --- a/lib/private/files/storage/common.php +++ b/lib/private/files/storage/common.php @@ -72,6 +72,7 @@ abstract class Common implements Storage, ILockingStorage { protected $updater; protected $mountOptions = []; + protected $owner = null; public function __construct($parameters) { } @@ -383,7 +384,11 @@ abstract class Common implements Storage, ILockingStorage { * @return string|false uid or false */ public function getOwner($path) { - return \OC_User::getUser(); + if ($this->owner === null) { + $this->owner = \OC_User::getUser(); + } + + return $this->owner; } /** |