$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);
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 );
$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'];