aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorjfd <jfd@lance>2012-08-26 14:57:33 +0200
committerjfd <jfd@lance>2012-08-26 14:57:33 +0200
commit9822cd30c0db25f14ee1a96de24cbfc6a6d5a6e1 (patch)
tree7fe8ddac0aa6a24df074d5d8e079963d2547f802 /lib
parent80374c7cb2f3c98e350c95f92a9785aacef5d2c4 (diff)
downloadnextcloud-server-9822cd30c0db25f14ee1a96de24cbfc6a6d5a6e1.tar.gz
nextcloud-server-9822cd30c0db25f14ee1a96de24cbfc6a6d5a6e1.zip
fix sharing bug introduced with oracle support
Diffstat (limited to 'lib')
-rw-r--r--lib/public/share.php7
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/public/share.php b/lib/public/share.php
index 93820760d15..070d69d05ae 100644
--- a/lib/public/share.php
+++ b/lib/public/share.php
@@ -516,10 +516,6 @@ class Share {
// If the limit is not 1, the filtering can be done later
$where .= ' ORDER BY `*PREFIX*share`.`id` DESC';
}
- // The limit must be at least 3, because filtering needs to be done
- if ($limit < 3) {
- $limit = 3;
- }
}
// TODO Optimize selects
if ($format == self::FORMAT_STATUSES) {
@@ -548,7 +544,8 @@ class Share {
}
}
$root = strlen($root);
- $query = \OC_DB::prepare('SELECT '.$select.' FROM `*PREFIX*share` '.$where, $limit);
+ // The limit must be at least 3, because filtering needs to be done
+ $query = \OC_DB::prepare('SELECT '.$select.' FROM `*PREFIX*share` '.$where, ($limit < 3 ? 3 : $limit));
$result = $query->execute($queryArgs);
$items = array();
$targets = array();