summaryrefslogtreecommitdiffstats
path: root/apps/files_versions
diff options
context:
space:
mode:
authorBjörn Schießle <schiessle@owncloud.com>2013-02-10 14:17:18 +0100
committerBjörn Schießle <schiessle@owncloud.com>2013-02-10 14:17:18 +0100
commitff09a1f37baa5ad5bd63c57ec5384e3ffbc38ad0 (patch)
tree34f6275db301b3b1cffd70368790ddb0dafafd97 /apps/files_versions
parent1c56539c01c162676a05d90e3598b7d68394ac73 (diff)
downloadnextcloud-server-ff09a1f37baa5ad5bd63c57ec5384e3ffbc38ad0.tar.gz
nextcloud-server-ff09a1f37baa5ad5bd63c57ec5384e3ffbc38ad0.zip
don't use OC_FilesystemView()
Diffstat (limited to 'apps/files_versions')
-rw-r--r--apps/files_versions/lib/hooks.php25
1 files changed, 9 insertions, 16 deletions
diff --git a/apps/files_versions/lib/hooks.php b/apps/files_versions/lib/hooks.php
index dc02c605c44..6c87eba423d 100644
--- a/apps/files_versions/lib/hooks.php
+++ b/apps/files_versions/lib/hooks.php
@@ -20,13 +20,10 @@ class Hooks {
public static function write_hook( $params ) {
if(\OCP\Config::getSystemValue('files_versions', Storage::DEFAULTENABLED)=='true') {
-
- $versions = new Storage( new \OC\Files\View('') );
-
$path = $params[\OC\Files\Filesystem::signal_param_path];
-
- if($path<>'') $versions->store( $path );
-
+ if($path<>'') {
+ Storage::store($path);
+ }
}
}
@@ -40,12 +37,10 @@ class Hooks {
*/
public static function remove_hook($params) {
if(\OCP\Config::getSystemValue('files_versions', Storage::DEFAULTENABLED)=='true') {
-
- $versions = new Storage( new \OC_FilesystemView('') );
-
$path = $params[\OC\Files\Filesystem::signal_param_path];
-
- if($path<>'') $versions->delete( $path );
+ if($path<>'') {
+ Storage::delete($path);
+ }
}
}
@@ -59,13 +54,11 @@ class Hooks {
*/
public static function rename_hook($params) {
if(\OCP\Config::getSystemValue('files_versions', Storage::DEFAULTENABLED)=='true') {
-
- $versions = new Storage( new \OC_FilesystemView('') );
-
$oldpath = $params['oldpath'];
$newpath = $params['newpath'];
-
- if($oldpath<>'' && $newpath<>'') $versions->rename( $oldpath, $newpath );
+ if($oldpath<>'' && $newpath<>'') {
+ Storage::rename( $oldpath, $newpath );
+ }
}
}