aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2011-10-04 04:38:58 -0700
committerFriendika <info@friendika.com>2011-10-04 04:38:58 -0700
commitaeb83fa063297db774826f750fcef68904c901a0 (patch)
tree0503899b3ecb5686f2e8f7cac9ae38d00838ac42 /include
parenta9802575df6fcce1d895feec1dfe9cdaf01535f6 (diff)
downloadvolse-hubzilla-aeb83fa063297db774826f750fcef68904c901a0.tar.gz
volse-hubzilla-aeb83fa063297db774826f750fcef68904c901a0.tar.bz2
volse-hubzilla-aeb83fa063297db774826f750fcef68904c901a0.zip
document multi-pass mode on consume_feed
Diffstat (limited to 'include')
-rw-r--r--include/items.php11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/items.php b/include/items.php
index c8dd4ca42..dc08fb3db 100644
--- a/include/items.php
+++ b/include/items.php
@@ -1078,7 +1078,18 @@ function dfrn_deliver($owner,$contact,$atom, $dissolve = false) {
* have a contact record.
* $hub = should we find a hub declation in the feed, pass it back to our calling process, who might (or
* might not) try and subscribe to it.
+ * $datedir sorts in reverse order
+ * $pass - by default ($pass = 0) we cannot guarantee that a parent item has been
+ * imported prior to its children being seen in the stream unless we are certain
+ * of how the feed is arranged/ordered.
+ * With $pass = 1, we only pull parent items out of the stream.
+ * With $pass = 2, we only pull children (comments/likes).
*
+ * So running this twice, first with pass 1 and then with pass 2 will do the right
+ * thing regardless of feed ordering. This won't be adequate in a fully-threaded
+ * model where comments can have sub-threads. That would require some massive sorting
+ * to get all the feed items into a mostly linear ordering, and might still require
+ * recursion.
*/
function consume_feed($xml,$importer,&$contact, &$hub, $datedir = 0, $pass = 0) {