diff options
author | Thomas Tanghus <thomas@tanghus.net> | 2012-11-12 23:36:59 +0100 |
---|---|---|
committer | Thomas Tanghus <thomas@tanghus.net> | 2012-11-12 23:36:59 +0100 |
commit | 268a48479dd8cc14eaf3484043cf4857526ccab2 (patch) | |
tree | be2fe2a161cf50eeadabfc2f7910db6590454fdf /lib/public | |
parent | c127c78df498214ed03982c9a406d8c52135123b (diff) | |
parent | 7b53c9d3f07bf630d38a7a9c92ee44a3fb9b0f21 (diff) | |
download | nextcloud-server-268a48479dd8cc14eaf3484043cf4857526ccab2.tar.gz nextcloud-server-268a48479dd8cc14eaf3484043cf4857526ccab2.zip |
Merge branch 'master' of github.com:owncloud/core into vcategories_db
Diffstat (limited to 'lib/public')
-rw-r--r-- | lib/public/share.php | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/public/share.php b/lib/public/share.php index 24de4dcd5b2..dcb1b5c278e 100644 --- a/lib/public/share.php +++ b/lib/public/share.php @@ -548,7 +548,7 @@ class Share { $itemTypes = $collectionTypes; } $placeholders = join(',', array_fill(0, count($itemTypes), '?')); - $where .= ' WHERE item_type IN ('.$placeholders.'))'; + $where .= ' WHERE `item_type` IN ('.$placeholders.'))'; $queryArgs = $itemTypes; } else { $where = ' WHERE `item_type` = ?'; @@ -625,7 +625,7 @@ class Share { $queryArgs[] = $item; if ($includeCollections && $collectionTypes) { $placeholders = join(',', array_fill(0, count($collectionTypes), '?')); - $where .= ' OR item_type IN ('.$placeholders.'))'; + $where .= ' OR `item_type` IN ('.$placeholders.'))'; $queryArgs = array_merge($queryArgs, $collectionTypes); } } @@ -673,6 +673,9 @@ class Share { $root = strlen($root); $query = \OC_DB::prepare('SELECT '.$select.' FROM `*PREFIX*share` '.$where, $queryLimit); $result = $query->execute($queryArgs); + if (\OC_DB::isError($result)) { + \OC_Log::write('OCP\Share', \OC_DB::getErrorMessage($result) . ', select=' . $select . ' where=' . $where, \OC_Log::ERROR); + } $items = array(); $targets = array(); while ($row = $result->fetchRow()) { |