X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2Ffeed.php;h=12cf06ca5093d6d674a3569bd76e05f1349c0de9;hb=aeb6e53d02fdbc3208851a9a4dc8323db29c62c5;hp=1545ff34ce34843037edba79fc131d5cac2e2987;hpb=fdc8190567096ce792c772e8a069f0ee2c037488;p=friendica.git diff --git a/include/feed.php b/include/feed.php index 1545ff34ce..12cf06ca50 100644 --- a/include/feed.php +++ b/include/feed.php @@ -338,12 +338,22 @@ function feed_import($xml,$importer,&$contact, &$hub, $simulate = false) { if ($body == "") { $body = trim($xpath->evaluate('atom:summary/text()', $entry)->item(0)->nodeValue); } + // remove the content of the title if it is identically to the body // This helps with auto generated titles e.g. from tumblr if (title_is_body($item["title"], $body)) { $item["title"] = ""; } $item["body"] = html2bbcode($body); + + if (($item["body"] == '') && ($item["title"] != '')) { + $item["body"] = $item["title"]; + $item["title"] = ''; + } + + if (!strstr($item["body"], '[url') && ($item['plink'] != '')) { + $item["body"] .= "[hr][url]".$item['plink']."[/url]"; + } } if (!$simulate) {