diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/l10n/nb_NO.php | 1 | ||||
-rw-r--r-- | lib/public/share.php | 7 |
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(); |