Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Nextcloud
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Monitor
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TeDomum
Nextcloud
Commits
42897ac5
Commit
42897ac5
authored
9 years ago
by
Thomas Müller
Browse files
Options
Downloads
Plain Diff
Merge pull request #21402 from owncloud/view-getuserobject-cache
Cache usermanager instance in view
parents
45c41e2b
2d9d0aed
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/private/files/view.php
+4
-1
4 additions, 1 deletion
lib/private/files/view.php
with
4 additions
and
1 deletion
lib/private/files/view.php
+
4
−
1
View file @
42897ac5
...
@@ -86,6 +86,8 @@ class View {
...
@@ -86,6 +86,8 @@ class View {
private
$updaterEnabled
=
true
;
private
$updaterEnabled
=
true
;
private
$userManager
;
/**
/**
* @param string $root
* @param string $root
* @throws \Exception If $root contains an invalid path
* @throws \Exception If $root contains an invalid path
...
@@ -101,6 +103,7 @@ class View {
...
@@ -101,6 +103,7 @@ class View {
$this
->
fakeRoot
=
$root
;
$this
->
fakeRoot
=
$root
;
$this
->
lockingProvider
=
\OC
::
$server
->
getLockingProvider
();
$this
->
lockingProvider
=
\OC
::
$server
->
getLockingProvider
();
$this
->
lockingEnabled
=
!
(
$this
->
lockingProvider
instanceof
\OC\Lock\NoopLockingProvider
);
$this
->
lockingEnabled
=
!
(
$this
->
lockingProvider
instanceof
\OC\Lock\NoopLockingProvider
);
$this
->
userManager
=
\OC
::
$server
->
getUserManager
();
}
}
public
function
getAbsolutePath
(
$path
=
'/'
)
{
public
function
getAbsolutePath
(
$path
=
'/'
)
{
...
@@ -1196,7 +1199,7 @@ class View {
...
@@ -1196,7 +1199,7 @@ class View {
* @return \OC\User\User
* @return \OC\User\User
*/
*/
private
function
getUserObjectForOwner
(
$ownerId
)
{
private
function
getUserObjectForOwner
(
$ownerId
)
{
$owner
=
\OC
::
$server
->
getU
serManager
()
->
get
(
$ownerId
);
$owner
=
$this
->
u
serManager
->
get
(
$ownerId
);
if
(
$owner
instanceof
IUser
)
{
if
(
$owner
instanceof
IUser
)
{
return
$owner
;
return
$owner
;
}
else
{
}
else
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment