]> git.mxchange.org Git - friendica.git/blobdiff - include/feed.php
Merge pull request #2347 from annando/1602-dfrn-forum
[friendica.git] / include / feed.php
index dd360a07b58bf46df256c3143e97329435617a1f..eb91f7efd465b76dee003bdbe1fbb00f9b4587db 100644 (file)
@@ -120,6 +120,8 @@ function feed_import($xml,$importer,&$contact, &$hub) {
        if (!is_object($entries))
                return;
 
+       $entrylist = array();
+
        foreach ($entries AS $entry)
                $entrylist[] = $entry;
 
@@ -201,14 +203,14 @@ function feed_import($xml,$importer,&$contact, &$hub) {
 
                //$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` IN ('%s', '%s')",
+                       intval($importer["uid"]), dbesc($item["uri"]), dbesc(NETWORK_FEED), dbesc(NETWORK_DFRN));
                if ($r) {
                        logger("Item with uri ".$item["uri"]." for user ".$importer["uid"]." already existed under id ".$r[0]["id"], LOGGER_DEBUG);
                        continue;
                }
 
-               // To-Do?
+               /// @TODO ?
                // <category>Ausland</category>
                // <media:thumbnail width="152" height="76" url="http://www.taz.de/picture/667875/192/14388767.jpg"/>