]> git.mxchange.org Git - friendica.git/commitdiff
Store guid and plink with event (#5485)
authorMichael Vogel <icarus@dabo.de>
Tue, 24 Jul 2018 14:01:31 +0000 (16:01 +0200)
committerHypolite Petovan <mrpetovan@eml.cc>
Tue, 24 Jul 2018 14:01:31 +0000 (10:01 -0400)
* Store guid and plink with event

* One space too much

src/Model/Event.php
src/Protocol/DFRN.php

index da386a77b7dbd39540d9fe11916f19f878a48775..16d1ada27a07cab999a5ef7ef46a4b84f80cf766 100644 (file)
@@ -307,7 +307,7 @@ class Event extends BaseObject
 
                        Addon::callHooks('event_updated', $event['id']);
                } else {
-                       $event['guid'] = System::createGUID(32);
+                       $event['guid']  = defaults($arr, 'guid', System::createGUID(32));
 
                        // New event. Store it.
                        DBA::insert('event', $event);
@@ -321,6 +321,7 @@ class Event extends BaseObject
                        $item_arr['uri']           = $event['uri'];
                        $item_arr['parent-uri']    = $event['uri'];
                        $item_arr['guid']          = $event['guid'];
+                       $item_arr['plink']         = defaults($arr, 'plink', '');
                        $item_arr['post-type']     = Item::PT_EVENT;
                        $item_arr['wall']          = $event['cid'] ? 0 : 1;
                        $item_arr['contact-id']    = $contact['id'];
index 29d3e7bfe835f7b14a8bd9ab6e1a0b4df66be6c4..928f44e9c732421db901dd1450ec4119073b5536 100644 (file)
@@ -2642,6 +2642,7 @@ class DFRN
                                        $ev["edited"]  = $item["edited"];
                                        $ev["private"] = $item["private"];
                                        $ev["guid"]    = $item["guid"];
+                                       $ev["plink"]   = $item["plink"];
 
                                        $r = q(
                                                "SELECT `id` FROM `event` WHERE `uri` = '%s' AND `uid` = %d LIMIT 1",