diff options
author | redmatrix <redmatrix@redmatrix.me> | 2015-10-27 18:37:03 -0700 |
---|---|---|
committer | redmatrix <redmatrix@redmatrix.me> | 2015-10-27 18:37:03 -0700 |
commit | 65587be737e13e611f6e5ba67ee0301c312250b9 (patch) | |
tree | bed5aa3b3a2bce24b158538872f26fb3fd5d25ad /mod/share.php | |
parent | 9c24e1ccfb11ec40587b7b5aaa42429e2070ff8a (diff) | |
parent | 0147186565da99d6d89d6c2d57f5b7034fca0d68 (diff) | |
download | volse-hubzilla-65587be737e13e611f6e5ba67ee0301c312250b9.tar.gz volse-hubzilla-65587be737e13e611f6e5ba67ee0301c312250b9.tar.bz2 volse-hubzilla-65587be737e13e611f6e5ba67ee0301c312250b9.zip |
Merge https://github.com/redmatrix/hubzilla into pending_merge
Diffstat (limited to 'mod/share.php')
-rw-r--r-- | mod/share.php | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/mod/share.php b/mod/share.php index d5a389bdf..7ed6cf9a6 100644 --- a/mod/share.php +++ b/mod/share.php @@ -42,6 +42,12 @@ function share_init(&$a) { xchan_query($r); + $is_photo = (($r[0]['obj_type'] === ACTIVITY_OBJ_PHOTO) ? true : false); + if($is_photo) { + $object = json_decode($r[0]['object'],true); + $photo_bb = $object['bbcode']; + } + if (strpos($r[0]['body'], "[/share]") !== false) { $pos = strpos($r[0]['body'], "[share"); $o = substr($r[0]['body'], $pos); @@ -53,9 +59,9 @@ function share_init(&$a) { "' posted='".$r[0]['created']. "' message_id='".$r[0]['mid']."']"; if($r[0]['title']) - $o .= '[b]'.$r[0]['title'].'[/b]'."\n"; - $o .= $r[0]['body']; - $o.= "[/share]"; + $o .= '[b]'.$r[0]['title'].'[/b]'."\r\n"; + $o .= (($is_photo) ? $photo_bb . "\r\n" . $r[0]['body'] : $r[0]['body']); + $o .= "[/share]"; } if(local_channel()) { |