Remove construct_acl_data()
This commit is contained in:
parent
04589ecd38
commit
d9c6417f5d
|
@ -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') {
|
function acl_lookup(App $a, $out_type = 'json') {
|
||||||
|
|
||||||
if (!local_user()) {
|
if (!local_user()) {
|
||||||
|
|
|
@ -1361,7 +1361,6 @@ function status_editor(App $a, $x, $notes_cid = 0, $popup = false)
|
||||||
|
|
||||||
// ACL permissions box
|
// ACL permissions box
|
||||||
'$acl' => $x['acl'],
|
'$acl' => $x['acl'],
|
||||||
'$acl_data' => $x['acl_data'],
|
|
||||||
'$group_perms' => t('Post to Groups'),
|
'$group_perms' => t('Post to Groups'),
|
||||||
'$contact_perms' => t('Post to Contacts'),
|
'$contact_perms' => t('Post to Contacts'),
|
||||||
'$private' => t('Private post'),
|
'$private' => t('Private post'),
|
||||||
|
|
|
@ -37,7 +37,6 @@ function bookmarklet_content(App $a)
|
||||||
'bang' => '',
|
'bang' => '',
|
||||||
'visitor' => 'block',
|
'visitor' => 'block',
|
||||||
'profile_uid' => local_user(),
|
'profile_uid' => local_user(),
|
||||||
'acl_data' => construct_acl_data($a, $a->user), // For non-Javascript ACL selector
|
|
||||||
'title' => trim($_REQUEST["title"], "*"),
|
'title' => trim($_REQUEST["title"], "*"),
|
||||||
'content' => $content
|
'content' => $content
|
||||||
);
|
);
|
||||||
|
|
|
@ -313,9 +313,8 @@ function display_content(App $a, $update = false, $update_uid = 0) {
|
||||||
'bang' => '',
|
'bang' => '',
|
||||||
'visitor' => 'block',
|
'visitor' => 'block',
|
||||||
'profile_uid' => local_user(),
|
'profile_uid' => local_user(),
|
||||||
'acl_data' => construct_acl_data($a, $a->user), // For non-Javascript ACL selector
|
|
||||||
);
|
);
|
||||||
$o .= status_editor($a,$x,0,true);
|
$o .= status_editor($a, $x, 0, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
$sql_extra = item_permissions_sql($a->profile['uid'], $remote_contact, $groups);
|
$sql_extra = item_permissions_sql($a->profile['uid'], $remote_contact, $groups);
|
||||||
|
|
|
@ -454,11 +454,10 @@ function networkFlatView(App $a, $update = 0) {
|
||||||
'bang' => '',
|
'bang' => '',
|
||||||
'visitor' => 'block',
|
'visitor' => 'block',
|
||||||
'profile_uid' => local_user(),
|
'profile_uid' => local_user(),
|
||||||
'acl_data' => construct_acl_data($a, $a->user), // For non-Javascript ACL selector
|
|
||||||
'content' => '',
|
'content' => '',
|
||||||
);
|
);
|
||||||
|
|
||||||
$o .= status_editor($a,$x);
|
$o .= status_editor($a, $x);
|
||||||
|
|
||||||
if (!Config::get('theme','hide_eventlist')) {
|
if (!Config::get('theme','hide_eventlist')) {
|
||||||
$o .= get_birthdays();
|
$o .= get_birthdays();
|
||||||
|
@ -605,12 +604,10 @@ function networkThreadedView(App $a, $update = 0) {
|
||||||
'bang' => (($group || $cid || $nets) ? '!' : ''),
|
'bang' => (($group || $cid || $nets) ? '!' : ''),
|
||||||
'visitor' => 'block',
|
'visitor' => 'block',
|
||||||
'profile_uid' => local_user(),
|
'profile_uid' => local_user(),
|
||||||
'acl_data' => construct_acl_data($a, $a->user), // For non-Javascript ACL selector
|
|
||||||
'content' => $content,
|
'content' => $content,
|
||||||
);
|
);
|
||||||
|
|
||||||
$o .= status_editor($a,$x);
|
$o .= status_editor($a, $x);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// We don't have to deal with ACLs on this page. You're looking at everything
|
// We don't have to deal with ACLs on this page. You're looking at everything
|
||||||
|
|
|
@ -1134,7 +1134,6 @@ function photos_content(App $a)
|
||||||
'$uploadurl' => $ret['post_url'],
|
'$uploadurl' => $ret['post_url'],
|
||||||
|
|
||||||
// ACL permissions box
|
// ACL permissions box
|
||||||
'$acl_data' => construct_acl_data($a, $a->user), // For non-Javascript ACL selector
|
|
||||||
'$group_perms' => t('Show to Groups'),
|
'$group_perms' => t('Show to Groups'),
|
||||||
'$contact_perms' => t('Show to Contacts'),
|
'$contact_perms' => t('Show to Contacts'),
|
||||||
'$return_path' => $a->query_string,
|
'$return_path' => $a->query_string,
|
||||||
|
@ -1482,7 +1481,6 @@ function photos_content(App $a)
|
||||||
'$delete' => t('Delete Photo'),
|
'$delete' => t('Delete Photo'),
|
||||||
|
|
||||||
// ACL permissions box
|
// ACL permissions box
|
||||||
'$acl_data' => construct_acl_data($a, $ph[0]), // For non-Javascript ACL selector
|
|
||||||
'$group_perms' => t('Show to Groups'),
|
'$group_perms' => t('Show to Groups'),
|
||||||
'$contact_perms' => t('Show to Contacts'),
|
'$contact_perms' => t('Show to Contacts'),
|
||||||
'$return_path' => $a->query_string,
|
'$return_path' => $a->query_string,
|
||||||
|
|
|
@ -210,7 +210,6 @@ function profile_content(App $a, $update = 0)
|
||||||
'bang' => '',
|
'bang' => '',
|
||||||
'visitor' => $is_owner || $commvisitor ? 'block' : 'none',
|
'visitor' => $is_owner || $commvisitor ? 'block' : 'none',
|
||||||
'profile_uid' => $a->profile['profile_uid'],
|
'profile_uid' => $a->profile['profile_uid'],
|
||||||
'acl_data' => $is_owner ? construct_acl_data($a, $a->user) : '', // For non-Javascript ACL selector
|
|
||||||
);
|
);
|
||||||
|
|
||||||
$o .= status_editor($a, $x);
|
$o .= status_editor($a, $x);
|
||||||
|
|
|
@ -1280,7 +1280,6 @@ function settings_content(App $a) {
|
||||||
'$blocktags'=> $blocktags, // array('blocktags', t('Allow friends to tag your posts:'), !$blocktags, ''),
|
'$blocktags'=> $blocktags, // array('blocktags', t('Allow friends to tag your posts:'), !$blocktags, ''),
|
||||||
|
|
||||||
// ACL permissions box
|
// ACL permissions box
|
||||||
'$acl_data' => construct_acl_data($a, $a->user), // For non-Javascript ACL selector
|
|
||||||
'$group_perms' => t('Show to Groups'),
|
'$group_perms' => t('Show to Groups'),
|
||||||
'$contact_perms' => t('Show to Contacts'),
|
'$contact_perms' => t('Show to Contacts'),
|
||||||
'$private' => t('Default Private Post'),
|
'$private' => t('Default Private Post'),
|
||||||
|
|
Loading…
Reference in a new issue