From: Michael Gapczynski Date: Sun, 19 Feb 2012 00:30:35 +0000 (-0500) Subject: Fix overwriting of internal sharing for shared folders - bug oc-260 X-Git-Tag: v4.0.0beta~201^2~36 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=87627c7a503f10875d8fa0171624b6e586d1cc7b;p=nextcloud-server.git Fix overwriting of internal sharing for shared folders - bug oc-260 --- diff --git a/apps/files_sharing/ajax/getitem.php b/apps/files_sharing/ajax/getitem.php index 51fda6aed40..ba01adffb9a 100644 --- a/apps/files_sharing/ajax/getitem.php +++ b/apps/files_sharing/ajax/getitem.php @@ -8,6 +8,7 @@ require_once('../lib_share.php'); $userDirectory = "/".OC_User::getUser()."/files"; $source = $userDirectory.$_GET['source']; $path = $source; +$users = array(); if ($users = OC_Share::getMySharedItem($source)) { for ($i = 0; $i < count($users); $i++) { if ($users[$i]['uid_shared_with'] == OC_Share::PUBLICLINK) { @@ -19,7 +20,6 @@ $source = dirname($source); while ($source != "" && $source != "/" && $source != "." && $source != $userDirectory) { if ($values = OC_Share::getMySharedItem($source)) { $values = array_values($values); - $users = array(); $parentUsers = array(); for ($i = 0; $i < count($values); $i++) { if ($values[$i]['uid_shared_with'] == OC_Share::PUBLICLINK) {