From 9ca04e4e6964ddae6daee8f691bc294b88f2436c Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Sun, 14 Jun 2015 11:39:15 +0200 Subject: [PATCH] Just a to-do added --- include/ostatus.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/ostatus.php b/include/ostatus.php index 74196b56a3..86d0e36dbe 100644 --- a/include/ostatus.php +++ b/include/ostatus.php @@ -376,6 +376,8 @@ function ostatus_import($xml,$importer,&$contact, &$hub) { } else $item["parent-uri"] = $item["uri"]; + // We risk the chance of getting orphan items, we correct it some lines later + // To-Do: See To-Do line below. $item_id = item_store($item, true); //echo $xml; //print_r($item); @@ -416,6 +418,9 @@ function ostatus_import($xml,$importer,&$contact, &$hub) { if ($conversation != "") { // Check for duplicates. We really don't need to check the same conversation twice. if (!in_array($conversation, $conversationlist)) { + // To-Do: + // Call this before item_store is called to avoid posts with orphans + // The routine then needs to get the item array. complete_conversation($item_id, $conversation); $conversationlist[] = $conversation; } -- 2.39.5