From 5600476c5649a79a8c6f385b58df3bf7888535d0 Mon Sep 17 00:00:00 2001 From: msquare Date: Wed, 28 Dec 2016 18:30:09 +0100 Subject: fix missing users on active angels view --- includes/pages/admin_active.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'includes/pages') diff --git a/includes/pages/admin_active.php b/includes/pages/admin_active.php index 4e2ca89f..a1e31b11 100644 --- a/includes/pages/admin_active.php +++ b/includes/pages/admin_active.php @@ -107,12 +107,10 @@ function admin_active() { $users = sql_select(" SELECT `User`.*, COUNT(`ShiftEntry`.`id`) as `shift_count`, ${shift_sum_formula} as `shift_length` FROM `User` LEFT JOIN `ShiftEntry` ON `User`.`UID` = `ShiftEntry`.`UID` - LEFT JOIN `Shifts` ON `ShiftEntry`.`SID` = `Shifts`.`SID` + LEFT JOIN `Shifts` ON `ShiftEntry`.`SID` = `Shifts`.`SID` " . ($show_all_shifts ? "" : "AND (`Shifts`.`end` < " . time() . " OR `Shifts`.`end` IS NULL)") . " WHERE `User`.`Gekommen` = 1 - " . ($show_all_shifts ? "" : "AND (`Shifts`.`end` < " . time() . " OR `Shifts`.`end` IS NULL)") . " GROUP BY `User`.`UID` ORDER BY `force_active` DESC, `shift_length` DESC" . $limit); - $matched_users = []; if ($search == "") { $tokens = []; -- cgit v1.2.3-54-g00ecf