get owner from share item, if we expire a share while the user updates his /Shared folder than the owner is different from the currently logged in user

This commit is contained in:
Bjoern Schiessle 2013-12-05 17:25:01 +01:00
parent 737b9a990f
commit ace1d40ed6
1 changed files with 6 additions and 2 deletions

View File

@ -112,8 +112,12 @@ class Shared_Updater {
*/
static public function shareHook($params) {
if ($params['itemType'] === 'file' || $params['itemType'] === 'folder') {
$uidOwner = \OCP\User::getUser();
$users = \OCP\Share::getUsersItemShared($params['itemType'], $params['fileSource'], $uidOwner, true);
if (isset($params['uidOwner'])) {
$uidOwner = $params['uidOwner'];
} else {
$uidOwner = \OCP\User::getUser();
}
$users = \OCP\Share::getUsersItemShared($params['itemType'], $params['fileSource'], $uidOwner, true, false);
if (!empty($users)) {
while (!empty($users)) {
$reshareUsers = array();