Session needs filesystem view as parameter; use getSharingUsersArray(), this function also adds the owner to the list
This commit is contained in:
parent
935d039860
commit
5a7a64df08
1 changed files with 4 additions and 4 deletions
|
@ -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 );
|
||||
|
|
Loading…
Reference in a new issue