diff options
author | Philip Häusler <msquare@notrademark.de> | 2012-12-12 23:15:57 +0100 |
---|---|---|
committer | Philip Häusler <msquare@notrademark.de> | 2012-12-12 23:15:57 +0100 |
commit | 2d5449f213a95cc2b74ffda745e12a78a8b5d346 (patch) | |
tree | 30fcfea762b6cd7c0c9bf0ec64e9a81b5d4a4ec9 /includes | |
parent | ad9695573f7413df8e8ad88961fce068c2a42a56 (diff) |
sort angeltypes on user shifts
Diffstat (limited to 'includes')
-rw-r--r-- | includes/pages/user_shifts.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/includes/pages/user_shifts.php b/includes/pages/user_shifts.php index 07a9b2df..846ea4e3 100644 --- a/includes/pages/user_shifts.php +++ b/includes/pages/user_shifts.php @@ -265,9 +265,9 @@ function view_user_shifts() { $days = sql_select("SELECT DISTINCT DATE(FROM_UNIXTIME(`start`)) AS `id`, DATE(FROM_UNIXTIME(`start`)) AS `name` FROM `Shifts` ORDER BY `start`"); $rooms = sql_select("SELECT `RID` AS `id`, `Name` AS `name` FROM `Room` WHERE `show`='Y' ORDER BY `Name`"); if (in_array('admin_shifts', $privileges)) - $types = sql_select("SELECT `id`, `name` FROM `AngelTypes`"); + $types = sql_select("SELECT `id`, `name` FROM `AngelTypes` ORDER BY `AngelTypes`.`name`"); else - $types = sql_select("SELECT `AngelTypes`.`id`, `AngelTypes`.`name` FROM `UserAngelTypes` JOIN `AngelTypes` ON (`UserAngelTypes`.`angeltype_id` = `AngelTypes`.`id`) WHERE `UserAngelTypes`.`user_id` = " . sql_escape($user['UID']) . " AND (`AngelTypes`.`restricted` = 0 OR NOT `UserAngelTypes`.`confirm_user_id` IS NULL)"); + $types = sql_select("SELECT `AngelTypes`.`id`, `AngelTypes`.`name` FROM `UserAngelTypes` JOIN `AngelTypes` ON (`UserAngelTypes`.`angeltype_id` = `AngelTypes`.`id`) WHERE `UserAngelTypes`.`user_id` = " . sql_escape($user['UID']) . " AND (`AngelTypes`.`restricted` = 0 OR NOT `UserAngelTypes`.`confirm_user_id` IS NULL) ORDER BY `AngelTypes`.`name`"); if (empty($types)) $types = sql_select("SELECT `id`, `name` FROM `AngelTypes` WHERE `restricted` = 0"); $filled = array ( |