Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjoern Schiessle <schiessle@owncloud.com>2014-01-21 20:49:56 +0400
committerBjoern Schiessle <schiessle@owncloud.com>2014-01-21 20:49:56 +0400
commit603828366f1ea990fc359cc9f5f08007ed41ffbb (patch)
tree7309d7687ebd66c24783928d9d69b3dce2d9cfeb /apps/files_versions
parent180bb9fa9f65061d1cc074ec1b749651d3c567b5 (diff)
selective backport of the bug fixes from pr #6863
Diffstat (limited to 'apps/files_versions')
-rw-r--r--apps/files_versions/lib/versions.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/apps/files_versions/lib/versions.php b/apps/files_versions/lib/versions.php
index 01c2e1ccdee..c2435b9cd65 100644
--- a/apps/files_versions/lib/versions.php
+++ b/apps/files_versions/lib/versions.php
@@ -543,15 +543,16 @@ class Storage {
foreach ($versions as $key => $version) {
$newInterval = true;
while ($newInterval) {
- if ($nextInterval == -1 || $version['version'] >= $nextInterval) {
+ if ($nextInterval == -1 || $prevTimestamp > $nextInterval) {
if ($version['version'] > $nextVersion) {
//distance between two version too small, delete version
- $versionsFileview->unlink($version['path'] . '.v' . $version['version']);
\OC_Hook::emit('\OCP\Versions', 'delete', array('path' => $version['path'] . '.v' . $version['version']));
+ $versionsFileview->unlink($version['path'] . '.v' . $version['version']);
$size += $version['size'];
unset($allVersions[$key]); // update array with all versions
} else {
$nextVersion = $version['version'] - $step;
+ $prevTimestamp = $version['version'];
}
$newInterval = false; // version checked so we can move to the next one
} else { // time to move on to the next interval
@@ -566,7 +567,6 @@ class Storage {
$newInterval = true; // we changed the interval -> check same version with new interval
}
}
- $prevTimestamp = $version['version'];
}
}
return $size;