]> git.mxchange.org Git - friendica.git/commitdiff
Remove obsolete references to item.parent-uri
authorHypolite Petovan <hypolite@mrpetovan.com>
Mon, 9 Nov 2020 16:13:18 +0000 (11:13 -0500)
committerHypolite Petovan <hypolite@mrpetovan.com>
Sat, 14 Nov 2020 15:08:50 +0000 (10:08 -0500)
include/api.php
mod/photos.php
src/Model/Event.php
src/Model/Item.php
src/Module/Contact/Poke.php
src/Worker/OnePoll.php

index 87ce982b099fb9f5667160354315096dbe8cdc54..5969ccd5f1a87974606ab44edbe3dd015d51218b 100644 (file)
@@ -4766,7 +4766,6 @@ function post_photo_item($hash, $allow_cid, $deny_cid, $allow_gid, $deny_gid, $f
        $arr['guid']          = System::createUUID();
        $arr['uid']           = intval(api_user());
        $arr['uri']           = $uri;
-       $arr['parent-uri']    = $uri;
        $arr['type']          = 'photo';
        $arr['wall']          = 1;
        $arr['resource-id']   = $hash;
index bba12aaceb2a801455dd9fea471f05d5b83e58ec..e94a3ed8d33a121b857c240898cd93d38977b320 100644 (file)
@@ -395,7 +395,6 @@ function photos_post(App $a)
                        $arr['guid']          = System::createUUID();
                        $arr['uid']           = $page_owner_uid;
                        $arr['uri']           = $uri;
-                       $arr['parent-uri']    = $uri;
                        $arr['post-type']     = Item::PT_IMAGE;
                        $arr['wall']          = 1;
                        $arr['resource-id']   = $photo['resource-id'];
@@ -560,7 +559,6 @@ function photos_post(App $a)
                                        $arr['guid']          = System::createUUID();
                                        $arr['uid']           = $page_owner_uid;
                                        $arr['uri']           = $uri;
-                                       $arr['parent-uri']    = $uri;
                                        $arr['wall']          = 1;
                                        $arr['contact-id']    = $owner_record['id'];
                                        $arr['owner-name']    = $owner_record['name'];
@@ -791,7 +789,6 @@ function photos_post(App $a)
        $arr['guid']          = System::createUUID();
        $arr['uid']           = $page_owner_uid;
        $arr['uri']           = $uri;
-       $arr['parent-uri']    = $uri;
        $arr['type']          = 'photo';
        $arr['wall']          = 1;
        $arr['resource-id']   = $resource_id;
index 6f8ed123c17396bc4fd6e45f8405e13e33018967..5139abc43420e7aa0a443f47b5620eeaa75d4bee 100644 (file)
@@ -347,7 +347,6 @@ class Event
                                $item_arr['uid']           = $event['uid'];
                                $item_arr['contact-id']    = $event['cid'];
                                $item_arr['uri']           = $event['uri'];
-                               $item_arr['parent-uri']    = $event['uri'];
                                $item_arr['guid']          = $event['guid'];
                                $item_arr['plink']         = $arr['plink'] ?? '';
                                $item_arr['post-type']     = Item::PT_EVENT;
index c03722372f67608dba58847ac0f206717398a585..e67b862346ab0bbd8d8603afb7bdaa4c7fa9e103 100644 (file)
@@ -1633,7 +1633,6 @@ class Item
                $item['coord']         = trim($item['coord'] ?? '');
                $item['visible']       = (isset($item['visible']) ? intval($item['visible']) : 1);
                $item['deleted']       = 0;
-               $item['parent-uri']    = trim(($item['parent-uri'] ?? '') ?: $item['uri']);
                $item['post-type']     = ($item['post-type'] ?? '') ?: self::PT_ARTICLE;
                $item['verb']          = trim($item['verb'] ?? '');
                $item['object-type']   = trim($item['object-type'] ?? '');
@@ -2858,14 +2857,15 @@ class Item
                                unset($datarray["plink"]);
                                $datarray["uri"] = self::newURI($contact['uid'], $datarray["guid"]);
                                $datarray["uri-id"] = ItemURI::getIdByURI($datarray["uri"]);
-                               $datarray["parent-uri"] = $datarray["uri"];
-                               $datarray["thr-parent"] = $datarray["uri"];
                                $datarray["extid"] = Protocol::DFRN;
                                $urlpart = parse_url($datarray2['author-link']);
                                $datarray["app"] = $urlpart["host"];
                                if (!empty($old_uri_id)) {
                                        Post\Media::copy($old_uri_id, $datarray["uri-id"]);
                                }
+
+                               unset($datarray["parent-uri"]);
+                               unset($datarray["thr-parent"]);
                        } else {
                                $datarray['private'] = self::PUBLIC;
                        }
@@ -3297,7 +3297,6 @@ class Item
                        'network'       => Protocol::DFRN,
                        'gravity'       => GRAVITY_ACTIVITY,
                        'parent'        => $item['id'],
-                       'parent-uri'    => $item['uri'],
                        'thr-parent'    => $item['uri'],
                        'owner-id'      => $author_id,
                        'author-id'     => $author_id,
index 9f2ae7bde684e76e3e7e8ad2d7fcc91e2ec4fc61..d9fab36c02e87a79be771242e72be4554fe0ed66 100644 (file)
@@ -67,7 +67,6 @@ class Poke extends BaseModule
                $arr['guid']          = System::createUUID();
                $arr['uid']           = $uid;
                $arr['uri']           = $uri;
-               $arr['parent-uri']    = $uri;
                $arr['wall']          = 1;
                $arr['contact-id']    = $actor['id'];
                $arr['owner-name']    = $actor['name'];
index 93dff93ae5a8d1fe4aa1109349e48226809cdde8..8f1e94580bb2d544ab92c3166ab29cf931738e78 100644 (file)
@@ -625,6 +625,7 @@ class OnePoll
                                        if (empty($datarray['parent-uri'])) {
                                                $datarray['parent-uri'] = $datarray['uri'];
                                        }
+                                       unset($datarray['parent-uri']);
 
                                        $headers = imap_headerinfo($mbox, $meta->msgno);