summaryrefslogtreecommitdiff
path: root/includes/pages/admin_active.php
diff options
context:
space:
mode:
authorBot <bot@myigel.name>2017-01-03 03:22:48 +0100
committerIgor Scheller <igor.scheller@igorshp.de>2017-01-03 03:22:48 +0100
commit356b2582f3e6a43ecf2607acad4a7fe0b37f659a (patch)
treee02c9214b23a0b9ec33aa725db962d565bd30a82 /includes/pages/admin_active.php
parentd71e7bbfad2f07f82df0c515608996d250fd4182 (diff)
PPHDoc, formatting, fixes, cleanup
Diffstat (limited to 'includes/pages/admin_active.php')
-rw-r--r--includes/pages/admin_active.php13
1 files changed, 11 insertions, 2 deletions
diff --git a/includes/pages/admin_active.php b/includes/pages/admin_active.php
index 38edbfdb..34b9eb14 100644
--- a/includes/pages/admin_active.php
+++ b/includes/pages/admin_active.php
@@ -1,10 +1,16 @@
<?php
+/**
+ * @return string
+ */
function admin_active_title()
{
return _("Active angels");
}
+/**
+ * @return string
+ */
function admin_active()
{
global $tshirt_sizes, $shift_sum_formula;
@@ -110,7 +116,10 @@ function admin_active()
}
$users = sql_select("
- SELECT `User`.*, COUNT(`ShiftEntry`.`id`) as `shift_count`, ${shift_sum_formula} as `shift_length`
+ 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` " . ($show_all_shifts ? "" : "AND (`Shifts`.`end` < " . time() . " OR `Shifts`.`end` IS NULL)") . "
WHERE `User`.`Gekommen` = 1
@@ -186,7 +195,7 @@ function admin_active()
form_text('count', _("How much angels should be active?"), $count),
form_submit('set_active', _("Preview"))
]) : $set_active,
- msg(),
+ $msg . msg(),
table([
'nick' => _("Nickname"),
'shirt_size' => _("Size"),