aboutsummaryrefslogtreecommitdiffstats
path: root/mod/lockview.php
diff options
context:
space:
mode:
Diffstat (limited to 'mod/lockview.php')
-rw-r--r--mod/lockview.php17
1 files changed, 10 insertions, 7 deletions
diff --git a/mod/lockview.php b/mod/lockview.php
index 8903bdec6..e39f2707b 100644
--- a/mod/lockview.php
+++ b/mod/lockview.php
@@ -16,21 +16,17 @@ function lockview_content(&$a) {
if (!in_array($type, array('item','photo','event')))
killme();
-
+
$r = q("SELECT * FROM %s WHERE id = %d LIMIT 1",
dbesc($type),
intval($item_id)
);
+
if(! $r)
killme();
$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();
@@ -38,7 +34,13 @@ function lockview_content(&$a) {
if(($item['item_private'] == 1) && (! strlen($item['allow_cid'])) && (! strlen($item['allow_gid']))
&& (! strlen($item['deny_cid'])) && (! strlen($item['deny_gid']))) {
- echo '<li>' . t('Remote privacy information not available.') . '</li>';
+
+ // if the post is private, but public_policy is blank ("visible to the internet"), and there aren't any
+ // specific recipients, we're the recipient of a post with "bcc" or targeted recipients; so we'll just show it
+ // as unknown specific recipients. The sender will have the visibility list and will fall through to the
+ // next section.
+
+ echo '<li>' . translate_scope((! $item['public_policy']) ? 'specific' : $item['public_policy']) . '</li>';
killme();
}
@@ -83,4 +85,5 @@ function lockview_content(&$a) {
echo $o . implode($l);
killme();
+
}