mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-04-09 16:38:50 +00: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;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
while(count($this->items) > $this->getInput('limit')) {
|
usort($this->items, function($a, $b) {
|
||||||
array_shift($this->items);
|
return $b['timestamp'] <=> $a['timestamp'];
|
||||||
}
|
});
|
||||||
|
|
||||||
|
$this->items = array_slice($this->items, 0, $this->getInput('limit'));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user