]> source.dussan.org Git - nextcloud-server.git/commitdiff
Fix overwriting of internal sharing for shared folders - bug oc-260
authorMichael Gapczynski <GapczynskiM@gmail.com>
Sun, 19 Feb 2012 00:30:35 +0000 (19:30 -0500)
committerMichael Gapczynski <GapczynskiM@gmail.com>
Sun, 19 Feb 2012 00:30:54 +0000 (19:30 -0500)
apps/files_sharing/ajax/getitem.php

index 51fda6aed40aa5095b66d8cd3e31df0b6689074a..ba01adffb9a6fa1e45fc95790db7af9e55edf1b6 100644 (file)
@@ -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) {