toggle diaspora protocol on a per-channel level in addition to the existing per site setting. Default is enabled if the site setting is enabled.
This commit is contained in:
@@ -135,6 +135,15 @@ function new_contact($uid,$url,$channel,$interactive = false, $confirm = false)
|
||||
$result['message'] = t('Protocol disabled.');
|
||||
return $result;
|
||||
}
|
||||
|
||||
$allowed = get_pconfig($uid,'system','diaspora_allowed');
|
||||
if($allowed === false)
|
||||
$allowed = 1;
|
||||
|
||||
if(! intval($allowed)) {
|
||||
$result['message'] = t('Protocol blocked for this channel.');
|
||||
return $result;
|
||||
}
|
||||
}
|
||||
|
||||
$their_perms = 0;
|
||||
|
Reference in New Issue
Block a user