aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2015-01-14 18:36:23 -0800
committerfriendica <info@friendica.com>2015-01-14 18:36:23 -0800
commit168b67fa41b74a23a321e184cd8988644ec55dce (patch)
tree077859bacc2b8ed5e1ed1d1a82e3858850f4b798 /include
parentd6ae124bbd549629ec7d76bb1b1555d1344ac8b4 (diff)
downloadvolse-hubzilla-168b67fa41b74a23a321e184cd8988644ec55dce.tar.gz
volse-hubzilla-168b67fa41b74a23a321e184cd8988644ec55dce.tar.bz2
volse-hubzilla-168b67fa41b74a23a321e184cd8988644ec55dce.zip
correct some activity object types (for comments), also fix a foreach warning resulting from recent tag work
Diffstat (limited to 'include')
-rwxr-xr-xinclude/items.php9
1 files changed, 7 insertions, 2 deletions
diff --git a/include/items.php b/include/items.php
index e26180641..fb2f2586a 100755
--- a/include/items.php
+++ b/include/items.php
@@ -419,6 +419,9 @@ function post_activity_item($arr) {
$arr['verb'] = ((x($arr,'verb')) ? $arr['verb'] : ACTIVITY_POST);
$arr['obj_type'] = ((x($arr,'obj_type')) ? $arr['obj_type'] : ACTIVITY_OBJ_NOTE);
+ if($is_comment)
+ $arr['obj_type'] = ACTIVITY_OBJ_COMMENT;
+
$arr['allow_cid'] = ((x($arr,'allow_cid')) ? $arr['allow_cid'] : $channel['channel_allow_cid']);
$arr['allow_gid'] = ((x($arr,'allow_gid')) ? $arr['allow_gid'] : $channel['channel_allow_gid']);
@@ -2026,8 +2029,8 @@ function item_store($arr,$allow_exec = false) {
$arr['coord'] = ((x($arr,'coord')) ? notags(trim($arr['coord'])) : '');
$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['obj_type'] = ((x($arr,'obj_type')) ? notags(trim($arr['obj_type'])) : '');
+ $arr['verb'] = ((x($arr,'verb')) ? notags(trim($arr['verb'])) : ACTIVITY_POST);
+ $arr['obj_type'] = ((x($arr,'obj_type')) ? notags(trim($arr['obj_type'])) : ACTIVITY_OBJ_NOTE);
$arr['object'] = ((x($arr,'object')) ? trim($arr['object']) : '');
$arr['tgt_type'] = ((x($arr,'tgt_type')) ? notags(trim($arr['tgt_type'])) : '');
$arr['target'] = ((x($arr,'target')) ? trim($arr['target']) : '');
@@ -2091,6 +2094,8 @@ function item_store($arr,$allow_exec = false) {
return $ret;
}
+ if($arr['obj_type'] == ACTIVITY_OBJ_NOTE)
+ $arr['obj_type'] = ACTIVITY_OBJ_COMMENT;
// is the new message multi-level threaded?
// even though we don't support it now, preserve the info