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
fbf34f3b
Commit
fbf34f3b
authored
11 years ago
by
Björn Schießle
Browse files
Options
Downloads
Patches
Plain Diff
fix some var names according to our style guide
parent
2f0d88ca
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
apps/files_versions/lib/versions.php
+7
-7
7 additions, 7 deletions
apps/files_versions/lib/versions.php
with
7 additions
and
7 deletions
apps/files_versions/lib/versions.php
+
7
−
7
View file @
fbf34f3b
...
@@ -484,18 +484,18 @@ class Storage {
...
@@ -484,18 +484,18 @@ class Storage {
/**
/**
* @brief delete old version from a given list of versions
* @brief delete old version from a given list of versions
*
*
* @param array $versions
_by_f
ile list of versions ordered by files
* @param array $versions
ByF
ile list of versions ordered by files
* @param array $all
_
versions all versions accross multiple files
* @param array $all
V
versions all versions accross multiple files
* @param $versions
_f
ileview OC\Files\View on data/user/files_versions
* @param $versions
F
ileview OC\Files\View on data/user/files_versions
* @return size of releted versions
* @return size of releted versions
*/
*/
private
static
function
delOldVersions
(
$versions
_by_f
ile
,
&
$all
_v
ersions
,
$versions
_f
ileview
)
{
private
static
function
delOldVersions
(
$versions
ByF
ile
,
&
$all
V
ersions
,
$versions
F
ileview
)
{
$time
=
time
();
$time
=
time
();
$size
=
0
;
$size
=
0
;
// delete old versions for every given file
// delete old versions for every given file
foreach
(
$versions
_by_f
ile
as
$versions
)
{
foreach
(
$versions
ByF
ile
as
$versions
)
{
$versions
=
array_reverse
(
$versions
);
// newest version first
$versions
=
array_reverse
(
$versions
);
// newest version first
$interval
=
1
;
$interval
=
1
;
...
@@ -518,9 +518,9 @@ class Storage {
...
@@ -518,9 +518,9 @@ class Storage {
if
(
$nextInterval
==
-
1
||
$version
[
'version'
]
>=
$nextInterval
)
{
if
(
$nextInterval
==
-
1
||
$version
[
'version'
]
>=
$nextInterval
)
{
if
(
$version
[
'version'
]
>
$nextVersion
)
{
if
(
$version
[
'version'
]
>
$nextVersion
)
{
//distance between two version too small, delete version
//distance between two version too small, delete version
$versions
_f
ileview
->
unlink
(
$version
[
'path'
]
.
'.v'
.
$version
[
'version'
]);
$versions
F
ileview
->
unlink
(
$version
[
'path'
]
.
'.v'
.
$version
[
'version'
]);
$size
+=
$version
[
'size'
];
$size
+=
$version
[
'size'
];
unset
(
$all
_v
ersions
[
$key
]);
// update array with all versions
unset
(
$all
V
ersions
[
$key
]);
// update array with all versions
}
else
{
}
else
{
$nextVersion
=
$version
[
'version'
]
-
$step
;
$nextVersion
=
$version
[
'version'
]
-
$step
;
}
}
...
...
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