Fix unsharing files also deleting private link, bug fix for oc-251

This commit is contained in:
Michael Gapczynski 2012-05-09 17:37:42 -04:00
parent de6aa0f88c
commit 93c0e8b3bf

View file

@ -385,7 +385,7 @@ class OC_Share {
public static function unshare($source, $uid_shared_with) {
$source = self::cleanPath($source);
$uid_owner = OCP\USER::getUser();
$query = OCP\DB::prepare("DELETE FROM *PREFIX*sharing WHERE SUBSTR(source, 1, ?) = ? AND uid_owner = ? AND uid_shared_with ".self::getUsersAndGroups($uid_shared_with));
$query = OCP\DB::prepare("DELETE FROM *PREFIX*sharing WHERE SUBSTR(source, 1, ?) = ? AND uid_owner = ? AND uid_shared_with ".self::getUsersAndGroups($uid_shared_with, false));
$query->execute(array(strlen($source), $source, $uid_owner));
if ($uid_shared_with != self::PUBLICLINK) {
if (OC_Group::groupExists($uid_shared_with)) {