diff options
author | redmatrix <redmatrix@redmatrix.me> | 2015-08-27 22:20:30 -0700 |
---|---|---|
committer | redmatrix <redmatrix@redmatrix.me> | 2015-08-27 22:20:30 -0700 |
commit | ca0bc2bb7bc2b9e7d81a356a394d47bcb688004c (patch) | |
tree | c3a985dd76566bdcb34fbde227fb7fe78209bc5e /mod/chat.php | |
parent | 3fbb955cf23c5f92ba96086841ac6a2c510d4870 (diff) | |
download | volse-hubzilla-ca0bc2bb7bc2b9e7d81a356a394d47bcb688004c.tar.gz volse-hubzilla-ca0bc2bb7bc2b9e7d81a356a394d47bcb688004c.tar.bz2 volse-hubzilla-ca0bc2bb7bc2b9e7d81a356a394d47bcb688004c.zip |
more work on AccessList integration
Diffstat (limited to 'mod/chat.php')
-rw-r--r-- | mod/chat.php | 24 |
1 files changed, 10 insertions, 14 deletions
diff --git a/mod/chat.php b/mod/chat.php index c54d29313..c2c11d0ab 100644 --- a/mod/chat.php +++ b/mod/chat.php @@ -54,12 +54,11 @@ function chat_post(&$a) { goaway(z_root() . '/chat/' . $channel['channel_address']); } + $acl = new AccessList($channel); + $acl->set_from_array($_REQUEST); - $arr = array('name' => $room); - $arr['allow_gid'] = perms2str($_REQUEST['group_allow']); - $arr['allow_cid'] = perms2str($_REQUEST['contact_allow']); - $arr['deny_gid'] = perms2str($_REQUEST['group_deny']); - $arr['deny_cid'] = perms2str($_REQUEST['contact_deny']); + $arr = $acl->get(); + $arr['name'] = $room; chatroom_create($channel,$arr); @@ -158,7 +157,10 @@ function chat_content(&$a) { intval($a->profile['profile_uid']) ); if($x) { - $private = ((($x[0]['allow_cid']) || ($x[0]['allow_gid']) || ($x[0]['deny_cid']) || ($x[0]['deny_gid'])) ? true : false); + $acl = new AccessList(false); + $acl->set($x[0]); + + $private = $acl->is_private(); $room_name = $x[0]['cr_name']; if($bookmark_link) $bookmark_link .= '&url=' . z_root() . '/chat/' . argv(1) . '/' . argv(2) . '&title=' . urlencode($x[0]['cr_name']) . (($private) ? '&private=1' : '') . '&ischat=1'; @@ -192,14 +194,8 @@ function chat_content(&$a) { if(local_channel() && argc() > 2 && argv(2) === 'new') { - - - $channel_acl = array( - 'allow_cid' => $channel['channel_allow_cid'], - 'allow_gid' => $channel['channel_allow_gid'], - 'deny_cid' => $channel['channel_deny_cid'], - 'deny_gid' => $channel['channel_deny_gid'] - ); + $acl = new AccessList($channel); + $channel_acl = $acl->get(); require_once('include/acl_selectors.php'); |