aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorMichael Gapczynski <mtgap@owncloud.com>2012-08-06 16:48:20 -0400
committerMichael Gapczynski <mtgap@owncloud.com>2012-08-06 16:48:20 -0400
commita96a75c263f541064dcde57af4e01db0b40c0c80 (patch)
tree7478504d37cedda6118ea198919f671181b10a8b /lib
parent5e95e2a13121037aab09ddcddb60c79cf7057c88 (diff)
downloadnextcloud-server-a96a75c263f541064dcde57af4e01db0b40c0c80.tar.gz
nextcloud-server-a96a75c263f541064dcde57af4e01db0b40c0c80.zip
Select the correct column when searching for similar targets
Diffstat (limited to 'lib')
-rw-r--r--lib/public/share.php2
1 files changed, 1 insertions, 1 deletions
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];