|
|
@@ -353,7 +353,7 @@ class FreshRSS_EntryDAO extends Minz_ModelPdo {
|
|
|
throw new FreshRSS_EntriesGetter_Exception('Bad order in Entry->listByType: [' . $order . ']!');
|
|
|
}
|
|
|
if ($firstId === '' && parent::$sharedDbType === 'mysql') {
|
|
|
- $firstId = '9000000000' . '000000'; //MySQL optimization. Tested on MySQL 5.5 with 150k articles
|
|
|
+ $firstId = $order === 'DESC' ? '9000000000'. '000000' : '0'; //MySQL optimization. Tested on MySQL 5.5 with 150k articles
|
|
|
}
|
|
|
if ($firstId !== '') {
|
|
|
$where .= 'AND e1.id ' . ($order === 'DESC' ? '<=' : '>=') . $firstId . ' ';
|