From a8d6d72b7bcfbd36d37bc36bbc892ddc3ead477e Mon Sep 17 00:00:00 2001 From: Friendika Date: Mon, 8 Nov 2010 01:11:50 -0800 Subject: [PATCH] use date ordering on public feeds --- include/items.php | 7 +++++-- mod/pubsub.php | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/include/items.php b/include/items.php index c963d91890..d407b47978 100644 --- a/include/items.php +++ b/include/items.php @@ -723,13 +723,16 @@ function dfrn_deliver($owner,$contact,$atom) { * */ -function consume_feed($xml,$importer,$contact, &$hub) { +function consume_feed($xml,$importer,$contact, &$hub, $datedir = 0) { require_once('simplepie/simplepie.inc'); $feed = new SimplePie(); $feed->set_raw_data($xml); - $feed->enable_order_by_date(false); + if($datedir) + $feed->enable_order_by_date(true); + else + $feed->enable_order_by_date(false); $feed->init(); // Check at the feed level for updated contact name and/or photo diff --git a/mod/pubsub.php b/mod/pubsub.php index 760ffa9e9f..0f8d7fdc66 100644 --- a/mod/pubsub.php +++ b/mod/pubsub.php @@ -113,7 +113,7 @@ function pubsub_post(&$a) { require_once('include/items.php'); - consume_feed($xml,$importer,$contact,$feedhub); + consume_feed($xml,$importer,$contact,$feedhub,1); hub_post_return();