aboutsummaryrefslogtreecommitdiffstats
path: root/mod/item.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2014-08-06 19:24:46 -0700
committerfriendica <info@friendica.com>2014-08-06 19:24:46 -0700
commit86bccf35a24019830fc54ac781f985d9add6eddf (patch)
tree026acd374d9de16fdcec4a75d6f86adb1d52cb5a /mod/item.php
parentafac37917761d726a4c046d2f42bb4e427574895 (diff)
downloadvolse-hubzilla-86bccf35a24019830fc54ac781f985d9add6eddf.tar.gz
volse-hubzilla-86bccf35a24019830fc54ac781f985d9add6eddf.tar.bz2
volse-hubzilla-86bccf35a24019830fc54ac781f985d9add6eddf.zip
basic 'notpublic' bits working
Diffstat (limited to 'mod/item.php')
-rw-r--r--mod/item.php14
1 files changed, 12 insertions, 2 deletions
diff --git a/mod/item.php b/mod/item.php
index 9d020adaa..01c486e5c 100644
--- a/mod/item.php
+++ b/mod/item.php
@@ -80,7 +80,7 @@ function item_post(&$a) {
$pagetitle = ((x($_REQUEST,'pagetitle')) ? escape_tags($_REQUEST['pagetitle']) : '');
$layout_mid = ((x($_REQUEST,'layout_mid')) ? escape_tags($_REQUEST['layout_mid']): '');
$plink = ((x($_REQUEST,'permalink')) ? escape_tags($_REQUEST['permalink']) : '');
-
+ $public_policy = ((x($_REQUEST,'public_policy')) ? escape_tags($_REQUEST['public_policy']) : '');
/*
Check service class limits
@@ -275,12 +275,14 @@ function item_post(&$a) {
$str_contact_allow = $orig_post['allow_cid'];
$str_group_deny = $orig_post['deny_gid'];
$str_contact_deny = $orig_post['deny_cid'];
+ $public_scope = $orig_post['public_scope'];
}
if((strlen($str_group_allow))
|| strlen($str_contact_allow)
|| strlen($str_group_deny)
- || strlen($str_contact_deny)) {
+ || strlen($str_contact_deny)
+ || strlen($public_scope)) {
$private = 1;
}
@@ -377,6 +379,13 @@ function item_post(&$a) {
}
+ if((! $webpage) && (! $public_policy) && (! $private)) {
+ $public_policy = map_scope($channel['channel_r_stream'],true);
+ if($public_policy)
+ $private = 1;
+ }
+
+
$expires = '0000-00-00 00:00:00';
if(feature_enabled($profile_uid,'content_expire')) {
@@ -705,6 +714,7 @@ function item_post(&$a) {
$datarray['item_restrict'] = $item_restrict;
$datarray['item_flags'] = $item_flags;
$datarray['layout_mid'] = $layout_mid;
+ $datarray['public_policy'] = $public_policy;
$datarray['comment_policy'] = map_scope($channel['channel_w_comment']);
$datarray['term'] = $post_tags;
$datarray['plink'] = $plink;