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