summaryrefslogtreecommitdiffstats
path: root/apps/files_versions
diff options
context:
space:
mode:
authorBjörn Schießle <schiessle@owncloud.com>2013-02-25 14:26:59 +0100
committerBjörn Schießle <schiessle@owncloud.com>2013-02-25 14:26:59 +0100
commit4c980a4851804c4f5379e364e106edacd04c42e4 (patch)
tree0ad2d8efe8affc59cdeeb65edfec05e45a07c8db /apps/files_versions
parent632ca9f06d2247061b7f03ce9bfcd0402bd92441 (diff)
parenta37577e007ef458e31d3484b5f969ea0e98545f3 (diff)
downloadnextcloud-server-4c980a4851804c4f5379e364e106edacd04c42e4.tar.gz
nextcloud-server-4c980a4851804c4f5379e364e106edacd04c42e4.zip
Merge branch 'master' into update-expire-function
Conflicts: apps/files_trashbin/appinfo/version apps/files_trashbin/lib/trash.php
Diffstat (limited to 'apps/files_versions')
-rw-r--r--apps/files_versions/ajax/getVersions.php4
-rw-r--r--apps/files_versions/lib/versions.php2
2 files changed, 3 insertions, 3 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();
diff --git a/apps/files_versions/lib/versions.php b/apps/files_versions/lib/versions.php
index 62574236343..05c1bf53e43 100644
--- a/apps/files_versions/lib/versions.php
+++ b/apps/files_versions/lib/versions.php
@@ -35,7 +35,7 @@ class Storage {
6 => array('intervalEndsAfter' => -1, 'step' => 604800),
);
- private static function getUidAndFilename($filename) {
+ public static function getUidAndFilename($filename) {
$uid = \OC\Files\Filesystem::getOwner($filename);
\OC\Files\Filesystem::initMountPoints($uid);
if ( $uid != \OCP\User::getUser() ) {