mirror of
https://git.sekbaer.de/Friendica/friendica.git
synced 2025-06-17 04:15:15 +02:00
Remove construct_acl_data()
This commit is contained in:
parent
04589ecd38
commit
d9c6417f5d
8 changed files with 3 additions and 50 deletions
|
@ -386,43 +386,6 @@ function populate_acl($user = null, $show_jotnets = false) {
|
|||
|
||||
}
|
||||
|
||||
function construct_acl_data(App $a, $user) {
|
||||
// This function is now deactivated. It seems as if the generated data isn't used anywhere.
|
||||
/// @todo Remove this function and all function calls before releasing Friendica 3.5.3
|
||||
return;
|
||||
|
||||
// Get group and contact information for html ACL selector
|
||||
$acl_data = acl_lookup($a, 'html');
|
||||
|
||||
$user_defaults = get_acl_permissions($user);
|
||||
|
||||
if ($acl_data['groups']) {
|
||||
foreach ($acl_data['groups'] as $key => $group) {
|
||||
// Add a "selected" flag to groups that are posted to by default
|
||||
if ($user_defaults['allow_gid'] &&
|
||||
in_array($group['id'], $user_defaults['allow_gid']) && !in_array($group['id'], $user_defaults['deny_gid']) ) {
|
||||
$acl_data['groups'][$key]['selected'] = 1;
|
||||
} else {
|
||||
$acl_data['groups'][$key]['selected'] = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($acl_data['contacts']) {
|
||||
foreach ($acl_data['contacts'] as $key => $contact) {
|
||||
// Add a "selected" flag to groups that are posted to by default
|
||||
if ($user_defaults['allow_cid'] &&
|
||||
in_array($contact['id'], $user_defaults['allow_cid']) && !in_array($contact['id'], $user_defaults['deny_cid']) ) {
|
||||
$acl_data['contacts'][$key]['selected'] = 1;
|
||||
} else {
|
||||
$acl_data['contacts'][$key]['selected'] = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $acl_data;
|
||||
|
||||
}
|
||||
|
||||
function acl_lookup(App $a, $out_type = 'json') {
|
||||
|
||||
if (!local_user()) {
|
||||
|
|
|
@ -1361,7 +1361,6 @@ function status_editor(App $a, $x, $notes_cid = 0, $popup = false)
|
|||
|
||||
// ACL permissions box
|
||||
'$acl' => $x['acl'],
|
||||
'$acl_data' => $x['acl_data'],
|
||||
'$group_perms' => t('Post to Groups'),
|
||||
'$contact_perms' => t('Post to Contacts'),
|
||||
'$private' => t('Private post'),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue