fix app display

This commit is contained in:
friendica 2013-05-21 20:52:18 -07:00
parent d72d30fabb
commit c64c79eb11
2 changed files with 8 additions and 2 deletions

View File

@ -215,9 +215,11 @@ class Item extends BaseObject {
'osparkle' => $osparkle, 'osparkle' => $osparkle,
'sparkle' => $sparkle, 'sparkle' => $sparkle,
'title' => $item['title'], 'title' => $item['title'],
'ago' => relative_date($item['created']),
'app' => $item['app'],
'str_app' => sprintf( t(' from %s'), $item['app']),
'isotime' => datetime_convert('UTC', date_default_timezone_get(), $item['created'], 'c'), 'isotime' => datetime_convert('UTC', date_default_timezone_get(), $item['created'], 'c'),
'localtime' => datetime_convert('UTC', date_default_timezone_get(), $item['created'], 'r'), 'localtime' => datetime_convert('UTC', date_default_timezone_get(), $item['created'], 'r'),
'ago' => (($item['app']) ? sprintf( t('%s from %s'),relative_date($item['created']),$item['app']) : relative_date($item['created'])),
'lock' => $lock, 'lock' => $lock,
'location' => $location, 'location' => $location,
'indent' => $indent, 'indent' => $indent,

View File

@ -135,7 +135,11 @@ function post_activity_item($arr) {
call_hooks('post_local_end', $arr); call_hooks('post_local_end', $arr);
proc_run('php','include/notifier.php','activity',$post_id); proc_run('php','include/notifier.php','activity',$post_id);
$ret['success'] = true; $ret['success'] = true;
$ret['activity'] = $ret; $r = q("select * from item where id = %d limit 1",
intval($post_id)
);
if($r)
$ret['activity'] = $r[0];
} }
return $ret; return $ret;