diff options
author | friendica <info@friendica.com> | 2014-08-06 19:24:46 -0700 |
---|---|---|
committer | friendica <info@friendica.com> | 2014-08-06 19:24:46 -0700 |
commit | 86bccf35a24019830fc54ac781f985d9add6eddf (patch) | |
tree | 026acd374d9de16fdcec4a75d6f86adb1d52cb5a /mod | |
parent | afac37917761d726a4c046d2f42bb4e427574895 (diff) | |
download | volse-hubzilla-86bccf35a24019830fc54ac781f985d9add6eddf.tar.gz volse-hubzilla-86bccf35a24019830fc54ac781f985d9add6eddf.tar.bz2 volse-hubzilla-86bccf35a24019830fc54ac781f985d9add6eddf.zip |
basic 'notpublic' bits working
Diffstat (limited to 'mod')
-rw-r--r-- | mod/item.php | 14 | ||||
-rw-r--r-- | mod/lockview.php | 5 |
2 files changed, 17 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; diff --git a/mod/lockview.php b/mod/lockview.php index 0ea708c80..8903bdec6 100644 --- a/mod/lockview.php +++ b/mod/lockview.php @@ -26,6 +26,11 @@ function lockview_content(&$a) { $item = $r[0]; + if(array_key_exists('public_policy',$item) && $item['public_policy']) { + echo '<li>' . translate_scope($item['public_policy']) . '</li>'; + killme(); + } + if($item['uid'] != local_user()) { echo '<li>' . t('Remote privacy information not available.') . '</li>'; killme(); |