From 4b101c2240b32053fad98354585bb69ff315aec2 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Mon, 15 Aug 2016 22:54:07 +0200 Subject: provide group options serverside and minor cleanup --- include/acl_selectors.php | 119 +++++----------------------------------------- 1 file changed, 12 insertions(+), 107 deletions(-) (limited to 'include') diff --git a/include/acl_selectors.php b/include/acl_selectors.php index 148c67a6c..b10417b04 100644 --- a/include/acl_selectors.php +++ b/include/acl_selectors.php @@ -13,7 +13,7 @@ function group_select($selname,$selclass,$preselected = false,$size = 4) { $o .= "\r\n"; - else - $o .= "\r\n"; - - call_hooks(App::$module . '_post_' . $selname, $o); - - return $o; -}*/ - - - function contact_select($selname, $selclass, $preselected = false, $size = 4, $privmail = false, $celeb = false, $privatenet = false, $tabindex = null) { @@ -260,10 +154,21 @@ function populate_acl($defaults = null,$show_jotnets = true, $emptyACL_descripti call_hooks('jot_networks', $jotnets); } + $r = q("SELECT id, hash, gname FROM groups WHERE deleted = 0 AND uid = %d ORDER BY gname ASC", + intval(local_channel()) + ); + + if($r) { + foreach($r as $rr) { + $groups .= '' . "\r\n"; + } + } + $tpl = get_markup_template("acl_selector.tpl"); $o = replace_macros($tpl, array( '$showall' => $showall_caption, '$onlyme' => t('Only me'), + '$groups' => $groups, '$showallOrigin' => $showall_origin, '$showallIcon' => $showall_icon, '$select_label' => t('Who can see this?'), -- cgit v1.2.3