function description fixed

This commit is contained in:
Björn Schießle 2013-01-11 14:24:00 +01:00
parent 67d00bc6bb
commit 99a0ea44ee
1 changed files with 2 additions and 5 deletions

View File

@ -120,11 +120,9 @@ class Storage {
} }
/** /**
* Delete versions of a file * rename versions of a file
*/ */
public static function rename($oldpath, $newpath) { public static function rename($oldpath, $newpath) {
error_log("oldpath: $oldpath");
error_log("newpath: $newpath");
list($uid, $oldpath) = self::getUidAndFilename($oldpath); list($uid, $oldpath) = self::getUidAndFilename($oldpath);
list($uidn, $newpath) = self::getUidAndFilename($newpath); list($uidn, $newpath) = self::getUidAndFilename($newpath);
$versions_view = new \OC_FilesystemView('/'.$uid .'/files_versions'); $versions_view = new \OC_FilesystemView('/'.$uid .'/files_versions');
@ -137,7 +135,6 @@ class Storage {
if(!file_exists($info['dirname'])) mkdir($info['dirname'], 0750, true); if(!file_exists($info['dirname'])) mkdir($info['dirname'], 0750, true);
$versions = Storage::getVersions($oldpath); $versions = Storage::getVersions($oldpath);
foreach ($versions as $v) { foreach ($versions as $v) {
error_log("rename(".$oldpath.'.v'.$v['version'].", ". $newpath.'.v'.$v['version'].")");
$versions_view->rename($oldpath.'.v'.$v['version'], $newpath.'.v'.$v['version']); $versions_view->rename($oldpath.'.v'.$v['version'], $newpath.'.v'.$v['version']);
} }
} }