X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fsubthread.php;h=3cd089d63e7df0bb8cc8c032223f834852330c59;hb=5c63de1692c5be4ca457e03fc037683909a44348;hp=db8b9ba4feb3c0169e084b18e75f0c67b896cb48;hpb=0134fa31d1ee3fb093d0979f01a300957e1b7871;p=friendica.git diff --git a/mod/subthread.php b/mod/subthread.php index db8b9ba4fe..3cd089d63e 100644 --- a/mod/subthread.php +++ b/mod/subthread.php @@ -23,7 +23,7 @@ function subthread_content(App $a) { $item_id = (($a->argc > 1) ? notags(trim($a->argv[1])) : 0); $condition = ["`parent` = ? OR `parent-uri` = ? AND `parent` = `id`", $item_id, $item_id]; - $item = Item::selectFirst(local_user(), [], $condition); + $item = Item::selectFirst([], $condition); if (empty($item_id) || !DBM::is_result($item)) { logger('subthread: no item ' . $item_id); @@ -92,7 +92,7 @@ function subthread_content(App $a) { return; } - $uri = item_new_uri($a->get_hostname(),$owner_uid); + $uri = Item::newURI($owner_uid); $post_type = (($item['resource-id']) ? L10n::t('photo') : L10n::t('status')); $objtype = (($item['resource-id']) ? ACTIVITY_OBJ_IMAGE : ACTIVITY_OBJ_NOTE ); @@ -118,14 +118,13 @@ EOT; $arr = []; - $arr['guid'] = get_guid(32); + $arr['guid'] = System::createGUID(32); $arr['uri'] = $uri; $arr['uid'] = $owner_uid; $arr['contact-id'] = $contact['id']; - $arr['type'] = 'activity'; $arr['wall'] = $item['wall']; $arr['origin'] = 1; - $arr['gravity'] = GRAVITY_LIKE; + $arr['gravity'] = GRAVITY_ACTIVITY; $arr['parent'] = $item['id']; $arr['parent-uri'] = $item['uri']; $arr['thr-parent'] = $item['uri'];