diff options
author | Mario Vavti <mario@mariovavti.com> | 2018-02-14 10:29:36 +0100 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2018-02-14 10:29:36 +0100 |
commit | 033608292007a726b6fdffe839f6e481939f7a1d (patch) | |
tree | c52832c098233d9795a74b0d24af097af0d2a494 /Zotlabs/Module/Item.php | |
parent | 27baf46eb576002511f188268574aaff9ad16a6b (diff) | |
parent | 24da5d82db8316a54ccb41616e0e2acb5d73fc84 (diff) | |
download | volse-hubzilla-033608292007a726b6fdffe839f6e481939f7a1d.tar.gz volse-hubzilla-033608292007a726b6fdffe839f6e481939f7a1d.tar.bz2 volse-hubzilla-033608292007a726b6fdffe839f6e481939f7a1d.zip |
Merge remote-tracking branch 'mike/master' into dev
Diffstat (limited to 'Zotlabs/Module/Item.php')
-rw-r--r-- | Zotlabs/Module/Item.php | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/Zotlabs/Module/Item.php b/Zotlabs/Module/Item.php index db2d64d70..3f857030b 100644 --- a/Zotlabs/Module/Item.php +++ b/Zotlabs/Module/Item.php @@ -39,6 +39,7 @@ class Item extends \Zotlabs\Web\Controller { $uid = local_channel(); $channel = null; $observer = null; + $datarray = []; /** @@ -619,6 +620,21 @@ class Item extends \Zotlabs\Web\Controller { $i++; } } + + + if(preg_match_all('/(\[share=(.*?)\](.*?)\[\/share\])/',$body,$match)) { + // process share by id + + $verb = ACTIVITY_SHARE; + $i = 0; + foreach($match[2] as $mtch) { + $reshare = new \Zotlabs\Lib\Share($mtch); + $datarray['obj'] = $reshare->obj(); + $datarray['obj_type'] = $datarray['obj']['type']; + $body = str_replace($match[1][$i],$reshare->bbcode(),$body); + $i++; + } + } } @@ -720,7 +736,6 @@ class Item extends \Zotlabs\Web\Controller { if(!$thr_parent) $thr_parent = $mid; - $datarray = array(); $item_thread_top = ((! $parent) ? 1 : 0); |