liking comments were reverted to liking the parent after sending item to another channel
This commit is contained in:
parent
c10e30631a
commit
f353b9ae3d
@ -365,7 +365,7 @@ function construct_activity_target($item) {
|
|||||||
* The purpose of this function is to apply system message length limits to
|
* The purpose of this function is to apply system message length limits to
|
||||||
* imported messages without including any embedded photos in the length
|
* imported messages without including any embedded photos in the length
|
||||||
*/
|
*/
|
||||||
if(! function_exists('limit_body_size')) {
|
|
||||||
function limit_body_size($body) {
|
function limit_body_size($body) {
|
||||||
|
|
||||||
$maxlen = get_max_import_size();
|
$maxlen = get_max_import_size();
|
||||||
@ -443,7 +443,7 @@ function limit_body_size($body) {
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
return $body;
|
return $body;
|
||||||
}}
|
}
|
||||||
|
|
||||||
function title_is_body($title, $body) {
|
function title_is_body($title, $body) {
|
||||||
|
|
||||||
@ -1339,6 +1339,7 @@ function item_store($arr,$force_parent = false) {
|
|||||||
$arr['location'] = ((x($arr,'location')) ? notags(trim($arr['location'])) : '');
|
$arr['location'] = ((x($arr,'location')) ? notags(trim($arr['location'])) : '');
|
||||||
$arr['coord'] = ((x($arr,'coord')) ? notags(trim($arr['coord'])) : '');
|
$arr['coord'] = ((x($arr,'coord')) ? notags(trim($arr['coord'])) : '');
|
||||||
$arr['parent_mid'] = ((x($arr,'parent_mid')) ? notags(trim($arr['parent_mid'])) : '');
|
$arr['parent_mid'] = ((x($arr,'parent_mid')) ? notags(trim($arr['parent_mid'])) : '');
|
||||||
|
$arr['thr_parent'] = ((x($arr,'thr_parent')) ? notags(trim($arr['thr_parent'])) : $arr['parent_mid']);
|
||||||
$arr['verb'] = ((x($arr,'verb')) ? notags(trim($arr['verb'])) : '');
|
$arr['verb'] = ((x($arr,'verb')) ? notags(trim($arr['verb'])) : '');
|
||||||
$arr['obj_type'] = ((x($arr,'obj_type')) ? notags(trim($arr['obj_type'])) : '');
|
$arr['obj_type'] = ((x($arr,'obj_type')) ? notags(trim($arr['obj_type'])) : '');
|
||||||
$arr['object'] = ((x($arr,'object')) ? trim($arr['object']) : '');
|
$arr['object'] = ((x($arr,'object')) ? trim($arr['object']) : '');
|
||||||
@ -1357,8 +1358,6 @@ function item_store($arr,$force_parent = false) {
|
|||||||
$arr['item_flags'] = ((x($arr,'item_flags')) ? intval($arr['item_flags']) : 0 );
|
$arr['item_flags'] = ((x($arr,'item_flags')) ? intval($arr['item_flags']) : 0 );
|
||||||
|
|
||||||
$arr['item_flags'] = $arr['item_flags'] | ITEM_UNSEEN;
|
$arr['item_flags'] = $arr['item_flags'] | ITEM_UNSEEN;
|
||||||
|
|
||||||
$arr['thr_parent'] = $arr['parent_mid'];
|
|
||||||
|
|
||||||
$arr['llink'] = z_root() . '/display/' . $arr['mid'];
|
$arr['llink'] = z_root() . '/display/' . $arr['mid'];
|
||||||
|
|
||||||
|
@ -49,6 +49,7 @@ function like_content(&$a) {
|
|||||||
$item = $r[0];
|
$item = $r[0];
|
||||||
|
|
||||||
$owner_uid = $item['uid'];
|
$owner_uid = $item['uid'];
|
||||||
|
$owner_aid = $item['aid'];
|
||||||
|
|
||||||
if(! perm_is_allowed($owner_uid,$observer['xchan_hash'],'post_comments')) {
|
if(! perm_is_allowed($owner_uid,$observer['xchan_hash'],'post_comments')) {
|
||||||
notice( t('Permission denied') . EOL);
|
notice( t('Permission denied') . EOL);
|
||||||
@ -140,6 +141,7 @@ function like_content(&$a) {
|
|||||||
$arr = array();
|
$arr = array();
|
||||||
|
|
||||||
$arr['mid'] = $mid;
|
$arr['mid'] = $mid;
|
||||||
|
$arr['aid'] = $owner_aid;
|
||||||
$arr['uid'] = $owner_uid;
|
$arr['uid'] = $owner_uid;
|
||||||
$arr['item_flags'] = $item_flags;
|
$arr['item_flags'] = $item_flags;
|
||||||
$arr['parent'] = $item['id'];
|
$arr['parent'] = $item['id'];
|
||||||
|
Reference in New Issue
Block a user