aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2018-02-12 21:43:04 -0800
committerzotlabs <mike@macgirvin.com>2018-02-12 21:43:04 -0800
commitfd81a4bdc4f1c80d9dd73358452f50bc6422afef (patch)
tree1afdc31d848a4574f374d4c6c3ac78ff88747386 /Zotlabs
parentb7fb78245aca724248cc721134a360276a9f6d9c (diff)
downloadvolse-hubzilla-fd81a4bdc4f1c80d9dd73358452f50bc6422afef.tar.gz
volse-hubzilla-fd81a4bdc4f1c80d9dd73358452f50bc6422afef.tar.bz2
volse-hubzilla-fd81a4bdc4f1c80d9dd73358452f50bc6422afef.zip
initial share refactor
Diffstat (limited to 'Zotlabs')
-rw-r--r--Zotlabs/Module/Item.php17
1 files changed, 16 insertions, 1 deletions
diff --git a/Zotlabs/Module/Item.php b/Zotlabs/Module/Item.php
index db2d64d70..73730bc99 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) {
+// $obj = get_share_activity($mtch);
+ $datarray['obj'] = $obj['obj'];
+ $datarray['obj_type'] = $obj['obj']['type'];
+ $body = str_replace($match[1][$i],$obj['body'],$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);