summaryrefslogtreecommitdiffstats
path: root/lib/ui.lib.php
diff options
context:
space:
mode:
authorKarl 'vollmerk' Vollmer <vollmer@ampache.org>2007-10-10 07:30:15 +0000
committerKarl 'vollmerk' Vollmer <vollmer@ampache.org>2007-10-10 07:30:15 +0000
commitff58181d5b4ddd10b34062a0ad2204435e698cae (patch)
tree60b4654309d0826c81411790efe8448675a038bb /lib/ui.lib.php
parent32349846fbd66e4ebc44e63d37fbcd8cff5a8a73 (diff)
downloadampache-ff58181d5b4ddd10b34062a0ad2204435e698cae.tar.gz
ampache-ff58181d5b4ddd10b34062a0ad2204435e698cae.tar.bz2
ampache-ff58181d5b4ddd10b34062a0ad2204435e698cae.zip
fixed acls, fixed transcoding issues
Diffstat (limited to 'lib/ui.lib.php')
-rw-r--r--lib/ui.lib.php15
1 files changed, 9 insertions, 6 deletions
diff --git a/lib/ui.lib.php b/lib/ui.lib.php
index efdaa736..d785431f 100644
--- a/lib/ui.lib.php
+++ b/lib/ui.lib.php
@@ -891,19 +891,22 @@ function show_user_select($name,$selected='',$style='') {
echo "<select name=\"$name\" style=\"$style\">\n";
echo "\t<option value=\"\">" . _('None') . "</option>\n";
- $sql = "SELECT username as id,fullname FROM user ORDER BY fullname";
- $db_results = mysql_query($sql, dbh());
+ $sql = "SELECT `id`,`username`,`fullname` FROM `user` ORDER BY `fullname`";
+ $db_results = Dba::query($sql);
- while ($r = mysql_fetch_assoc($db_results)) {
+ while ($row = Dba::fetch_assoc($db_results)) {
$select_txt = '';
- if ($r['id'] == $selected) {
+ if ($row['id'] == $selected) {
$select_txt = 'selected="selected"';
}
+ // If they don't have a full name, revert to the username
+ $row['fullname'] = $row['fullname'] ? $row['fullname'] : $row['username'];
- echo "\t<option value=\"" . $r['id'] . "\" $select_txt>" . scrub_out($r['fullname']) . "</option>\n";
-
+ echo "\t<option value=\"" . $row['id'] . "\" $select_txt>" . scrub_out($row['fullname']) . "</option>\n";
} // end while users
+ echo "</select>\n";
+
} // show_user_select
/**