From 5a7a64df08ba0270d282389ff798708367c30e43 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Schie=C3=9Fle?= Date: Thu, 18 Apr 2013 20:00:45 +0200 Subject: [PATCH] Session needs filesystem view as parameter; use getSharingUsersArray(), this function also adds the owner to the list --- apps/files_encryption/hooks/hooks.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/files_encryption/hooks/hooks.php b/apps/files_encryption/hooks/hooks.php index e65f0945f4..265b90a87a 100644 --- a/apps/files_encryption/hooks/hooks.php +++ b/apps/files_encryption/hooks/hooks.php @@ -189,13 +189,13 @@ class Hooks { if ( $params['itemType'] === 'file' ) { $view = new \OC_FilesystemView( '/' ); - $session = new Session(); + $session = new Session($view); $userId = \OCP\User::getUser(); $util = new Util( $view, $userId ); $path = $util->fileIdToPath( $params['itemSource'] ); - - // Note: this currently doesn't include the owner due to \OC\Files\Filesystem::getOwner() - $usersSharing = $util->getUsersSharingFile( $path ); + + $sharingEnabled = \OCP\Share::isEnabled(); + $usersSharing = $util->getSharingUsersArray( $sharingEnabled, $path); // Recursively expand path to include subfiles $allPaths = $util->getPaths( $path );