summaryrefslogtreecommitdiffstats
path: root/apps/files_versions
diff options
context:
space:
mode:
authorBjörn Schießle <bjoern@schiessle.org>2013-08-18 09:51:48 -0700
committerBjörn Schießle <bjoern@schiessle.org>2013-08-18 09:51:48 -0700
commit9be836814cb4165ea54a086a0f97526d783bcd37 (patch)
treead57d30194571edcf0f51cd83178b8ac2f03c0aa /apps/files_versions
parentc620c5840ab8ca45531c7639e086bafbd87d7365 (diff)
parentd544a371bfb84f36a3b789d19d44d6694de21c48 (diff)
downloadnextcloud-server-9be836814cb4165ea54a086a0f97526d783bcd37.tar.gz
nextcloud-server-9be836814cb4165ea54a086a0f97526d783bcd37.zip
Merge pull request #4239 from owncloud/decrypt_files_again
Enable user to decrypt files again after encryption app was disabled
Diffstat (limited to 'apps/files_versions')
-rw-r--r--apps/files_versions/lib/hooks.php15
1 files changed, 8 insertions, 7 deletions
diff --git a/apps/files_versions/lib/hooks.php b/apps/files_versions/lib/hooks.php
index f0082b301a3..81ee3c8b3c6 100644
--- a/apps/files_versions/lib/hooks.php
+++ b/apps/files_versions/lib/hooks.php
@@ -19,7 +19,7 @@ class Hooks {
*/
public static function write_hook( $params ) {
- if(\OCP\Config::getSystemValue('files_versions', Storage::DEFAULTENABLED)=='true') {
+ if (\OCP\App::isEnabled('files_versions')) {
$path = $params[\OC\Files\Filesystem::signal_param_path];
if($path<>'') {
Storage::store($path);
@@ -36,12 +36,12 @@ class Hooks {
* cleanup the versions directory if the actual file gets deleted
*/
public static function remove_hook($params) {
- if(\OCP\Config::getSystemValue('files_versions', Storage::DEFAULTENABLED)=='true') {
+
+ if (\OCP\App::isEnabled('files_versions')) {
$path = $params[\OC\Files\Filesystem::signal_param_path];
if($path<>'') {
Storage::delete($path);
}
-
}
}
@@ -53,13 +53,13 @@ class Hooks {
* of the stored versions along the actual file
*/
public static function rename_hook($params) {
- if(\OCP\Config::getSystemValue('files_versions', Storage::DEFAULTENABLED)=='true') {
+
+ if (\OCP\App::isEnabled('files_versions')) {
$oldpath = $params['oldpath'];
$newpath = $params['newpath'];
if($oldpath<>'' && $newpath<>'') {
Storage::rename( $oldpath, $newpath );
}
-
}
}
@@ -71,10 +71,11 @@ class Hooks {
* to remove the used space for versions stored in the database
*/
public static function deleteUser_hook($params) {
- if(\OCP\Config::getSystemValue('files_versions', Storage::DEFAULTENABLED)=='true') {
+
+ if (\OCP\App::isEnabled('files_versions')) {
$uid = $params['uid'];
Storage::deleteUser($uid);
- }
+ }
}
}