diff options
Diffstat (limited to 'apps/files_versions/ajax/getVersions.php')
-rw-r--r-- | apps/files_versions/ajax/getVersions.php | 11 |
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); |