create third privacy state - public post but not searchable or publicly visible
This commit is contained in:
parent
43d3721fa9
commit
a3edbf7e5d
|
@ -427,12 +427,12 @@ function conversation(&$a, $items, $mode, $update, $preview = false) {
|
|||
// 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)
|
||||
|
@ -440,7 +440,7 @@ function conversation(&$a, $items, $mode, $update, $preview = false) {
|
|||
// 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;
|
||||
|
@ -485,7 +485,7 @@ function conversation(&$a, $items, $mode, $update, $preview = false) {
|
|||
|
||||
$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);
|
||||
|
@ -546,7 +546,7 @@ function conversation(&$a, $items, $mode, $update, $preview = 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) { */
|
||||
|
|
|
@ -280,7 +280,7 @@ function delivery_run($argv, $argc){
|
|||
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);
|
||||
|
@ -383,7 +383,7 @@ function delivery_run($argv, $argc){
|
|||
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);
|
||||
|
|
|
@ -466,8 +466,8 @@ function get_atom_elements($feed,$item) {
|
|||
$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;
|
||||
|
||||
|
@ -814,7 +814,7 @@ function item_store($arr,$force_parent = false) {
|
|||
// 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
|
||||
|
@ -1890,7 +1890,7 @@ function consume_feed($xml,$importer,&$contact, &$hub, $datedir = 0, $pass = 0)
|
|||
$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.
|
||||
|
@ -3035,7 +3035,7 @@ function atom_entry($item,$type,$author,$owner,$comment = false,$cid = 0) {
|
|||
$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";
|
||||
|
|
|
@ -399,7 +399,7 @@ function notifier_run($argv, $argc){
|
|||
|
||||
// private emails may be in included in public conversations. Filter them.
|
||||
|
||||
if(($public_message) && $item['private'])
|
||||
if(($public_message) && $item['private'] == 1)
|
||||
continue;
|
||||
|
||||
|
||||
|
|
|
@ -1059,12 +1059,13 @@ function feed_salmonlinks($nick) {
|
|||
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;
|
||||
}
|
||||
}}
|
||||
|
|
|
@ -120,7 +120,7 @@ function events_post(&$a) {
|
|||
$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;
|
||||
|
|
|
@ -228,7 +228,7 @@ function item_post(&$a) {
|
|||
|| 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'];
|
||||
|
|
|
@ -33,7 +33,7 @@ function lockview_content(&$a) {
|
|||
$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 />';
|
||||
|
|
|
@ -15,7 +15,7 @@ function share_init(&$a) {
|
|||
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 = '';
|
||||
|
|
Loading…
Reference in a new issue