From: Björn Schießle Date: Thu, 10 Jan 2013 09:36:55 +0000 (+0100) Subject: add complete size of versions to array X-Git-Tag: v5.0.0alpha1~251^2~5 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=417498d519e0a901ad65ad960529a593f0f2aa11;p=nextcloud-server.git add complete size of versions to array --- diff --git a/apps/files_versions/lib/versions.php b/apps/files_versions/lib/versions.php index e890715b5a5..58e4a2ce132 100644 --- a/apps/files_versions/lib/versions.php +++ b/apps/files_versions/lib/versions.php @@ -245,10 +245,12 @@ class Storage { $result = array(); $file_count = array(); + $size_full = 0; foreach( $versions as $key => $value ) { $i++; $size = $versions_fileview->filesize($value['path']); + $size_full = $size_full + $size; $filename = substr($value['path'], 0, -strlen($value['timestamp'])-2); $result['all'][$i]['version'] = $value['timestamp']; @@ -269,6 +271,8 @@ class Storage { } + $result['size'] = $size_full; + return $result; } }