]> git.mxchange.org Git - friendica.git/blobdiff - src/Protocol/Feed.php
Merge pull request #4215 from annando/tag-net
[friendica.git] / src / Protocol / Feed.php
index b12b5c93293a31fb8081ebd6aff0eed4086df42e..2dafaaf6e71b0e01ac63b26b8b33d958df22c87c 100644 (file)
@@ -254,7 +254,7 @@ class Feed {
                        if (!$simulate) {
                                $condition = ["`uid` = ? AND `uri` = ? AND `network` IN (?, ?)",
                                        $importer["uid"], $item["uri"], NETWORK_FEED, NETWORK_DFRN];
-                               $previous = dba::select('item', ['id'], $condition, ['limit' => 1]);
+                               $previous = dba::selectFirst('item', ['id'], $condition);
                                if (DBM::is_result($previous)) {
                                        logger("Item with uri ".$item["uri"]." for user ".$importer["uid"]." already existed under id ".$previous["id"], LOGGER_DEBUG);
                                        continue;
@@ -417,7 +417,8 @@ class Feed {
                                        }
                                        $item["body"] .= "\n".$item['tag'];
                                }
-                               if (!strstr($item["body"], '[url') && ($item['plink'] != '')) {
+x                              // Add the link to the original feed entry if not present in feed
+                               if (!strstr($item["body"], $item['plink']) && ($item['plink'] != '')) {
                                        $item["body"] .= "[hr][url]".$item['plink']."[/url]";
                                }
                        }