aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_versions/ajax
diff options
context:
space:
mode:
authorBernhard Posselt <nukeawhale@gmail.com>2013-02-25 04:59:47 -0800
committerBernhard Posselt <nukeawhale@gmail.com>2013-02-25 04:59:47 -0800
commit3f48bebe924062cc01abc8c72019235a00f38b76 (patch)
tree1375e1deee04cf0847e7d7ea6d7212e08b8b0b9a /apps/files_versions/ajax
parent660670ec68bb4f4d4162e97e9a5cec90fd765118 (diff)
parent0a5457c5506730bf75a319b74a5bc97169da36d3 (diff)
downloadnextcloud-server-3f48bebe924062cc01abc8c72019235a00f38b76.tar.gz
nextcloud-server-3f48bebe924062cc01abc8c72019235a00f38b76.zip
Merge pull request #1827 from owncloud/fix_getVersions
fix getVersions(), we need to get the correct user and filename
Diffstat (limited to 'apps/files_versions/ajax')
-rw-r--r--apps/files_versions/ajax/getVersions.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/files_versions/ajax/getVersions.php b/apps/files_versions/ajax/getVersions.php
index 53fc04625c6..8a8fa43080c 100644
--- a/apps/files_versions/ajax/getVersions.php
+++ b/apps/files_versions/ajax/getVersions.php
@@ -1,11 +1,11 @@
<?php
OCP\JSON::checkAppEnabled('files_versions');
-$userDirectory = "/".OCP\USER::getUser()."/files";
$source = $_GET['source'];
+list ($uid, $filename) = OCA\Files_Versions\Storage::getUidAndFilename($source);
$count = 5; //show the newest revisions
-if( ($versions = OCA\Files_Versions\Storage::getVersions( $source, $count)) ) {
+if( ($versions = OCA\Files_Versions\Storage::getVersions($uid, $filename, $count)) ) {
$versionsFormatted = array();