From 7e16f8cdae597cc8329c3cc9ce769d512ba84085 Mon Sep 17 00:00:00 2001 From: Mike Macgirvin Date: Mon, 12 Jul 2010 23:08:07 -0700 Subject: groups and acls --- view/acl_selectors.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'view/acl_selectors.php') diff --git a/view/acl_selectors.php b/view/acl_selectors.php index 02cc285c7..7a8072af6 100644 --- a/view/acl_selectors.php +++ b/view/acl_selectors.php @@ -7,16 +7,17 @@ function group_select($selname,$selclass,$preselected = false) { $o .= "\r\n"; - $r = q("SELECT `name` FROM `contact` WHERE `uid` = %d AND `self` = 0 AND `blocked` = 0 ", + $r = q("SELECT `id`, `name` FROM `contact` WHERE `uid` = %d AND `self` = 0 AND `blocked` = 0 ORDER BY `name` ASC ", $_SESSION['uid'] ); if(count($r)) { foreach($r as $rr) { - if((is_array($preselected)) && $in_array($rr['name'], $preselected)) + if((is_array($preselected)) && in_array($rr['id'], $preselected)) $selected = " selected=\"selected\" "; else $selected = ''; - $o .= "\r\n"; + $o .= "\r\n"; } } -- cgit v1.2.3