[Pkg-owncloud-commits] [owncloud] 162/394: fix regression in file versioning for shared files
David Prévot
taffit at alioth.debian.org
Fri Nov 8 23:11:54 UTC 2013
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to annotated tag v4.5.10
in repository owncloud.
commit b7dd48b41f5ec029d681922cfdd5d01ce1f4eae8
Author: Björn Schießle <schiessle at owncloud.com>
Date: Fri Nov 30 13:14:24 2012 +0100
fix regression in file versioning for shared files
---
apps/files_versions/lib/versions.php | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/apps/files_versions/lib/versions.php b/apps/files_versions/lib/versions.php
index fa24383..a5836b7 100644
--- a/apps/files_versions/lib/versions.php
+++ b/apps/files_versions/lib/versions.php
@@ -58,8 +58,8 @@ class Storage {
public function store($filename) {
if(\OCP\Config::getSystemValue('files_versions', Storage::DEFAULTENABLED)=='true') {
list($uid, $filename) = self::getUidAndFilename($filename);
- $files_view = new \OC_FilesystemView('/'.\OCP\User::getUser() .'/files');
- $users_view = new \OC_FilesystemView('/'.\OCP\User::getUser());
+ $files_view = new \OC_FilesystemView('/'. $uid .'/files');
+ $users_view = new \OC_FilesystemView('/'.$uid);
//check if source file already exist as version to avoid recursions.
// todo does this check work?
@@ -94,7 +94,7 @@ class Storage {
// check mininterval if the file is being modified by the owner (all shared files should be versioned despite mininterval)
if ($uid == \OCP\User::getUser()) {
- $versions_fileview = new \OC_FilesystemView('/'.\OCP\User::getUser().'/files_versions');
+ $versions_fileview = new \OC_FilesystemView('/'.$uid.'/files_versions');
$versionsName=\OCP\Config::getSystemValue('datadirectory').$versions_fileview->getAbsolutePath($filename);
$versionsFolderName=\OCP\Config::getSystemValue('datadirectory').$versions_fileview->getAbsolutePath('');
$matches=glob($versionsName.'.v*');
@@ -128,7 +128,7 @@ class Storage {
if(\OCP\Config::getSystemValue('files_versions', Storage::DEFAULTENABLED)=='true') {
list($uid, $filename) = self::getUidAndFilename($filename);
- $users_view = new \OC_FilesystemView('/'.\OCP\User::getUser());
+ $users_view = new \OC_FilesystemView('/'.$uid);
// rollback
if( @$users_view->copy('files_versions'.$filename.'.v'.$revision, 'files'.$filename) ) {
@@ -151,7 +151,7 @@ class Storage {
public static function isversioned($filename) {
if(\OCP\Config::getSystemValue('files_versions', Storage::DEFAULTENABLED)=='true') {
list($uid, $filename) = self::getUidAndFilename($filename);
- $versions_fileview = new \OC_FilesystemView('/'.\OCP\User::getUser().'/files_versions');
+ $versions_fileview = new \OC_FilesystemView('/'.$uid.'/files_versions');
$versionsName=\OCP\Config::getSystemValue('datadirectory').$versions_fileview->getAbsolutePath($filename);
@@ -178,7 +178,7 @@ class Storage {
public static function getVersions( $filename, $count = 0 ) {
if( \OCP\Config::getSystemValue('files_versions', Storage::DEFAULTENABLED)=='true' ) {
list($uid, $filename) = self::getUidAndFilename($filename);
- $versions_fileview = new \OC_FilesystemView('/'.\OCP\User::getUser().'/files_versions');
+ $versions_fileview = new \OC_FilesystemView('/'.$uid.'/files_versions');
$versionsName = \OCP\Config::getSystemValue('datadirectory').$versions_fileview->getAbsolutePath($filename);
$versions = array();
@@ -189,7 +189,7 @@ class Storage {
$i = 0;
- $files_view = new \OC_FilesystemView('/'.\OCP\User::getUser().'/files');
+ $files_view = new \OC_FilesystemView('/'.$uid.'/files');
$local_file = $files_view->getLocalFile($filename);
foreach( $matches as $ma ) {
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git
More information about the Pkg-owncloud-commits
mailing list