}
/**\r
- * Delete versions of a file\r
+ * rename versions of a file\r
*/\r
- public static function rename($oldpath, $newpath) {
- error_log("oldpath: $oldpath");
- error_log("newpath: $newpath");\r
+ public static function rename($oldpath, $newpath) {\r
list($uid, $oldpath) = self::getUidAndFilename($oldpath);
list($uidn, $newpath) = self::getUidAndFilename($newpath);\r
$versions_view = new \OC_FilesystemView('/'.$uid .'/files_versions');
if(!file_exists($info['dirname'])) mkdir($info['dirname'], 0750, true);\r
$versions = Storage::getVersions($oldpath);\r
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']);\r
}\r
}\r