X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FProtocol%2FFeed.php;h=2dafaaf6e71b0e01ac63b26b8b33d958df22c87c;hb=34b80227e88f80bf22b2acbd09bd9cd7e78e086c;hp=b12b5c93293a31fb8081ebd6aff0eed4086df42e;hpb=fa11959919dcef30780f6280f1e5257c873fa8b6;p=friendica.git diff --git a/src/Protocol/Feed.php b/src/Protocol/Feed.php index b12b5c9329..2dafaaf6e7 100644 --- a/src/Protocol/Feed.php +++ b/src/Protocol/Feed.php @@ -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]"; } }