use DOMDocument;
use DOMXPath;
use Friendica\Content\Text\HTML;
+use Friendica\Core\Protocol;
use Friendica\Core\System;
-use Friendica\Database\DBM;
+use Friendica\Database\DBA;
use Friendica\Model\Item;
use Friendica\Util\Network;
use Friendica\Util\XML;
$header = [];
$header["uid"] = $importer["uid"];
- $header["network"] = NETWORK_FEED;
+ $header["network"] = Protocol::FEED;
$header["wall"] = 0;
$header["origin"] = 0;
$header["gravity"] = GRAVITY_PARENT;
if (!$simulate) {
$condition = ["`uid` = ? AND `uri` = ? AND `network` IN (?, ?)",
- $importer["uid"], $item["uri"], NETWORK_FEED, NETWORK_DFRN];
+ $importer["uid"], $item["uri"], Protocol::FEED, Protocol::DFRN];
$previous = Item::selectFirst(['id'], $condition);
- if (DBM::is_result($previous)) {
+ if (DBA::isResult($previous)) {
logger("Item with uri ".$item["uri"]." for user ".$importer["uid"]." already existed under id ".$previous["id"], LOGGER_DEBUG);
continue;
}