From a96a75c263f541064dcde57af4e01db0b40c0c80 Mon Sep 17 00:00:00 2001 From: Michael Gapczynski Date: Mon, 6 Aug 2012 16:48:20 -0400 Subject: Select the correct column when searching for similar targets --- lib/public/share.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/public/share.php b/lib/public/share.php index 6da422402c5..68ac0217800 100644 --- a/lib/public/share.php +++ b/lib/public/share.php @@ -778,7 +778,7 @@ class Share { if ($checkTarget = self::getItems($itemType, $target, $shareType, $shareWith, null, self::FORMAT_NONE, null, 1)) { // Find similar targets to improve backend's chances to generate a unqiue target // TODO query needs to be setup like getItems - $checkTargets = \OC_DB::prepare('SELECT item_target FROM *PREFIX*share WHERE item_type = ? AND share_with = ? AND '.$column.' LIKE ?'); + $checkTargets = \OC_DB::prepare('SELECT '.$column.' FROM *PREFIX*share WHERE item_type = ? AND share_with = ? AND '.$column.' LIKE ?'); $result = $checkTargets->execute(array($itemType, $shareWith, '%'.$target.'%')); while ($row = $result->fetchRow()) { $exclude[] = $row[$column]; -- cgit v1.2.3