]> git.mxchange.org Git - friendica.git/blobdiff - include/feed.php
Default features should now work with the forumwidget again
[friendica.git] / include / feed.php
index fb97c14ba126aa1875d1202df05a5caa8aad64e7..0be6a5781c361c5bb16e3a90ba9967a53fa579d0 100644 (file)
@@ -1,4 +1,5 @@
 <?php
+use Friendica\Database\DBM;
 require_once("include/html2bbcode.php");
 require_once("include/items.php");
 
@@ -235,7 +236,7 @@ function feed_import($xml,$importer,&$contact, &$hub, $simulate = false) {
                if (!$simulate) {
                        $r = q("SELECT `id` FROM `item` WHERE `uid` = %d AND `uri` = '%s' AND `network` IN ('%s', '%s')",
                                intval($importer["uid"]), dbesc($item["uri"]), dbesc(NETWORK_FEED), dbesc(NETWORK_DFRN));
-                       if (dbm::is_result($r)) {
+                       if (DBM::is_result($r)) {
                                logger("Item with uri ".$item["uri"]." for user ".$importer["uid"]." already existed under id ".$r[0]["id"], LOGGER_DEBUG);
                                continue;
                        }
@@ -343,7 +344,7 @@ function feed_import($xml,$importer,&$contact, &$hub, $simulate = false) {
                        $item["title"] = '';
                }
 
-               if ($contact["fetch_further_information"]) {
+               if (!empty($contact["fetch_further_information"]) && ($contact["fetch_further_information"] < 3)) {
                        $preview = "";
 
                        // Handle enclosures and treat them as preview picture
@@ -383,6 +384,9 @@ function feed_import($xml,$importer,&$contact, &$hub, $simulate = false) {
                        if (!strstr($item["body"], '[url') && ($item['plink'] != '')) {
                                $item["body"] .= "[hr][url]".$item['plink']."[/url]";
                        }
+                       if ($contact["fetch_further_information"] == 3) {
+                               $item["tag"] = add_page_keywords($item["plink"], false, $preview, true, $contact["ffi_keyword_blacklist"]);
+                       }
                }
 
                if (!$simulate) {