Avoid duplicates with feeds and "remote self"
This commit is contained in:
parent
07f93b9636
commit
8786bcdf0a
2 changed files with 13 additions and 6 deletions
|
|
@ -407,10 +407,12 @@ function item_store($arr,$force_parent = false, $notify = false, $dontcache = fa
|
|||
// We have to avoid duplicates. So we create the GUID in form of a hash of the plink or uri.
|
||||
// In difference to the call to "uri_to_guid" several lines below we add the hash of our own host.
|
||||
// This is done because our host is the original creator of the post.
|
||||
if (isset($arr['plink'])) {
|
||||
$arr['guid'] = uri_to_guid($arr['plink'], $a->get_hostname());
|
||||
} elseif (isset($arr['uri'])) {
|
||||
$arr['guid'] = uri_to_guid($arr['uri'], $a->get_hostname());
|
||||
if (!isset($arr['guid'])) {
|
||||
if (isset($arr['plink'])) {
|
||||
$arr['guid'] = uri_to_guid($arr['plink'], $a->get_hostname());
|
||||
} elseif (isset($arr['uri'])) {
|
||||
$arr['guid'] = uri_to_guid($arr['uri'], $a->get_hostname());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue