diff options
author | Bernhard Posselt <nukeawhale@gmail.com> | 2013-02-25 04:59:47 -0800 |
---|---|---|
committer | Bernhard Posselt <nukeawhale@gmail.com> | 2013-02-25 04:59:47 -0800 |
commit | 3f48bebe924062cc01abc8c72019235a00f38b76 (patch) | |
tree | 1375e1deee04cf0847e7d7ea6d7212e08b8b0b9a /apps | |
parent | 660670ec68bb4f4d4162e97e9a5cec90fd765118 (diff) | |
parent | 0a5457c5506730bf75a319b74a5bc97169da36d3 (diff) | |
download | nextcloud-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')
-rw-r--r-- | apps/files_versions/ajax/getVersions.php | 4 | ||||
-rw-r--r-- | apps/files_versions/lib/versions.php | 2 |
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 adbf2c1df7e..abc5870a485 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() ) { |