aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2013-11-04 14:17:36 -0800
committerGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2013-11-04 14:17:36 -0800
commit6f260570959d1e3521c55ed714af3b00e6795307 (patch)
tree243496b2aa59d2cee901246c417d70dfe7d01c18
parent8852134d0a03b43d2d6f6cbb938de34760050b88 (diff)
parent2906d8dd2e4eac558854d84ff2704f063c5f297e (diff)
Merge pull request #227 from Alkarex/patch-4
Hack temporaire en attendant la recherche côté base-de-données
-rwxr-xr-xapp/models/Entry.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/app/models/Entry.php b/app/models/Entry.php
index ed350cad8..2829a3586 100755
--- a/app/models/Entry.php
+++ b/app/models/Entry.php
@@ -412,9 +412,12 @@ class EntryDAO extends Model_pdo {
. ' INNER JOIN ' . $this->prefix . 'feed f ON e.id_feed = f.id' . $where
. ' ORDER BY e.date' . $order . ', e.id' . $order;
- if (!empty($limitCount)) {
- $sql .= ' LIMIT ' . ($limitCount + 2); //TODO: See http://explainextended.com/2009/10/23/mysql-order-by-limit-performance-late-row-lookups/
+ if (empty($limitCount)) {
+ $limitCount = 20000; //TODO: FIXME: Hack temporaire en attendant la recherche côté base-de-données
}
+ //if (!empty($limitCount)) {
+ $sql .= ' LIMIT ' . ($limitCount + 2); //TODO: See http://explainextended.com/2009/10/23/mysql-order-by-limit-performance-late-row-lookups/
+ //}
$stm = $this->bd->prepare ($sql);
$stm->execute ($values);