diff options
author | Bjoern Schiessle <schiessle@owncloud.com> | 2013-10-22 16:15:24 +0200 |
---|---|---|
committer | Bjoern Schiessle <schiessle@owncloud.com> | 2013-10-22 16:15:24 +0200 |
commit | eb348b776c4e6d317a42e979c9bbd379c7462b99 (patch) | |
tree | 8c0b8ce93cf7971afcff1cad2b7bf61fbae55643 /apps/files_encryption/hooks/hooks.php | |
parent | bd450d6f6b32b3174968ff81e3a376366b836387 (diff) | |
download | nextcloud-server-eb348b776c4e6d317a42e979c9bbd379c7462b99.tar.gz nextcloud-server-eb348b776c4e6d317a42e979c9bbd379c7462b99.zip |
set the init status to "NOT_INITIALIZED" if the encryption app gets enabled
Diffstat (limited to 'apps/files_encryption/hooks/hooks.php')
-rw-r--r-- | apps/files_encryption/hooks/hooks.php | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/apps/files_encryption/hooks/hooks.php b/apps/files_encryption/hooks/hooks.php index d9a76becf25..ef216c2e2e7 100644 --- a/apps/files_encryption/hooks/hooks.php +++ b/apps/files_encryption/hooks/hooks.php @@ -555,4 +555,16 @@ class Hooks { }
}
+ /**
+ * set the init status to 'NOT_INITIALIZED' (0) if the app gets enabled
+ * @param array $params contains the app ID
+ */
+ public static function postEnable($params) {
+ error_log("app was enabled!");
+ if ($params['app'] === 'files_encryption') {
+ $session = new \OCA\Encryption\Session(new \OC\Files\View('/'));
+ $session->setInitialized(\OCA\Encryption\Session::NOT_INITIALIZED);
+ }
+ }
+
}
|