]> git.mxchange.org Git - friendica.git/blobdiff - mod/subthread.php
Just some more fixed notice
[friendica.git] / mod / subthread.php
index db8b9ba4feb3c0169e084b18e75f0c67b896cb48..3cd089d63e7df0bb8cc8c032223f834852330c59 100644 (file)
@@ -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'];