aboutsummaryrefslogtreecommitdiffstats
path: root/include/items.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2012-06-28 17:43:29 -0700
committerfriendica <info@friendica.com>2012-06-28 17:43:29 -0700
commita3edbf7e5d0d89e99c2249cf30657b1fbc57982a (patch)
tree75d20b8a787b229c0fdbb48861b4a064e35c31fb /include/items.php
parent43d3721fa92f21007f45427eea35810a3b8545c6 (diff)
downloadvolse-hubzilla-a3edbf7e5d0d89e99c2249cf30657b1fbc57982a.tar.gz
volse-hubzilla-a3edbf7e5d0d89e99c2249cf30657b1fbc57982a.tar.bz2
volse-hubzilla-a3edbf7e5d0d89e99c2249cf30657b1fbc57982a.zip
create third privacy state - public post but not searchable or publicly visible
Diffstat (limited to 'include/items.php')
-rwxr-xr-xinclude/items.php10
1 files changed, 5 insertions, 5 deletions
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 .= '<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";