1
0
mirror of https://github.com/RSS-Bridge/rss-bridge.git synced 2025-01-17 22:28:22 +01:00

Return items starting at the end, not the beginning when working with limits

This commit is contained in:
logmanoriginal 2016-01-19 21:41:14 +01:00
parent 2e4e0077a8
commit 0e1b84263e

View File

@ -96,7 +96,7 @@ class MangareaderBridge extends BridgeAbstract{
$query = "(.//*[@id='listing']//tr)[position() > 1]";
if($limit !== -1){
$query = "(.//*[@id='listing']//tr)[position() > 1][position() <= " . $limit . "]";
$query = "(.//*[@id='listing']//tr)[position() > 1][position() > last() - " . $limit . "]";
}
$chapters = $xpath->query($query);