diff --git a/apps/files_encryption/hooks/hooks.php b/apps/files_encryption/hooks/hooks.php index 16e9f9177d75335d3f1b9dcbe5f4745777331ac8..8f03087e568f62646e2af042ff80f66905f91d20 100644 --- a/apps/files_encryption/hooks/hooks.php +++ b/apps/files_encryption/hooks/hooks.php @@ -169,33 +169,6 @@ class Hooks { } } - - /** - * @brief update the encryption key of the file uploaded by the client - */ - public static function updateKeyfile( $params ) { - - if ( Crypt::mode() == 'client' ) { - - if ( isset( $params['properties']['key'] ) ) { - - $view = new \OC_FilesystemView( '/' ); - $userId = \OCP\User::getUser(); - - Keymanager::setFileKey( $view, $params['path'], $userId, $params['properties']['key'] ); - - } else { - - \OC_Log::write( - 'Encryption library', "Client side encryption is enabled but the client doesn't provide a encryption key for the file!" - , \OC_Log::ERROR - ); - - } - - } - - } /* * @brief check if files can be encrypted to every user. @@ -426,17 +399,6 @@ class Hooks { } /** - * @brief - */ - public static function postUnshareAll( $params ) { - - // NOTE: It appears that this is never called for files, so - // we may not need to implement it - - } - - - /** * @brief after a file is renamed, rename its keyfile and share-keys also fix the file size and fix also the sharing * @param array with oldpath and newpath * diff --git a/apps/files_encryption/lib/helper.php b/apps/files_encryption/lib/helper.php index 783cebeee5b9a85e424e20f2bd2bf9e1fa1df88f..6d5aae4e8b5ce3780fd30aac79e3379cdb0014c0 100755 --- a/apps/files_encryption/lib/helper.php +++ b/apps/files_encryption/lib/helper.php @@ -37,7 +37,6 @@ class Helper { \OCP\Util::connectHook( 'OCP\Share', 'pre_shared', 'OCA\Encryption\Hooks', 'preShared' ); \OCP\Util::connectHook( 'OCP\Share', 'post_shared', 'OCA\Encryption\Hooks', 'postShared' ); \OCP\Util::connectHook( 'OCP\Share', 'post_unshare', 'OCA\Encryption\Hooks', 'postUnshare' ); - \OCP\Util::connectHook( 'OCP\Share', 'post_unshareAll', 'OCA\Encryption\Hooks', 'postUnshareAll' ); } /** @@ -58,7 +57,7 @@ class Helper { */ public static function registerWebdavHooks() { - \OCP\Util::connectHook( 'OC_Webdav_Properties', 'update', 'OCA\Encryption\Hooks', 'updateKeyfileFromClient' ); + } /**