diff options
author | Bjoern Schiessle <schiessle@owncloud.com> | 2014-01-22 11:13:15 +0100 |
---|---|---|
committer | Bjoern Schiessle <schiessle@owncloud.com> | 2014-01-22 11:13:15 +0100 |
commit | a567f74d868df0ad70be18265876169e296ce0d9 (patch) | |
tree | f4a85c9777dc1fcae464d97f12278441450bcb9d /apps/files_versions/lib | |
parent | 8d36ddcf0397facb43ae871ef0fba564e50c92bf (diff) | |
download | nextcloud-server-a567f74d868df0ad70be18265876169e296ce0d9.tar.gz nextcloud-server-a567f74d868df0ad70be18265876169e296ce0d9.zip |
fix array order
Diffstat (limited to 'apps/files_versions/lib')
-rw-r--r-- | apps/files_versions/lib/versions.php | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/apps/files_versions/lib/versions.php b/apps/files_versions/lib/versions.php index 3dd0c5985e6..328ed4305f4 100644 --- a/apps/files_versions/lib/versions.php +++ b/apps/files_versions/lib/versions.php @@ -264,7 +264,7 @@ class Storage { * @param string $uid user id from the owner of the file * @param string $filename file to find versions of, relative to the user files dir * @param string $userFullPath - * @returns array + * @returns array versions newest version first */ public static function getVersions($uid, $filename, $userFullPath = '') { $versions = array(); @@ -397,7 +397,8 @@ class Storage { } } - ksort($versions); + // newest version first + krsort($versions); $result = array(); @@ -428,8 +429,6 @@ class Storage { $size = 0; $toDelete = array(); // versions we want to delete - $versions = array_reverse($versions); // newest version first - $interval = 1; $step = Storage::$max_versions_per_interval[$interval]['step']; if (Storage::$max_versions_per_interval[$interval]['intervalEndsAfter'] == -1) { |