X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fsubthread.php;h=c858f2d1fa3a3c847ea132b823605d33b31496ce;hb=76fdf5c910e8cd887f6f7b83559f4c81c88f507d;hp=9200c335e1b7b457eefe2441629691fc617d15b8;hpb=390d5706f46ce58cbed24b292d5c1f1b9789a8a8;p=friendica.git diff --git a/mod/subthread.php b/mod/subthread.php index 9200c335e1..c858f2d1fa 100644 --- a/mod/subthread.php +++ b/mod/subthread.php @@ -1,12 +1,16 @@ get_hostname(),$owner_uid); - $post_type = (($item['resource-id']) ? t('photo') : t('status')); + $post_type = (($item['resource-id']) ? L10n::t('photo') : L10n::t('status')); $objtype = (($item['resource-id']) ? ACTIVITY_OBJ_IMAGE : ACTIVITY_OBJ_NOTE ); $link = xmlify('' . "\n") ; $body = $item['body']; @@ -104,13 +110,13 @@ function subthread_content(App $a) { $body EOT; - $bodyverb = t('%1$s is following %2$s\'s %3$s'); + $bodyverb = L10n::t('%1$s is following %2$s\'s %3$s'); if (! isset($bodyverb)) { return; } - $arr = array(); + $arr = []; $arr['guid'] = get_guid(32); $arr['uri'] = $uri; @@ -144,20 +150,16 @@ EOT; $arr['deny_gid'] = $item['deny_gid']; $arr['visible'] = 1; $arr['unseen'] = 1; - $arr['last-child'] = 0; - $post_id = item_store($arr); + $post_id = Item::insert($arr); - if (! $item['visible']) { - $r = q("UPDATE `item` SET `visible` = 1 WHERE `id` = %d AND `uid` = %d", - intval($item['id']), - intval($owner_uid) - ); + if (!$item['visible']) { + Item::update(['visible' => true], ['id' => $item['id']]); } $arr['id'] = $post_id; - call_hooks('post_local_end', $arr); + Addon::callHooks('post_local_end', $arr); killme();