From eb348b776c4e6d317a42e979c9bbd379c7462b99 Mon Sep 17 00:00:00 2001 From: Bjoern Schiessle Date: Tue, 22 Oct 2013 16:15:24 +0200 Subject: set the init status to "NOT_INITIALIZED" if the encryption app gets enabled --- apps/files_encryption/hooks/hooks.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'apps/files_encryption/hooks') 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); + } + } + } -- cgit v1.2.3 From 3d1d44352979436e2cd9dc93d5a097184907f335 Mon Sep 17 00:00:00 2001 From: Bjoern Schiessle Date: Tue, 22 Oct 2013 16:21:04 +0200 Subject: remove debug output --- apps/files_encryption/hooks/hooks.php | 1 - 1 file changed, 1 deletion(-) (limited to 'apps/files_encryption/hooks') diff --git a/apps/files_encryption/hooks/hooks.php b/apps/files_encryption/hooks/hooks.php index ef216c2e2e7..6e2d360917b 100644 --- a/apps/files_encryption/hooks/hooks.php +++ b/apps/files_encryption/hooks/hooks.php @@ -560,7 +560,6 @@ class Hooks { * @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); -- cgit v1.2.3