1
0
Fork 0

Remove obsolete references to item.parent-uri

This commit is contained in:
Hypolite Petovan 2020-11-09 11:13:18 -05:00
parent d7e1ce47bb
commit 0c3a5c815e
6 changed files with 4 additions and 10 deletions

View file

@ -4766,7 +4766,6 @@ function post_photo_item($hash, $allow_cid, $deny_cid, $allow_gid, $deny_gid, $f
$arr['guid'] = System::createUUID(); $arr['guid'] = System::createUUID();
$arr['uid'] = intval(api_user()); $arr['uid'] = intval(api_user());
$arr['uri'] = $uri; $arr['uri'] = $uri;
$arr['parent-uri'] = $uri;
$arr['type'] = 'photo'; $arr['type'] = 'photo';
$arr['wall'] = 1; $arr['wall'] = 1;
$arr['resource-id'] = $hash; $arr['resource-id'] = $hash;

View file

@ -395,7 +395,6 @@ function photos_post(App $a)
$arr['guid'] = System::createUUID(); $arr['guid'] = System::createUUID();
$arr['uid'] = $page_owner_uid; $arr['uid'] = $page_owner_uid;
$arr['uri'] = $uri; $arr['uri'] = $uri;
$arr['parent-uri'] = $uri;
$arr['post-type'] = Item::PT_IMAGE; $arr['post-type'] = Item::PT_IMAGE;
$arr['wall'] = 1; $arr['wall'] = 1;
$arr['resource-id'] = $photo['resource-id']; $arr['resource-id'] = $photo['resource-id'];
@ -560,7 +559,6 @@ function photos_post(App $a)
$arr['guid'] = System::createUUID(); $arr['guid'] = System::createUUID();
$arr['uid'] = $page_owner_uid; $arr['uid'] = $page_owner_uid;
$arr['uri'] = $uri; $arr['uri'] = $uri;
$arr['parent-uri'] = $uri;
$arr['wall'] = 1; $arr['wall'] = 1;
$arr['contact-id'] = $owner_record['id']; $arr['contact-id'] = $owner_record['id'];
$arr['owner-name'] = $owner_record['name']; $arr['owner-name'] = $owner_record['name'];
@ -791,7 +789,6 @@ function photos_post(App $a)
$arr['guid'] = System::createUUID(); $arr['guid'] = System::createUUID();
$arr['uid'] = $page_owner_uid; $arr['uid'] = $page_owner_uid;
$arr['uri'] = $uri; $arr['uri'] = $uri;
$arr['parent-uri'] = $uri;
$arr['type'] = 'photo'; $arr['type'] = 'photo';
$arr['wall'] = 1; $arr['wall'] = 1;
$arr['resource-id'] = $resource_id; $arr['resource-id'] = $resource_id;

View file

@ -347,7 +347,6 @@ class Event
$item_arr['uid'] = $event['uid']; $item_arr['uid'] = $event['uid'];
$item_arr['contact-id'] = $event['cid']; $item_arr['contact-id'] = $event['cid'];
$item_arr['uri'] = $event['uri']; $item_arr['uri'] = $event['uri'];
$item_arr['parent-uri'] = $event['uri'];
$item_arr['guid'] = $event['guid']; $item_arr['guid'] = $event['guid'];
$item_arr['plink'] = $arr['plink'] ?? ''; $item_arr['plink'] = $arr['plink'] ?? '';
$item_arr['post-type'] = Item::PT_EVENT; $item_arr['post-type'] = Item::PT_EVENT;

View file

@ -1633,7 +1633,6 @@ class Item
$item['coord'] = trim($item['coord'] ?? ''); $item['coord'] = trim($item['coord'] ?? '');
$item['visible'] = (isset($item['visible']) ? intval($item['visible']) : 1); $item['visible'] = (isset($item['visible']) ? intval($item['visible']) : 1);
$item['deleted'] = 0; $item['deleted'] = 0;
$item['parent-uri'] = trim(($item['parent-uri'] ?? '') ?: $item['uri']);
$item['post-type'] = ($item['post-type'] ?? '') ?: self::PT_ARTICLE; $item['post-type'] = ($item['post-type'] ?? '') ?: self::PT_ARTICLE;
$item['verb'] = trim($item['verb'] ?? ''); $item['verb'] = trim($item['verb'] ?? '');
$item['object-type'] = trim($item['object-type'] ?? ''); $item['object-type'] = trim($item['object-type'] ?? '');
@ -2858,14 +2857,15 @@ class Item
unset($datarray["plink"]); unset($datarray["plink"]);
$datarray["uri"] = self::newURI($contact['uid'], $datarray["guid"]); $datarray["uri"] = self::newURI($contact['uid'], $datarray["guid"]);
$datarray["uri-id"] = ItemURI::getIdByURI($datarray["uri"]); $datarray["uri-id"] = ItemURI::getIdByURI($datarray["uri"]);
$datarray["parent-uri"] = $datarray["uri"];
$datarray["thr-parent"] = $datarray["uri"];
$datarray["extid"] = Protocol::DFRN; $datarray["extid"] = Protocol::DFRN;
$urlpart = parse_url($datarray2['author-link']); $urlpart = parse_url($datarray2['author-link']);
$datarray["app"] = $urlpart["host"]; $datarray["app"] = $urlpart["host"];
if (!empty($old_uri_id)) { if (!empty($old_uri_id)) {
Post\Media::copy($old_uri_id, $datarray["uri-id"]); Post\Media::copy($old_uri_id, $datarray["uri-id"]);
} }
unset($datarray["parent-uri"]);
unset($datarray["thr-parent"]);
} else { } else {
$datarray['private'] = self::PUBLIC; $datarray['private'] = self::PUBLIC;
} }
@ -3297,7 +3297,6 @@ class Item
'network' => Protocol::DFRN, 'network' => Protocol::DFRN,
'gravity' => GRAVITY_ACTIVITY, 'gravity' => GRAVITY_ACTIVITY,
'parent' => $item['id'], 'parent' => $item['id'],
'parent-uri' => $item['uri'],
'thr-parent' => $item['uri'], 'thr-parent' => $item['uri'],
'owner-id' => $author_id, 'owner-id' => $author_id,
'author-id' => $author_id, 'author-id' => $author_id,

View file

@ -67,7 +67,6 @@ class Poke extends BaseModule
$arr['guid'] = System::createUUID(); $arr['guid'] = System::createUUID();
$arr['uid'] = $uid; $arr['uid'] = $uid;
$arr['uri'] = $uri; $arr['uri'] = $uri;
$arr['parent-uri'] = $uri;
$arr['wall'] = 1; $arr['wall'] = 1;
$arr['contact-id'] = $actor['id']; $arr['contact-id'] = $actor['id'];
$arr['owner-name'] = $actor['name']; $arr['owner-name'] = $actor['name'];

View file

@ -625,6 +625,7 @@ class OnePoll
if (empty($datarray['parent-uri'])) { if (empty($datarray['parent-uri'])) {
$datarray['parent-uri'] = $datarray['uri']; $datarray['parent-uri'] = $datarray['uri'];
} }
unset($datarray['parent-uri']);
$headers = imap_headerinfo($mbox, $meta->msgno); $headers = imap_headerinfo($mbox, $meta->msgno);