diff options
author | Mike Macgirvin <mike@macgirvin.com> | 2010-07-12 23:08:07 -0700 |
---|---|---|
committer | Mike Macgirvin <mike@macgirvin.com> | 2010-07-12 23:08:07 -0700 |
commit | 7e16f8cdae597cc8329c3cc9ce769d512ba84085 (patch) | |
tree | cf16a878c11fefc2e60950792cc028016cc0a8d0 /view | |
parent | a4dbd6657ca48131731da050c5378be8c84eda0e (diff) | |
download | volse-hubzilla-7e16f8cdae597cc8329c3cc9ce769d512ba84085.tar.gz volse-hubzilla-7e16f8cdae597cc8329c3cc9ce769d512ba84085.tar.bz2 volse-hubzilla-7e16f8cdae597cc8329c3cc9ce769d512ba84085.zip |
groups and acls
Diffstat (limited to 'view')
-rw-r--r-- | view/acl_selectors.php | 11 | ||||
-rw-r--r-- | view/jot.tpl | 2 |
2 files changed, 7 insertions, 6 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"; } } diff --git a/view/jot.tpl b/view/jot.tpl index 1c92df49e..f7cb49ec4 100644 --- a/view/jot.tpl +++ b/view/jot.tpl @@ -12,7 +12,7 @@ What's on your mind? </div> <div id="profile-jot-submit-wrapper" > <input type="submit" id="profile-jot-submit" name="submit" value="Submit" /> - <div id="profile-jot-perms" class="profile-jot-perms" ><img src="images/$lockstate_icon.gif" alt="Permission Settings" title="Permission Settings" onClick="openClose('profile-jot-acl-wrapper');" /></div> + <div id="profile-jot-perms" class="profile-jot-perms" style="display: $visitor;" ><img src="images/$lockstate_icon.gif" alt="Permission Settings" title="Permission Settings" onClick="openClose('profile-jot-acl-wrapper');" /></div> <div id="profile-jot-perms-end"></div> <div id="profile-jot-acl-wrapper" style="display: none;" >$acl</div> </div> |