Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
our_own_cloud_project
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
die_coolen_jungs
our_own_cloud_project
Commits
cd2421c7
Commit
cd2421c7
authored
11 years ago
by
Thomas Müller
Browse files
Options
Downloads
Patches
Plain Diff
adding PHPDoc comments to getBackend
ensure getChildren() is called on an instance of Share_Backend_Collection
parent
6aeb0a99
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
apps/files_sharing/lib/cache.php
+10
-5
10 additions, 5 deletions
apps/files_sharing/lib/cache.php
lib/public/share.php
+2
-2
2 additions, 2 deletions
lib/public/share.php
with
12 additions
and
7 deletions
apps/files_sharing/lib/cache.php
+
10
−
5
View file @
cd2421c7
...
...
@@ -20,6 +20,7 @@
*/
namespace
OC\Files\Cache
;
use
OCP\Share_Backend_Collection
;
/**
* Metadata cache for shared files
...
...
@@ -320,13 +321,17 @@ class Shared_Cache extends Cache {
public
function
getAll
()
{
$ids
=
\OCP\Share
::
getItemsSharedWith
(
'file'
,
\OC_Share_Backend_File
::
FORMAT_GET_ALL
);
$folderBackend
=
\OCP\Share
::
getBackend
(
'folder'
);
foreach
(
$ids
as
$file
)
{
$children
=
$folderBackend
->
getChildren
(
$file
);
foreach
(
$children
as
$child
)
{
$ids
[]
=
(
int
)
$child
[
'source'
];
if
(
$folderBackend
instanceof
Share_Backend_Collection
)
{
foreach
(
$ids
as
$file
)
{
/** @var $folderBackend Share_Backend_Collection */
$children
=
$folderBackend
->
getChildren
(
$file
);
foreach
(
$children
as
$child
)
{
$ids
[]
=
(
int
)
$child
[
'source'
];
}
}
}
return
$ids
;
}
...
...
This diff is collapsed.
Click to expand it.
lib/public/share.php
+
2
−
2
View file @
cd2421c7
...
...
@@ -745,8 +745,8 @@ class Share {
/**
* @brief Get the backend class for the specified item type
* @param string
I
tem
t
ype
* @return Shar
ing b
ackend
object
* @param string
$i
tem
T
ype
* @return Shar
e_B
ackend
*/
public
static
function
getBackend
(
$itemType
)
{
if
(
isset
(
self
::
$backends
[
$itemType
]))
{
...
...
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