<?php
+use Friendica\Database\DBM;
require_once("include/html2bbcode.php");
require_once("include/items.php");
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;
}
$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
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) {