From 1fa2f19ee44cc4a25bda784aee46ab2dac28e658 Mon Sep 17 00:00:00 2001 From: Florin Peter Date: Mon, 20 May 2013 21:24:39 +0200 Subject: removed dead code for delShareKey --- apps/files_encryption/hooks/hooks.php | 26 ++++++-------------------- 1 file changed, 6 insertions(+), 20 deletions(-) (limited to 'apps/files_encryption/hooks') diff --git a/apps/files_encryption/hooks/hooks.php b/apps/files_encryption/hooks/hooks.php index 087ba3d893c..90a93b4c52d 100644 --- a/apps/files_encryption/hooks/hooks.php +++ b/apps/files_encryption/hooks/hooks.php @@ -67,13 +67,13 @@ class Hooks { // If migration not yet done if ( ! $migrationCompleted ) { - $view1 = new \OC_FilesystemView( '/' . $params['uid'] ); + $userView = new \OC_FilesystemView( '/' . $params['uid'] ); // Set legacy encryption key if it exists, to support // depreciated encryption system - if ( - $view1->file_exists( 'encryption.key' ) - && $encLegacyKey = $view1->file_get_contents( 'encryption.key' ) + if ( + $userView->file_exists( 'encryption.key' ) + && $encLegacyKey = $userView->file_get_contents( 'encryption.key' ) ) { $plainLegacyKey = Crypt::legacyDecrypt( $encLegacyKey, $params['password'] ); @@ -412,25 +412,11 @@ class Hooks { // Unshare every user who no longer has access to the file $delUsers = array_diff( $userIds, $sharingUsers); - - if ( !Keymanager::delShareKey( $view, $delUsers, $path ) ) { - - $failed[] = $path; - - } + // delete share key + Keymanager::delShareKey( $view, $delUsers, $path ); } - // If no attempts to set keyfiles failed - if ( empty( $failed ) ) { - - return true; - - } else { - - return false; - - } } } -- cgit v1.2.3