aboutsummaryrefslogtreecommitdiffstats
path: root/view
diff options
context:
space:
mode:
Diffstat (limited to 'view')
-rw-r--r--view/acl_selectors.php11
-rw-r--r--view/jot.tpl2
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>