mirror of
https://git.sekbaer.de/Friendica/friendica.git
synced 2025-06-17 04:15:15 +02:00
Merge pull request #1696 from rabuzarus/acl-var
move jotnets to populate_acl
This commit is contained in:
commit
28f0e9a2de
19 changed files with 104 additions and 139 deletions
|
@ -27,7 +27,7 @@ function bookmarklet_content(&$a) {
|
|||
'nickname' => $a->user['nickname'],
|
||||
'lockstate' => ((is_array($a->user) && ((strlen($a->user['allow_cid'])) || (strlen($a->user['allow_gid'])) || (strlen($a->user['deny_cid'])) || (strlen($a->user['deny_gid'])))) ? 'lock' : 'unlock'),
|
||||
'default_perms' => get_acl_permissions($a->user),
|
||||
'acl' => populate_acl($a->user, $celeb),
|
||||
'acl' => populate_acl($a->user),
|
||||
'bang' => '',
|
||||
'visitor' => 'block',
|
||||
'profile_uid' => local_user(),
|
||||
|
|
|
@ -345,15 +345,13 @@ function display_content(&$a, $update = 0) {
|
|||
}
|
||||
|
||||
if ($is_owner) {
|
||||
$celeb = ((($a->user['page-flags'] == PAGE_SOAPBOX) || ($a->user['page-flags'] == PAGE_COMMUNITY)) ? true : false);
|
||||
|
||||
$x = array(
|
||||
'is_owner' => true,
|
||||
'allow_location' => $a->user['allow_location'],
|
||||
'default_location' => $a->user['default-location'],
|
||||
'nickname' => $a->user['nickname'],
|
||||
'lockstate' => ( (is_array($a->user)) && ((strlen($a->user['allow_cid'])) || (strlen($a->user['allow_gid'])) || (strlen($a->user['deny_cid'])) || (strlen($a->user['deny_gid']))) ? 'lock' : 'unlock'),
|
||||
'acl' => populate_acl($a->user, $celeb),
|
||||
'acl' => populate_acl($a->user),
|
||||
'bang' => '',
|
||||
'visitor' => 'block',
|
||||
'profile_uid' => local_user(),
|
||||
|
|
|
@ -66,8 +66,6 @@ function editpost_content(&$a) {
|
|||
else
|
||||
$lockstate = 'unlock';
|
||||
|
||||
$celeb = ((($a->user['page-flags'] == PAGE_SOAPBOX) || ($a->user['page-flags'] == PAGE_COMMUNITY)) ? true : false);
|
||||
|
||||
$jotplugins = '';
|
||||
$jotnets = '';
|
||||
|
||||
|
@ -141,7 +139,7 @@ function editpost_content(&$a) {
|
|||
'$placeholdercategory' => (feature_enabled(local_user(),'categories') ? t('Categories (comma-separated list)') : ''),
|
||||
'$emtitle' => t('Example: bob@example.com, mary@example.com'),
|
||||
'$lockstate' => $lockstate,
|
||||
'$acl' => '', // populate_acl((($group) ? $group_acl : $a->user), $celeb),
|
||||
'$acl' => '', // populate_acl((($group) ? $group_acl : $a->user)),
|
||||
'$bang' => (($group) ? '!' : ''),
|
||||
'$profile_uid' => $_SESSION['uid'],
|
||||
'$preview' => t('Preview'),
|
||||
|
|
|
@ -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)),
|
||||
'$acl' => (($cid) ? '' : populate_acl(((x($orig_event)) ? $orig_event : $a->user))),
|
||||
'$submit' => t('Submit')
|
||||
|
||||
));
|
||||
|
|
|
@ -172,8 +172,6 @@ function group_content(&$a) {
|
|||
'$form_security_token' => get_form_security_token("group_drop"),
|
||||
));
|
||||
|
||||
$celeb = ((($a->user['page-flags'] == PAGE_SOAPBOX) || ($a->user['page-flags'] == PAGE_COMMUNITY)) ? true : false);
|
||||
|
||||
|
||||
$context = $context + array(
|
||||
'$title' => t('Group Editor'),
|
||||
|
|
|
@ -466,8 +466,6 @@ function network_content(&$a, $update = 0) {
|
|||
|
||||
nav_set_selected('network');
|
||||
|
||||
$celeb = ((($a->user['page-flags'] == PAGE_SOAPBOX) || ($a->user['page-flags'] == PAGE_COMMUNITY)) ? true : false);
|
||||
|
||||
$content = "";
|
||||
|
||||
if ($cid) {
|
||||
|
@ -485,7 +483,7 @@ function network_content(&$a, $update = 0) {
|
|||
((strlen($a->user['allow_cid'])) || (strlen($a->user['allow_gid'])) ||
|
||||
(strlen($a->user['deny_cid'])) || (strlen($a->user['deny_gid']))))) ? 'lock' : 'unlock'),
|
||||
'default_perms' => get_acl_permissions($a->user),
|
||||
'acl' => populate_acl((($group || $cid || $nets) ? $def_acl : $a->user), $celeb),
|
||||
'acl' => populate_acl((($group || $cid || $nets) ? $def_acl : $a->user), true),
|
||||
'bang' => (($group || $cid || $nets) ? '!' : ''),
|
||||
'visitor' => 'block',
|
||||
'profile_uid' => local_user(),
|
||||
|
|
|
@ -46,25 +46,21 @@ function notes_content(&$a,$update = false) {
|
|||
$commpage = false;
|
||||
$commvisitor = false;
|
||||
|
||||
$celeb = false;
|
||||
|
||||
|
||||
|
||||
$x = array(
|
||||
'is_owner' => $is_owner,
|
||||
'allow_location' => (($a->user['allow_location']) ? true : false),
|
||||
'default_location' => $a->user['default-location'],
|
||||
'nickname' => $a->user['nickname'],
|
||||
'lockstate' => 'lock',
|
||||
'acl' => '',
|
||||
'bang' => '',
|
||||
'visitor' => 'block',
|
||||
'profile_uid' => local_user(),
|
||||
'allow_location' => (($a->user['allow_location']) ? true : false),
|
||||
'default_location' => $a->user['default-location'],
|
||||
'nickname' => $a->user['nickname'],
|
||||
'lockstate' => 'lock',
|
||||
'acl' => '',
|
||||
'bang' => '',
|
||||
'visitor' => 'block',
|
||||
'profile_uid' => local_user(),
|
||||
'button' => t('Save'),
|
||||
'acl_data' => '',
|
||||
);
|
||||
);
|
||||
|
||||
$o .= status_editor($a,$x,$a->contact['id']);
|
||||
$o .= status_editor($a,$x,$a->contact['id']);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -1089,8 +1089,6 @@ function photos_content(&$a) {
|
|||
}
|
||||
}
|
||||
|
||||
$celeb = ((($a->user['page-flags'] == PAGE_SOAPBOX) || ($a->user['page-flags'] == PAGE_COMMUNITY)) ? true : false);
|
||||
|
||||
$uploader = '';
|
||||
|
||||
$ret = array('post_url' => $a->get_baseurl() . '/photos/' . $a->data['user']['nickname'],
|
||||
|
@ -1139,11 +1137,11 @@ function photos_content(&$a) {
|
|||
|
||||
if($a->theme['template_engine'] === 'internal') {
|
||||
$albumselect_e = template_escape($albumselect);
|
||||
$aclselect_e = (($visitor) ? '' : template_escape(populate_acl($a->user, $celeb)));
|
||||
$aclselect_e = (($visitor) ? '' : template_escape(populate_acl($a->user)));
|
||||
}
|
||||
else {
|
||||
$albumselect_e = $albumselect;
|
||||
$aclselect_e = (($visitor) ? '' : populate_acl($a->user, $celeb));
|
||||
$aclselect_e = (($visitor) ? '' : populate_acl($a->user));
|
||||
}
|
||||
|
||||
$o .= replace_macros($tpl,array(
|
||||
|
|
|
@ -181,8 +181,6 @@ function profile_content(&$a, $update = 0) {
|
|||
$commpage = (($a->profile['page-flags'] == PAGE_COMMUNITY) ? true : false);
|
||||
$commvisitor = (($commpage && $remote_contact == true) ? true : false);
|
||||
|
||||
$celeb = ((($a->profile['page-flags'] == PAGE_SOAPBOX) || ($a->profile['page-flags'] == PAGE_COMMUNITY)) ? true : false);
|
||||
|
||||
$a->page['aside'] .= posted_date_widget($a->get_baseurl(true) . '/profile/' . $a->profile['nickname'],$a->profile['profile_uid'],true);
|
||||
$a->page['aside'] .= categories_widget($a->get_baseurl(true) . '/profile/' . $a->profile['nickname'],(x($category) ? xmlify($category) : ''));
|
||||
|
||||
|
@ -190,18 +188,20 @@ function profile_content(&$a, $update = 0) {
|
|||
|
||||
$x = array(
|
||||
'is_owner' => $is_owner,
|
||||
'allow_location' => ((($is_owner || $commvisitor) && $a->profile['allow_location']) ? true : false),
|
||||
'default_location' => (($is_owner) ? $a->user['default-location'] : ''),
|
||||
'nickname' => $a->profile['nickname'],
|
||||
'lockstate' => (((is_array($a->user) && ((strlen($a->user['allow_cid'])) || (strlen($a->user['allow_gid'])) || (strlen($a->user['deny_cid'])) || (strlen($a->user['deny_gid']))))) ? 'lock' : 'unlock'),
|
||||
'acl' => (($is_owner) ? populate_acl($a->user, $celeb) : ''),
|
||||
'bang' => '',
|
||||
'visitor' => (($is_owner || $commvisitor) ? 'block' : 'none'),
|
||||
'profile_uid' => $a->profile['profile_uid'],
|
||||
'allow_location' => ((($is_owner || $commvisitor) && $a->profile['allow_location']) ? true : false),
|
||||
'default_location' => (($is_owner) ? $a->user['default-location'] : ''),
|
||||
'nickname' => $a->profile['nickname'],
|
||||
'lockstate' => (((is_array($a->user) && ((strlen($a->user['allow_cid'])) ||
|
||||
(strlen($a->user['allow_gid'])) || (strlen($a->user['deny_cid'])) ||
|
||||
(strlen($a->user['deny_gid']))))) ? 'lock' : 'unlock'),
|
||||
'acl' => (($is_owner) ? populate_acl($a->user, true) : ''),
|
||||
'bang' => '',
|
||||
'visitor' => (($is_owner || $commvisitor) ? 'block' : 'none'),
|
||||
'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);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1097,8 +1097,6 @@ function settings_content(&$a) {
|
|||
|
||||
$stpl = get_markup_template('settings.tpl');
|
||||
|
||||
$celeb = ((($a->user['page-flags'] == PAGE_SOAPBOX) || ($a->user['page-flags'] == PAGE_COMMUNITY)) ? true : false);
|
||||
|
||||
$expire_arr = array(
|
||||
'days' => array('expire', t("Automatically expire posts after this many days:"), $expire, t('If empty, posts will not expire. Expired posts will be deleted')),
|
||||
'advanced' => t('Advanced expiration settings'),
|
||||
|
@ -1163,7 +1161,7 @@ function settings_content(&$a) {
|
|||
'$permissions' => t('Default Post Permissions'),
|
||||
'$permdesc' => t("\x28click to open/close\x29"),
|
||||
'$visibility' => $profile['net-publish'],
|
||||
'$aclselect' => populate_acl($a->user,$celeb),
|
||||
'$aclselect' => populate_acl($a->user),
|
||||
'$suggestme' => $suggestme,
|
||||
'$blockwall'=> $blockwall, // array('blockwall', t('Allow friends to post to your profile page:'), !$blockwall, ''),
|
||||
'$blocktags'=> $blocktags, // array('blocktags', t('Allow friends to tag your posts:'), !$blocktags, ''),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue