X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fsubthread.php;h=dc8dcc1a9e27d06bc02acf38567db1a26ab88a90;hb=0454d0a670e051e8519e9a4220606f83d1408214;hp=a00196825bbe4dfb09bfb0be837f9093f8d9c45a;hpb=f42d76858655fc62dfbd05c0bcf2f6a49ea0bf30;p=friendica.git
diff --git a/mod/subthread.php b/mod/subthread.php
index a00196825b..dc8dcc1a9e 100644
--- a/mod/subthread.php
+++ b/mod/subthread.php
@@ -1,11 +1,19 @@
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") ;
+ $link = xmlify('' . "\n") ;
$body = $item['body'];
$obj = <<< EOT
@@ -102,13 +109,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;
@@ -130,7 +137,7 @@ EOT;
$ulink = '[url=' . $contact['url'] . ']' . $contact['name'] . '[/url]';
$alink = '[url=' . $item['author-link'] . ']' . $item['author-name'] . '[/url]';
- $plink = '[url=' . App::get_baseurl() . '/display/' . $owner['nickname'] . '/' . $item['id'] . ']' . $post_type . '[/url]';
+ $plink = '[url=' . System::baseUrl() . '/display/' . $owner['nickname'] . '/' . $item['id'] . ']' . $post_type . '[/url]';
$arr['body'] = sprintf( $bodyverb, $ulink, $alink, $plink );
$arr['verb'] = $activity;
@@ -142,9 +149,8 @@ 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",
@@ -155,7 +161,7 @@ EOT;
$arr['id'] = $post_id;
- call_hooks('post_local_end', $arr);
+ Addon::callHooks('post_local_end', $arr);
killme();