Update Shared folders ETags of users with reshares
This commit is contained in:
parent
771e01af35
commit
812e306e6e
|
@ -35,13 +35,19 @@ class Shared_Updater {
|
|||
// Correct Shared folders of other users shared with
|
||||
$users = \OCP\Share::getUsersItemShared('file', $info['fileid'], $uidOwner, true);
|
||||
if (!empty($users)) {
|
||||
while (!empty($users)) {
|
||||
$reshareUsers = array();
|
||||
foreach ($users as $user) {
|
||||
// The ETag of the logged in user should already be updated
|
||||
if ($user !== $uid) {
|
||||
$etag = \OC\Files\Filesystem::getETag('');
|
||||
\OCP\Config::setUserValue($user, 'files_sharing', 'etag', $etag);
|
||||
// Look for reshares
|
||||
$reshareUsers = array_merge($reshareUsers, \OCP\Share::getUsersItemShared('file', $info['fileid'], $user, true));
|
||||
}
|
||||
}
|
||||
$users = $reshareUsers;
|
||||
}
|
||||
// Correct folders of shared file owner
|
||||
$target = substr($target, 8);
|
||||
if ($uidOwner !== $uid && $source = \OC_Share_Backend_File::getSource($target)) {
|
||||
|
|
Loading…
Reference in New Issue