aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2014-08-22 17:34:18 -0700
committerfriendica <info@friendica.com>2014-08-22 17:34:18 -0700
commit38f931618c779a0e10fb2549af8f35ac1c700268 (patch)
treeea9ac16120a4d2d105dfa37ca2639fbe35bd517e
parentaa4bf824a44e03e7eeba2d5489e94cdb69dc6f14 (diff)
downloadvolse-hubzilla-38f931618c779a0e10fb2549af8f35ac1c700268.tar.gz
volse-hubzilla-38f931618c779a0e10fb2549af8f35ac1c700268.tar.bz2
volse-hubzilla-38f931618c779a0e10fb2549af8f35ac1c700268.zip
"false" issue
-rwxr-xr-xinclude/items.php13
1 files changed, 9 insertions, 4 deletions
diff --git a/include/items.php b/include/items.php
index c0bc0ef83..12e00ddc9 100755
--- a/include/items.php
+++ b/include/items.php
@@ -2672,6 +2672,7 @@ function tgroup_check($uid,$item) {
function start_delivery_chain($channel,$item,$item_id,$parent) {
+
// Change this copy of the post to a forum head message and deliver to all the tgroup members
// also reset all the privacy bits to the forum default permissions
@@ -2708,16 +2709,20 @@ function start_delivery_chain($channel,$item,$item_id,$parent) {
if(!($flag_bits & ITEM_OBSCURED)) {
$key = get_config('system','pubkey');
$flag_bits = $flag_bits|ITEM_OBSCURED;
- $title = json_encode(aes_encapsulate($title,$key));
- $body = json_encode(aes_encapsulate($body,$key));
+ if($title)
+ $title = json_encode(aes_encapsulate($title,$key));
+ if($body)
+ $body = json_encode(aes_encapsulate($body,$key));
}
}
else {
if($flag_bits & ITEM_OBSCURED) {
$key = get_config('system','prvkey');
$flag_bits = $flag_bits ^ ITEM_OBSCURED;
- $title = json_encode(aes_unencapsulate($title,$key));
- $body = json_encode(aes_unencapsulate($body,$key));
+ if($title)
+ $title = crypto_unencapsulate(json_decode($title,true),$key);
+ if($body)
+ $body = crypto_unencapsulate(json_decode($body,true),$key);
}
}