diff options
| author | 2013-10-30 21:23:45 +0100 | |
|---|---|---|
| committer | 2013-10-30 21:23:45 +0100 | |
| commit | 2906d8dd2e4eac558854d84ff2704f063c5f297e (patch) | |
| tree | cb9128660e395d5899ebfb449fc018bb2ca42453 /app/models/Entry.php | |
| parent | dd5273871a74d01d87fa1eaad7aa53bc1c148f85 (diff) | |
Hack temporaire en attendant la recherche côté base-de-données
Limite la recherche aux 20000 plus récents articles, en attendant https://github.com/marienfressinaud/FreshRSS/issues/204
Diffstat (limited to 'app/models/Entry.php')
| -rwxr-xr-x | app/models/Entry.php | 7 |
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); |
