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
27efdbd5
Commit
27efdbd5
authored
12 years ago
by
Bart Visscher
Browse files
Options
Downloads
Patches
Plain Diff
Use setter for FileinfoCache
parent
f06c08a6
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
lib/connector/sabre/directory.php
+4
-6
4 additions, 6 deletions
lib/connector/sabre/directory.php
lib/connector/sabre/node.php
+7
-5
7 additions, 5 deletions
lib/connector/sabre/node.php
with
11 additions
and
11 deletions
lib/connector/sabre/directory.php
+
4
−
6
View file @
27efdbd5
...
@@ -69,15 +69,13 @@ class OC_Connector_Sabre_Directory extends OC_Connector_Sabre_Node implements Sa
...
@@ -69,15 +69,13 @@ class OC_Connector_Sabre_Directory extends OC_Connector_Sabre_Node implements Sa
if
(
!
$info
)
throw
new
Sabre_DAV_Exception_NotFound
(
'File with name '
.
$path
.
' could not be located'
);
if
(
!
$info
)
throw
new
Sabre_DAV_Exception_NotFound
(
'File with name '
.
$path
.
' could not be located'
);
if
(
$info
[
'mimetype'
]
==
'httpd/unix-directory'
)
{
if
(
$info
[
'mimetype'
]
==
'httpd/unix-directory'
)
{
$node
=
new
OC_Connector_Sabre_Directory
(
$path
);
return
new
OC_Connector_Sabre_Directory
(
$path
,
$info
);
}
else
{
}
else
{
$node
=
new
OC_Connector_Sabre_File
(
$path
);
return
new
OC_Connector_Sabre_File
(
$path
,
$info
);
}
}
$node
->
setFileinfoCache
(
$info
);
return
$node
;
}
}
/**
/**
...
...
This diff is collapsed.
Click to expand it.
lib/connector/sabre/node.php
+
7
−
5
View file @
27efdbd5
...
@@ -41,11 +41,8 @@ abstract class OC_Connector_Sabre_Node implements Sabre_DAV_INode, Sabre_DAV_IPr
...
@@ -41,11 +41,8 @@ abstract class OC_Connector_Sabre_Node implements Sabre_DAV_INode, Sabre_DAV_IPr
* @param string $path
* @param string $path
* @return void
* @return void
*/
*/
public
function
__construct
(
$path
,
$fileinfo_cache
=
null
)
{
public
function
__construct
(
$path
)
{
$this
->
path
=
$path
;
$this
->
path
=
$path
;
if
(
$fileinfo_cache
)
{
$this
->
fileinfo_cache
=
$fileinfo_cache
;
}
}
}
...
@@ -85,8 +82,13 @@ abstract class OC_Connector_Sabre_Node implements Sabre_DAV_INode, Sabre_DAV_IPr
...
@@ -85,8 +82,13 @@ abstract class OC_Connector_Sabre_Node implements Sabre_DAV_INode, Sabre_DAV_IPr
}
}
public
function
setFileinfoCache
(
$fileinfo_cache
)
{
$this
->
fileinfo_cache
=
$fileinfo_cache
;
}
/**
/**
*
Set the stat cache
*
Make sure the fileinfo cache is filled. Uses OC_FileCache or a direct stat
*/
*/
protected
function
getFileinfoCache
()
{
protected
function
getFileinfoCache
()
{
if
(
!
isset
(
$this
->
fileinfo_cache
))
{
if
(
!
isset
(
$this
->
fileinfo_cache
))
{
...
...
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