// We've already parsed out like/dislike for special treatment. We can ignore them now
if(((activity_match($item['verb'],ACTIVITY_LIKE))
- || (activity_match($item['verb'],ACTIVITY_DISLIKE))))
-// && ($item['id'] != $item['parent']))
+ || (activity_match($item['verb'],ACTIVITY_DISLIKE)))
+ && ($item['id'] != $item['parent']))
continue;
$toplevelpost = (($item['id'] == $item['parent']) ? true : false);
- $toplevelprivate = false;
+
// Take care of author collapsing and comment collapsing
// (author collapsing is currently disabled)
// If there are more than two comments, squash all but the last 2.
if($toplevelpost) {
- $toplevelprivate = (($toplevelpost && $item['private']) ? true : false);
+
$item_writeable = (($item['writable'] || $item['self']) ? true : false);
$comments_seen = 0;
$redirect_url = $a->get_baseurl($ssl_state) . '/redir/' . $item['cid'] ;
- $lock = ((($item['private']) || (($item['uid'] == local_user()) && (strlen($item['allow_cid']) || strlen($item['allow_gid'])
+ $lock = ((($item['private'] == 1) || (($item['uid'] == local_user()) && (strlen($item['allow_cid']) || strlen($item['allow_gid'])
|| strlen($item['deny_cid']) || strlen($item['deny_gid']))))
? t('Private Message')
: false);
}
$likebuttons = '';
- $shareable = ((($profile_owner == local_user()) && ((! $item['private']) || $item['network'] === NETWORK_FEED)) ? true : false);
+ $shareable = ((($profile_owner == local_user()) && (! $item['private'] == 1)) ? true : false);
if($page_writeable) {
/* if($toplevelpost) { */
continue;
// private emails may be in included in public conversations. Filter them.
- if(($public_message) && $item['private'])
+ if(($public_message) && $item['private'] == 1)
continue;
$item_contact = get_item_contact($item,$icontacts);
continue;
// private emails may be in included in public conversations. Filter them.
- if(($public_message) && $item['private'])
+ if(($public_message) && $item['private'] == 1)
continue;
$item_contact = get_item_contact($item,$icontacts);
$res['last-child'] = 0;
$private = $item->get_item_tags(NAMESPACE_DFRN,'private');
- if($private && $private[0]['data'] == 1)
- $res['private'] = 1;
+ if($private && intval($private[0]['data']) > 0)
+ $res['private'] = intval($private[0]['data']);
else
$res['private'] = 0;
// email correspondents to be private even if the overall thread is not.
if($r[0]['private'])
- $arr['private'] = 1;
+ $arr['private'] = $r[0]['private'];
// Edge case. We host a public forum that was originally posted to privately.
// The original author commented, but as this is a comment, the permissions
$datarray['last-child'] = 0;
}
if($contact['network'] === NETWORK_FEED)
- $datarray['private'] = 1;
+ $datarray['private'] = 2;
// This is my contact on another system, but it's really me.
// Turn this into a wall post.
$o .= '<georss:point>' . xmlify($item['coord']) . '</georss:point>' . "\r\n";
if(($item['private']) || strlen($item['allow_cid']) || strlen($item['allow_gid']) || strlen($item['deny_cid']) || strlen($item['deny_gid']))
- $o .= '<dfrn:private>1</dfrn:private>' . "\r\n";
+ $o .= '<dfrn:private>' . (($item['private']) ? $item['private'] : 1) . '</dfrn:private>' . "\r\n";
if($item['extid'])
$o .= '<dfrn:extid>' . xmlify($item['extid']) . '</dfrn:extid>' . "\r\n";
// private emails may be in included in public conversations. Filter them.
- if(($public_message) && $item['private'])
+ if(($public_message) && $item['private'] == 1)
continue;
if(! function_exists('get_plink')) {
function get_plink($item) {
$a = get_app();
- if (x($item,'plink') && ((! $item['private']) || ($item['network'] === NETWORK_FEED))){
+ if (x($item,'plink') && ($item['private'] != 1)) {
return array(
'href' => $item['plink'],
'title' => t('link to source'),
);
- } else {
+ }
+ else {
return false;
}
}}
$datarray['allow_gid'] = $str_group_allow;
$datarray['deny_cid'] = $str_contact_deny;
$datarray['deny_gid'] = $str_group_deny;
- $datarray['private'] = $private_event;
+ $datarray['private'] = (($private_event) ? 1 : 0);
$datarray['id'] = $event_id;
$datarray['created'] = $created;
$datarray['edited'] = $edited;
|| strlen($parent_item['allow_gid'])
|| strlen($parent_item['deny_cid'])
|| strlen($parent_item['deny_gid'])) {
- $private = 1;
+ $private = (($parent_item['private']) ? $parent_item['private'] : 1);
}
$str_contact_allow = $parent_item['allow_cid'];
$deny_users = expand_acl($item['deny_cid']);
$deny_groups = expand_acl($item['deny_gid']);
- if(($item['private']) && (! strlen($item['allow_cid'])) && (! strlen($item['allow_gid']))
+ if(($item['private'] == 1) && (! strlen($item['allow_cid'])) && (! strlen($item['allow_gid']))
&& (! strlen($item['deny_cid'])) && (! strlen($item['deny_gid']))) {
echo t('Remote privacy information not available.') . '<br />';
intval($post_id),
intval(local_user())
);
- if(! count($r) || ($r[0]['private'] && ($r[0]['network'] != NETWORK_FEED)))
+ if(! count($r) || ($r[0]['private'] == 1))
killme();
$o = '';