summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorBjörn Schießle <bjoern@schiessle.org>2013-01-16 01:26:43 -0800
committerBjörn Schießle <bjoern@schiessle.org>2013-01-16 01:26:43 -0800
commit2b9c925a2beaa345c7dc802af8acaac69d594e28 (patch)
treee74dc28f57153acf801ad410a522ec9b3009e864 /apps
parent1f7bf57ecec772a0b9095ac758bff0a29a21152d (diff)
parent5935f6adff4225349ccfcff5cabe2254a87d7519 (diff)
downloadnextcloud-server-2b9c925a2beaa345c7dc802af8acaac69d594e28.tar.gz
nextcloud-server-2b9c925a2beaa345c7dc802af8acaac69d594e28.zip
Merge pull request #1192 from schiesbn/versioning_history_issue_1189
fix for issue #1186, missing variables added
Diffstat (limited to 'apps')
-rw-r--r--apps/files_versions/lib/versions.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/apps/files_versions/lib/versions.php b/apps/files_versions/lib/versions.php
index f938a2dbe84..48be5e223ac 100644
--- a/apps/files_versions/lib/versions.php
+++ b/apps/files_versions/lib/versions.php
@@ -79,6 +79,7 @@ class Storage {
// create all parent folders
$info=pathinfo($filename);
+ $versionsFolderName=\OCP\Config::getSystemValue('datadirectory').$users_view->getAbsolutePath('files_versions/');
if(!file_exists($versionsFolderName.'/'.$info['dirname'])) {
mkdir($versionsFolderName.'/'.$info['dirname'], 0750, true);
}
@@ -127,7 +128,8 @@ class Storage {
list($uid, $oldpath) = self::getUidAndFilename($oldpath);
list($uidn, $newpath) = self::getUidAndFilename($newpath);
$versions_view = new \OC_FilesystemView('/'.$uid .'/files_versions');
- $files_view = new \OC_FilesystemView('/'.$uid .'/files');
+ $files_view = new \OC_FilesystemView('/'.$uid .'/files');
+ $abs_newpath = \OCP\Config::getSystemValue('datadirectory').$versions_view->getAbsolutePath('').$newpath;
if ( $files_view->is_dir($oldpath) && $versions_view->is_dir($oldpath) ) {
$versions_view->rename($oldpath, $newpath);
@@ -149,7 +151,8 @@ class Storage {
if(\OCP\Config::getSystemValue('files_versions', Storage::DEFAULTENABLED)=='true') {
list($uid, $filename) = self::getUidAndFilename($filename);
$users_view = new \OC_FilesystemView('/'.$uid);
-
+ $versionCreated = false;
+
//first create a new version
$version = 'files_versions'.$filename.'.v'.$users_view->filemtime('files'.$filename);
if ( !$users_view->file_exists($version)) {