mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-01-29 03:47:42 +01:00
[XenForo] fix: sort items by date in descending order (#2633)
This commit is contained in:
parent
bb81af086f
commit
a28481aaa8
@ -149,10 +149,11 @@ class XenForoBridge extends BridgeAbstract {
|
||||
break;
|
||||
}
|
||||
|
||||
while(count($this->items) > $this->getInput('limit')) {
|
||||
array_shift($this->items);
|
||||
}
|
||||
usort($this->items, function($a, $b) {
|
||||
return $b['timestamp'] <=> $a['timestamp'];
|
||||
});
|
||||
|
||||
$this->items = array_slice($this->items, 0, $this->getInput('limit'));
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user