From a3edbf7e5d0d89e99c2249cf30657b1fbc57982a Mon Sep 17 00:00:00 2001 From: friendica Date: Thu, 28 Jun 2012 17:43:29 -0700 Subject: create third privacy state - public post but not searchable or publicly visible --- include/items.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'include/items.php') diff --git a/include/items.php b/include/items.php index 7d3ed4fa9..494a54734 100755 --- a/include/items.php +++ b/include/items.php @@ -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 .= '' . xmlify($item['coord']) . '' . "\r\n"; if(($item['private']) || strlen($item['allow_cid']) || strlen($item['allow_gid']) || strlen($item['deny_cid']) || strlen($item['deny_gid'])) - $o .= '1' . "\r\n"; + $o .= '' . (($item['private']) ? $item['private'] : 1) . '' . "\r\n"; if($item['extid']) $o .= '' . xmlify($item['extid']) . '' . "\r\n"; -- cgit v1.2.3