From 3a1a4d62d95c63322ea5b9b91a0ad44f1b5a0e5c Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 24 Jan 2012 16:23:30 -0800 Subject: bug #254 --- include/conversation.php | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'include/conversation.php') diff --git a/include/conversation.php b/include/conversation.php index d05b3be5c..20c7b2a51 100755 --- a/include/conversation.php +++ b/include/conversation.php @@ -116,6 +116,34 @@ function localize_item(&$item){ $item['body'] = sprintf( t('%1$s tagged %2$s\'s %3$s with %4$s'), $author, $objauthor, $plink, $tag ); } + if ($item['verb']=== ACTIVITY_FAVORITE){ + + if ($item['object-type']== "") + return; + + $Aname = $item['author-name']; + $Alink = $item['author-link']; + + $xmlhead="<"."?xml version='1.0' encoding='UTF-8' ?".">"; + + $obj = parse_xml_string($xmlhead.$item['object']); + if(strlen($obj->id)) { + $r = q("select * from item where uri = '%s' and uid = %d limit 1", + dbesc($obj->id), + intval($item['uid']) + ); + if(count($r) && $r[0]['plink']) { + $target = $r[0]; + $Bname = $target['author-name']; + $Blink = $target['author-link']; + $A = '[url=' . $Alink . ']' . $Aname . '[/url]'; + $B = '[url=' . $Blink . ']' . $Bname . '[/url]'; + $P = '[url=' . $target['plink'] . ']' . t('post/item') . '[/url]'; + $item['body'] = sprintf( t('%1$s marked %2$s\'s %3$s as favorite'), $A, $B, $P)."\n"; + + } + } + } } -- cgit v1.2.3