Public exposure warning on affected network group pages. config-able so a plugin can shut it up.

This commit is contained in:
Friendika 2011-04-03 20:41:40 -07:00
commit 9b50b0e16f
4 changed files with 26 additions and 7 deletions

View file

@ -54,6 +54,14 @@ function network_content(&$a, $update = 0) {
}
if(! $update) {
if(group) {
if(($t = group_public_members($group)) && (! get_pconfig(local_user(),'system','nowarn_insecure'))) {
$plural_form = sprintf( tt('%d member', '%d members', $t), $t);
notice( sprintf( t('Warning: This group contains %s from an insecure network.'), $plural_form ) . EOL);
notice( t('Private messages to this group are at risk of public disclosure.') . EOL);
}
}
$o .= '<script> $(document).ready(function() { $(\'#nav-network-link\').addClass(\'nav-selected\'); });</script>';
$_SESSION['return_url'] = $a->cmd;