summaryrefslogtreecommitdiffstats
path: root/apps/files_versions/lib/versions.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files_versions/lib/versions.php')
-rw-r--r--apps/files_versions/lib/versions.php37
1 files changed, 0 insertions, 37 deletions
diff --git a/apps/files_versions/lib/versions.php b/apps/files_versions/lib/versions.php
index fb78e0a56c0..412044dba7d 100644
--- a/apps/files_versions/lib/versions.php
+++ b/apps/files_versions/lib/versions.php
@@ -323,41 +323,4 @@ class Storage {
return $this->view->deleteAll( $dir, true );
}
-
- /**
- * @brief Erase versions of deleted file
- * @param array
- *
- * This function is connected to the delete signal of OC_Filesystem
- * cleanup the versions directory if the actual file gets deleted
- */
- public static function removeVersions($params) {
- $rel_path = $params['path'];
- $abs_path = \OCP\Config::getSystemValue('datadirectory').'/'.\OCP\User::getUser()."/versions".$rel_path.'.v';
- if(Storage::isversioned($rel_path)) {
- $versions = Storage::getVersions($rel_path);
- foreach ($versions as $v){
- unlink($abs_path . $v['version']);
- }
- }
- }
-
- /**
- * @brief rename/move versions of renamed/moved files
- * @param array with oldpath and newpath
- *
- * This function is connected to the rename signal of OC_Filesystem and adjust the name and location
- * of the stored versions along the actual file
- */
- public static function renameVersions($params) {
- $rel_oldpath = $params['oldpath'];
- $abs_oldpath = \OCP\Config::getSystemValue('datadirectory').'/'.\OCP\User::getUser()."/versions".$rel_oldpath.'.v';
- $abs_newpath = \OCP\Config::getSystemValue('datadirectory').'/'.\OCP\User::getUser()."/versions".$params['newpath'].'.v';
- if(Storage::isversioned($rel_oldpath)) {
- $versions = Storage::getVersions($rel_oldpath);
- foreach ($versions as $v){
- rename($abs_oldpath.$v['version'], $abs_newpath.$v['version']);
- }
- }
- }
}