summaryrefslogtreecommitdiff
path: root/includes/pages
diff options
context:
space:
mode:
authormsquare <msquare@notrademark.de>2016-12-28 18:30:09 +0100
committermsquare <msquare@notrademark.de>2016-12-28 18:30:09 +0100
commit5600476c5649a79a8c6f385b58df3bf7888535d0 (patch)
tree149c6481f07a70b127cba2876a606ff0105c2747 /includes/pages
parent4407604793e0a7b99122e306ae710304846cf3ea (diff)
fix missing users on active angels view
Diffstat (limited to 'includes/pages')
-rw-r--r--includes/pages/admin_active.php4
1 files changed, 1 insertions, 3 deletions
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 = [];