]> source.dussan.org Git - nextcloud-server.git/commitdiff
Merge branch 'master' into file_encryption_external_storage_fixes
authorFlorin Peter <github@florin-peter.de>
Wed, 29 May 2013 22:45:29 +0000 (00:45 +0200)
committerFlorin Peter <github@florin-peter.de>
Wed, 29 May 2013 22:45:29 +0000 (00:45 +0200)
Conflicts:
apps/files_encryption/hooks/hooks.php

1  2 
apps/files_encryption/hooks/hooks.php
apps/files_encryption/lib/util.php
apps/files_encryption/tests/webdav.php

index dd51a75f8f8cd8a3083fd9c09b9204ef087ab346,955425595ba523dedc7e41e39b6d58f3177554b1..9893cecc94e32924ecca6db1a2d3363b1a5365ba
@@@ -408,31 -405,25 +412,31 @@@ class Hooks 
                        }\r
  \r
                        // if we unshare a folder we need a list of all (sub-)files\r
 -                      if ($params['itemType'] === 'folder') {\r
 +                      if ( $params['itemType'] === 'folder' ) {\r
  \r
 -                              $allFiles = $util->getAllFiles($path);\r
 +                              // get the path including mount point only if not a shared folder\r
 +                              if(strncmp($path, '/Shared' , strlen('/Shared') !== 0)) {\r
 +                                      // get path including the the storage mount point\r
 +                                      $path = $util->getPathWithMountPoint($params['itemSource']);\r
 +                              }\r
  \r
 +                              $allFiles = $util->getAllFiles( $path );\r
 +                              \r
                        } else {\r
-                       \r
-                               $allFiles = array( $path );\r
\r
+                               $allFiles = array($path);\r
                        }\r
  \r
-                       foreach ( $allFiles as $path ) {\r
+                       foreach ($allFiles as $path) {\r
  \r
                                // check if the user still has access to the file, otherwise delete share key\r
-                               $sharingUsers = $util->getSharingUsersArray( true, $path );\r
+                               $sharingUsers = $util->getSharingUsersArray(true, $path);\r
  \r
                                // Unshare every user who no longer has access to the file\r
-                               $delUsers = array_diff( $userIds, $sharingUsers);\r
+                               $delUsers = array_diff($userIds, $sharingUsers);\r
  \r
                                // delete share key\r
-                               Keymanager::delShareKey( $view, $delUsers, $path );\r
+                               Keymanager::delShareKey($view, $delUsers, $path);\r
                        }\r
  \r
                }\r
Simple merge