summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorGeorg Ehrke <dev@georgswebsite.de>2012-08-26 16:30:30 +0200
committerGeorg Ehrke <dev@georgswebsite.de>2012-08-26 16:30:30 +0200
commit44f5033e290438ac7c09a0a345da4a68ff146c85 (patch)
treed50d8a039f2c06437f5c6e4f75c53b6bf7e1fc81 /lib
parent8c8496aff9fb634aa98a7e49999cdf2e724a35a1 (diff)
parent2028c8116122f56d8087716e42162fdc651819d3 (diff)
downloadnextcloud-server-44f5033e290438ac7c09a0a345da4a68ff146c85.tar.gz
nextcloud-server-44f5033e290438ac7c09a0a345da4a68ff146c85.zip
Merge branch 'master' of github.com:owncloud/core
Diffstat (limited to 'lib')
-rw-r--r--lib/l10n/nb_NO.php1
-rw-r--r--lib/public/share.php7
2 files changed, 3 insertions, 5 deletions
diff --git a/lib/l10n/nb_NO.php b/lib/l10n/nb_NO.php
index af9503b7bf4..f751a41d5eb 100644
--- a/lib/l10n/nb_NO.php
+++ b/lib/l10n/nb_NO.php
@@ -11,6 +11,7 @@
"Selected files too large to generate zip file." => "De valgte filene er for store til å kunne generere ZIP-fil",
"Application is not enabled" => "Applikasjon er ikke påslått",
"Authentication error" => "Autentiseringsfeil",
+"Token expired. Please reload page." => "Symbol utløpt. Vennligst last inn siden på nytt.",
"seconds ago" => "sekunder siden",
"1 minute ago" => "1 minuitt siden",
"%d minutes ago" => "%d minutter siden",
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();