initial share refactor
This commit is contained in:
parent
b7fb78245a
commit
fd81a4bdc4
@ -39,6 +39,7 @@ class Item extends \Zotlabs\Web\Controller {
|
|||||||
$uid = local_channel();
|
$uid = local_channel();
|
||||||
$channel = null;
|
$channel = null;
|
||||||
$observer = null;
|
$observer = null;
|
||||||
|
$datarray = [];
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -620,6 +621,21 @@ class Item extends \Zotlabs\Web\Controller {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
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++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// BBCODE end alert
|
// BBCODE end alert
|
||||||
@ -720,7 +736,6 @@ class Item extends \Zotlabs\Web\Controller {
|
|||||||
if(!$thr_parent)
|
if(!$thr_parent)
|
||||||
$thr_parent = $mid;
|
$thr_parent = $mid;
|
||||||
|
|
||||||
$datarray = array();
|
|
||||||
|
|
||||||
$item_thread_top = ((! $parent) ? 1 : 0);
|
$item_thread_top = ((! $parent) ? 1 : 0);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user