aboutsummaryrefslogtreecommitdiffstats
path: root/view/acl_selectors.php
diff options
context:
space:
mode:
authorMike Macgirvin <mike@macgirvin.com>2010-07-12 23:08:07 -0700
committerMike Macgirvin <mike@macgirvin.com>2010-07-12 23:08:07 -0700
commit7e16f8cdae597cc8329c3cc9ce769d512ba84085 (patch)
treecf16a878c11fefc2e60950792cc028016cc0a8d0 /view/acl_selectors.php
parenta4dbd6657ca48131731da050c5378be8c84eda0e (diff)
downloadvolse-hubzilla-7e16f8cdae597cc8329c3cc9ce769d512ba84085.tar.gz
volse-hubzilla-7e16f8cdae597cc8329c3cc9ce769d512ba84085.tar.bz2
volse-hubzilla-7e16f8cdae597cc8329c3cc9ce769d512ba84085.zip
groups and acls
Diffstat (limited to 'view/acl_selectors.php')
-rw-r--r--view/acl_selectors.php11
1 files changed, 6 insertions, 5 deletions
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 .= "<select name=\"{$selname}[]\" class=\"$selclass\" multiple=\"multiple\" size=\"4\" />\r\n";
- $r = q("SELECT * FROM `group` WHERE `uid` = %d",
+ $r = q("SELECT * FROM `group` WHERE `uid` = %d 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['name'], $preselected))
$selected = " selected=\"selected\" ";
else
$selected = '';
+
$o .= "<option value=\"{$rr['name']}\" $selected >{$rr['name']}</option>\r\n";
}
@@ -35,17 +36,17 @@ function contact_select($selname,$selclass,$preselected = false) {
$o .= "<select name=\"{$selname}[]\" class=\"$selclass\" multiple=\"multiple\" size=\"4\" />\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 .= "<option value=\"{$rr['name']}\" $selected >{$rr['name']}</option>\r\n";
+ $o .= "<option value=\"{$rr['id']}\" $selected >{$rr['name']}</option>\r\n";
}
}