//$item["object"] = $xml;
- $r = q("SELECT `id` FROM `item` WHERE `uid` = %d AND `uri` = '%s'",
- intval($importer["uid"]), dbesc($item["uri"]));
+ $r = q("SELECT `id` FROM `item` WHERE `uid` = %d AND `uri` = '%s' AND `network` = '%s'",
+ intval($importer["uid"]), dbesc($item["uri"]), dbesc(NETWORK_FEED));
if ($r) {
logger("Item with uri ".$item["uri"]." for user ".$importer["uid"]." already existed under id ".$r[0]["id"], LOGGER_DEBUG);
continue;
$arr = $unescaped;
// find the item we just created
- $r = q("SELECT `id` FROM `item` WHERE `uri` = '%s' AND `uid` = %d ORDER BY `id` ASC ",
+ $r = q("SELECT `id` FROM `item` WHERE `uri` = '%s' AND `uid` = %d AND `network` = '%s' ORDER BY `id` ASC ",
dbesc($arr['uri']),
- intval($arr['uid'])
+ intval($arr['uid']),
+ dbesc($arr['network'])
);
if(count($r)) {