From 65286f79ed984d6e87d3fa3578ed081909eb90e2 Mon Sep 17 00:00:00 2001 From: rabuzarus <> Date: Thu, 25 Jun 2015 20:29:09 +0200 Subject: [PATCH] respect hidewall --- include/acl_selectors.php | 17 ++++++++++------- mod/events.php | 2 +- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/include/acl_selectors.php b/include/acl_selectors.php index 85a9f67592..b892c2d122 100644 --- a/include/acl_selectors.php +++ b/include/acl_selectors.php @@ -305,14 +305,17 @@ function populate_acl($user = null,$celeb = false,$show_jotnets = false) { } } - if($mail_enabled) { - $selected = (($pubmail_enabled) ? ' checked="checked" ' : ''); - $jotnets .= '
' - . t("Post to Email") . '
'; - } + if (!$user['hidewall']) { + if($mail_enabled) { + $selected = (($pubmail_enabled) ? ' checked="checked" ' : ''); + $jotnets .= '
' . t("Post to Email") . '
'; + } - call_hooks('jot_networks', $jotnets); - } + call_hooks('jot_networks', $jotnets); + } else + $jotnets .= sprintf(t('Connectors disabled, since "%s" is enabled.'), + t('Hide your profile details from unknown viewers?')); + } // We shouldn't need to prune deadguys from the block list. Either way they can't get the message. // Also no point enumerating groups and checking them, that will take place on delivery. diff --git a/mod/events.php b/mod/events.php index 92c128c1dd..e9e1af05d8 100644 --- a/mod/events.php +++ b/mod/events.php @@ -507,7 +507,7 @@ function events_content(&$a) { '$sh_text' => t('Share this event'), '$sh_checked' => $sh_checked, '$preview' => t('Preview'), - '$acl' => (($cid) ? '' : populate_acl(((x($orig_event)) ? $orig_event : $a->user),false, false)), + '$acl' => (($cid) ? '' : populate_acl(((x($orig_event)) ? $orig_event : $a->user),false)), '$submit' => t('Submit') ));