summaryrefslogtreecommitdiffstats
path: root/apps/files_versions/ajax/getVersions.php
diff options
context:
space:
mode:
authorSam Tuke <sam@donttravelempty.com>2012-04-26 18:45:17 +0100
committerSam Tuke <sam@donttravelempty.com>2012-04-26 18:45:17 +0100
commit18a024e251cbcdaafb0ef2893cd5cf8544b03f4d (patch)
tree9633209305aec012458c1a60e372b39f5e1230d8 /apps/files_versions/ajax/getVersions.php
parentc693ee2adb1b8b251d7905791eeca0946c31c68b (diff)
downloadnextcloud-server-18a024e251cbcdaafb0ef2893cd5cf8544b03f4d.tar.gz
nextcloud-server-18a024e251cbcdaafb0ef2893cd5cf8544b03f4d.zip
started implementing ajax file rollback
Diffstat (limited to 'apps/files_versions/ajax/getVersions.php')
-rw-r--r--apps/files_versions/ajax/getVersions.php11
1 files changed, 9 insertions, 2 deletions
diff --git a/apps/files_versions/ajax/getVersions.php b/apps/files_versions/ajax/getVersions.php
index fbe65146acc..32aac10b718 100644
--- a/apps/files_versions/ajax/getVersions.php
+++ b/apps/files_versions/ajax/getVersions.php
@@ -11,9 +11,16 @@ $source = strip_tags( $source );
if( OCA_Versions\Storage::isversioned( $source ) ) {
$count=5; //show the newest revisions
- $versions=OCA_Versions\Storage::getversions( $source, $count);
+ $versions = OCA_Versions\Storage::getversions( $source, $count);
+ $versionsFormatted = array();
+
+ foreach ( $versions AS $version ) {
+
+ $versionsFormatted[] = OC_Util::formatDate( $version );
+
+ }
- $versionsSorted = array_reverse( $versions );
+ $versionsSorted = array_reverse( $versionsFormatted );
if ( !empty( $versionsSorted ) ) {
OC_JSON::encodedPrint($versionsSorted);