]> git.mxchange.org Git - friendica.git/commitdiff
Only set a prefix for the guid if it is a locally stored item
authorMichael Vogel <icarus@dabo.de>
Mon, 7 Sep 2015 21:33:02 +0000 (23:33 +0200)
committerMichael Vogel <icarus@dabo.de>
Mon, 7 Sep 2015 21:33:02 +0000 (23:33 +0200)
include/items.php

index 9a4d4d5e3c19352a19a7951126e07029bbcfc66e..b00942b5aee745b110a7bc2048f155ce4c6a4df1 100644 (file)
@@ -1209,8 +1209,13 @@ function item_store($arr,$force_parent = false, $notify = false, $dontcache = fa
                }
        }
 
+       if ($notify)
+               $guid_prefix = "";
+       else
+               $guid_prefix = $arr['network'];
+
        $arr['wall']          = ((x($arr,'wall'))          ? intval($arr['wall'])                : 0);
-       $arr['guid']          = ((x($arr,'guid'))          ? notags(trim($arr['guid']))          : get_guid(32, $arr['network']));
+       $arr['guid']          = ((x($arr,'guid'))          ? notags(trim($arr['guid']))          : get_guid(32, $guid_prefix));
        $arr['uri']           = ((x($arr,'uri'))           ? notags(trim($arr['uri']))           : $arr['guid']);
        $arr['extid']         = ((x($arr,'extid'))         ? notags(trim($arr['extid']))         : '');
        $arr['author-name']   = ((x($arr,'author-name'))   ? notags(trim($arr['author-name']))   : '');