]> git.mxchange.org Git - friendica.git/blobdiff - src/Protocol/Feed.php
Missing dba::selectFirst in Model\Item
[friendica.git] / src / Protocol / Feed.php
index cc0915472d05cb75ee10aa849cb413abd003eab9..203a2e83565d27396dcb4dc7486e17e8a5bab5a8 100644 (file)
@@ -415,7 +415,7 @@ class Feed {
                                        $item["body"] .= "\n".$item['tag'];
                                }
                                // Add the link to the original feed entry if not present in feed
-                               if (!strstr($item["body"], $item['plink']) && ($item['plink'] != '')) {
+                               if (($item['plink'] != '') && !strstr($item["body"], $item['plink'])) {
                                        $item["body"] .= "[hr][url]".$item['plink']."[/url]";
                                }
                        }
@@ -423,7 +423,7 @@ class Feed {
                        if (!$simulate) {
                                logger("Stored feed: ".print_r($item, true), LOGGER_DEBUG);
 
-                               $notify = item_is_remote_self($contact, $item);
+                               $notify = Item::isRemoteSelf($contact, $item);
 
                                // Distributed items should have a well formatted URI.
                                // Additionally we have to avoid conflicts with identical URI between imported feeds and these items.
@@ -433,7 +433,7 @@ class Feed {
                                        unset($item['parent-uri']);
                                }
 
-                               $id = item_store($item, false, $notify);
+                               $id = Item::insert($item, false, $notify);
 
                                logger("Feed for contact ".$contact["url"]." stored under id ".$id);
                        } else {