aboutsummaryrefslogtreecommitdiffstats
path: root/mod/item.php
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2010-12-19 13:41:55 -0800
committerFriendika <info@friendika.com>2010-12-19 13:41:55 -0800
commit4a2d83fcfff548e50d3138ff617c0acd99445e03 (patch)
treed24f8b088dd13f0be2b1864880a9d39d1a52acab /mod/item.php
parentd3987416c50396fdb4881240f15b563a68c43ab6 (diff)
downloadvolse-hubzilla-4a2d83fcfff548e50d3138ff617c0acd99445e03.tar.gz
volse-hubzilla-4a2d83fcfff548e50d3138ff617c0acd99445e03.tar.bz2
volse-hubzilla-4a2d83fcfff548e50d3138ff617c0acd99445e03.zip
don't send any private messages over the facebook channel
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 99721794a..f0c2cc644 100644
--- a/mod/item.php
+++ b/mod/item.php
@@ -55,6 +55,17 @@ function item_post(&$a) {
$private = ((strlen($str_group_allow) || strlen($str_contact_allow) || strlen($str_group_deny) || strlen($str_contact_deny)) ? 1 : 0);
+ if(($parent_item) &&
+ (($parent_item['private'])
+ || strlen($parent_item['allow_cid'])
+ || strlen($parent_item['allow_gid'])
+ || strlen($parent_item['deny_cid'])
+ || strlen($parent_item['deny_gid'])
+ )
+ ) {
+ $private = 1;
+ }
+
$title = notags(trim($_POST['title']));
$body = escape_tags(trim($_POST['body']));
$location = notags(trim($_POST['location']));
@@ -242,7 +253,6 @@ function item_post(&$a) {
);
// Inherit ACL's from the parent item.
- // TODO merge with subsequent UPDATE operation and save a db write
$r = q("UPDATE `item` SET `allow_cid` = '%s', `allow_gid` = '%s', `deny_cid` = '%s', `deny_gid` = '%s', `private` = %d
WHERE `id` = %d LIMIT 1",
@@ -327,7 +337,7 @@ function item_post(&$a) {
* Post to Facebook stream
*/
- if((local_user()) && (local_user() == $profile_uid)) {
+ if((local_user()) && (local_user() == $profile_uid) && (! $private)) {
$appid = get_config('system', 'facebook_appid' );
$secret = get_config('system', 'facebook_secret' );
if($appid && $secret) {