Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
die_coolen_jungs
our_own_cloud_project
Commits
1757d016
Commit
1757d016
authored
Mar 11, 2015
by
Thomas Müller
Browse files
Merge pull request #14640 from owncloud/rescanversionsonlyonce
Only rescan versions once in trashbin
parents
9a9633f8
7432c73f
Changes
1
Hide whitespace changes
Inline
Side-by-side
apps/files_trashbin/lib/trashbin.php
View file @
1757d016
...
...
@@ -32,6 +32,13 @@ class Trashbin {
// unit: percentage; 50% of available disk space/quota
const
DEFAULTMAXSIZE
=
50
;
/**
* Whether versions have already be rescanned during this PHP request
*
* @var bool
*/
private
static
$scannedVersions
=
false
;
public
static
function
getUidAndFilename
(
$filename
)
{
$uid
=
\
OC\Files\Filesystem
::
getOwner
(
$filename
);
\
OC\Files\Filesystem
::
initMountPoints
(
$uid
);
...
...
@@ -825,9 +832,12 @@ class Trashbin {
$versions
=
array
();
//force rescan of versions, local storage may not have updated the cache
/** @var \OC\Files\Storage\Storage $storage */
list
(
$storage
,
)
=
$view
->
resolvePath
(
'/'
);
$storage
->
getScanner
()
->
scan
(
'files_trashbin'
);
if
(
!
self
::
$scannedVersions
)
{
/** @var \OC\Files\Storage\Storage $storage */
list
(
$storage
,
)
=
$view
->
resolvePath
(
'/'
);
$storage
->
getScanner
()
->
scan
(
'files_trashbin/versions'
);
self
::
$scannedVersions
=
true
;
}
if
(
$timestamp
)
{
// fetch for old versions
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment