aboutsummaryrefslogtreecommitdiffstats
path: root/include/bb2diaspora.php
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2015-10-29 12:58:32 +0100
committerMario Vavti <mario@mariovavti.com>2015-10-29 12:58:32 +0100
commitec28dee728b847f2363a53fb11e003d818c8e1cb (patch)
tree56e8a965dc9522370a075a136a963791cfb80df5 /include/bb2diaspora.php
parentd66be62516c1297135d707f0d565e100651529d5 (diff)
downloadvolse-hubzilla-ec28dee728b847f2363a53fb11e003d818c8e1cb.tar.gz
volse-hubzilla-ec28dee728b847f2363a53fb11e003d818c8e1cb.tar.bz2
volse-hubzilla-ec28dee728b847f2363a53fb11e003d818c8e1cb.zip
update to latest object
Diffstat (limited to 'include/bb2diaspora.php')
-rw-r--r--include/bb2diaspora.php5
1 files changed, 2 insertions, 3 deletions
diff --git a/include/bb2diaspora.php b/include/bb2diaspora.php
index d10ed57eb..7cba40672 100644
--- a/include/bb2diaspora.php
+++ b/include/bb2diaspora.php
@@ -309,9 +309,8 @@ function bb2diaspora_itembody($item, $force_update = false) {
$is_photo = (($item['obj_type'] == ACTIVITY_OBJ_PHOTO) ? true : false);
if($is_photo) {
$object = json_decode($item['object'],true);
- if($object['link'][2]) {
- $photo_bb = '[zrl=' . rawurldecode($object['id']) . ']' . '[zmg=' . $object['link'][2]['width'] . 'x' . $object['link'][2]['height'] . ']' . rawurldecode($object['link'][2]['href']) . '[/zmg]' . '[/zrl]';
- $item['body'] = (($item['body']) ? $photo_bb . $item['body'] : $photo_bb);
+ if($object['bbcode']) {
+ $item['body'] = (($item['body']) ? $object['bbcode'] . "\r\n" . $item['body'] : $object['bbcode']);
}
}