X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=mod%2Fsubthread.php;h=0745fc0eef4948a204f61581aedc7994a0e045c5;hb=fa3fa42d966e00534aa6cbf33d60ef438a8e3b97;hp=c29a9b87c2cfd9ea430dc298a4544067ef0ae327;hpb=ea6ced83594ad86cc557c13748db04b63dcbff89;p=friendica.git
diff --git a/mod/subthread.php b/mod/subthread.php
index c29a9b87c2..0745fc0eef 100644
--- a/mod/subthread.php
+++ b/mod/subthread.php
@@ -1,11 +1,12 @@
get_hostname(),$owner_uid);
$post_type = (($item['resource-id']) ? t('photo') : t('status'));
- $objtype = (($item['resource-id']) ? ACTIVITY_OBJ_PHOTO : ACTIVITY_OBJ_NOTE );
- $link = xmlify('' . "\n") ;
+ $objtype = (($item['resource-id']) ? ACTIVITY_OBJ_IMAGE : ACTIVITY_OBJ_NOTE );
+ $link = xmlify('' . "\n") ;
$body = $item['body'];
$obj = <<< EOT
@@ -102,11 +104,13 @@ function subthread_content(&$a) {
EOT;
$bodyverb = t('%1$s is following %2$s\'s %3$s');
- if(! isset($bodyverb))
- return;
+ if (! isset($bodyverb)) {
+ return;
+ }
$arr = array();
+ $arr['guid'] = get_guid(32);
$arr['uri'] = $uri;
$arr['uid'] = $owner_uid;
$arr['contact-id'] = $contact['id'];
@@ -123,10 +127,10 @@ EOT;
$arr['author-name'] = $contact['name'];
$arr['author-link'] = $contact['url'];
$arr['author-avatar'] = $contact['thumb'];
-
+
$ulink = '[url=' . $contact['url'] . ']' . $contact['name'] . '[/url]';
$alink = '[url=' . $item['author-link'] . ']' . $item['author-name'] . '[/url]';
- $plink = '[url=' . $a->get_baseurl() . '/display/' . $owner['nickname'] . '/' . $item['id'] . ']' . $post_type . '[/url]';
+ $plink = '[url=' . App::get_baseurl() . '/display/' . $owner['nickname'] . '/' . $item['id'] . ']' . $post_type . '[/url]';
$arr['body'] = sprintf( $bodyverb, $ulink, $alink, $plink );
$arr['verb'] = $activity;
@@ -140,14 +144,14 @@ EOT;
$arr['unseen'] = 1;
$arr['last-child'] = 0;
- $post_id = item_store($arr);
+ $post_id = item_store($arr);
- if(! $item['visible']) {
- $r = q("UPDATE `item` SET `visible` = 1 WHERE `id` = %d AND `uid` = %d LIMIT 1",
+ if (! $item['visible']) {
+ $r = q("UPDATE `item` SET `visible` = 1 WHERE `id` = %d AND `uid` = %d",
intval($item['id']),
intval($owner_uid)
);
- }
+ }
$arr['id'] = $post_id;