aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfriendica <redmatrix@redmatrix.me>2015-04-20 20:14:07 -0700
committerfriendica <redmatrix@redmatrix.me>2015-04-20 20:14:07 -0700
commit53339d19a391e66635c21199484f1e4afa7b2ec7 (patch)
treeaec89b9967e032f1a1a6ead19d60d6a6c2a62de2
parent3eeea9d8f04064f26c7e31d590f7bf7ced140367 (diff)
downloadvolse-hubzilla-53339d19a391e66635c21199484f1e4afa7b2ec7.tar.gz
volse-hubzilla-53339d19a391e66635c21199484f1e4afa7b2ec7.tar.bz2
volse-hubzilla-53339d19a391e66635c21199484f1e4afa7b2ec7.zip
issue #176, sender copy of item not obscured if using private mention
-rwxr-xr-xinclude/items.php4
-rw-r--r--mod/item.php2
2 files changed, 4 insertions, 2 deletions
diff --git a/include/items.php b/include/items.php
index 01f207878..3fb1f3cfe 100755
--- a/include/items.php
+++ b/include/items.php
@@ -4813,7 +4813,7 @@ function item_remove_cid($xchan_hash,$mid,$uid) {
}
// Set item permissions based on results obtained from linkify_tags()
-function set_linkified_perms($linkified, &$str_contact_allow, &$str_group_allow, $profile_uid, $parent_item = false) {
+function set_linkified_perms($linkified, &$str_contact_allow, &$str_group_allow, $profile_uid, $parent_item = false, &$private) {
$first_access_tag = true;
foreach($linkified as $x) {
@@ -4835,10 +4835,12 @@ function set_linkified_perms($linkified, &$str_contact_allow, &$str_group_allow,
if(strpos($access_tag,'cid:') === 0) {
$str_contact_allow .= '<' . substr($access_tag,4) . '>';
$access_tag = '';
+ $private = 1;
}
elseif(strpos($access_tag,'gid:') === 0) {
$str_group_allow .= '<' . substr($access_tag,4) . '>';
$access_tag = '';
+ $private = 1;
}
}
}
diff --git a/mod/item.php b/mod/item.php
index d80241f2d..a732a9f81 100644
--- a/mod/item.php
+++ b/mod/item.php
@@ -602,7 +602,7 @@ function item_post(&$a) {
if($results) {
// Set permissions based on tag replacements
- set_linkified_perms($results, $str_contact_allow, $str_group_allow, $profile_uid, $parent_item);
+ set_linkified_perms($results, $str_contact_allow, $str_group_allow, $profile_uid, $parent_item, $private);
$post_tags = array();
foreach($results as $result) {