aboutsummaryrefslogtreecommitdiffstats
path: root/include/items.php
diff options
context:
space:
mode:
authorfabrixxm <fabrix.xm@gmail.com>2011-01-03 10:04:54 +0100
committerfabrixxm <fabrix.xm@gmail.com>2011-01-03 10:04:54 +0100
commitc061603746dfcb47b19d151ac94d3ef3d9d02767 (patch)
tree9527162e1f1299c5b719ee8047b6be9d56c97aef /include/items.php
parent8805635293a6f05fd18fb25f466c5d3d1e33a592 (diff)
downloadvolse-hubzilla-c061603746dfcb47b19d151ac94d3ef3d9d02767.tar.gz
volse-hubzilla-c061603746dfcb47b19d151ac94d3ef3d9d02767.tar.bz2
volse-hubzilla-c061603746dfcb47b19d151ac94d3ef3d9d02767.zip
import items from feeds in inverse date order
Diffstat (limited to 'include/items.php')
-rw-r--r--include/items.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/include/items.php b/include/items.php
index 6f73984e2..0c055f571 100644
--- a/include/items.php
+++ b/include/items.php
@@ -921,7 +921,10 @@ function consume_feed($xml,$importer,$contact, &$hub, $datedir = 0) {
// Now process the feed
if($feed->get_item_quantity()) {
- foreach($feed->get_items() as $item) {
+ // in inverse date order
+ if ($datedir)
+ $items = array_reverse($feed->get_items());
+ foreach($items as $item) {
$deleted = false;
@@ -1307,4 +1310,4 @@ function atom_entry($item,$type,$author,$owner,$comment = false) {
return $o;
}
- \ No newline at end of file
+