From 356b2582f3e6a43ecf2607acad4a7fe0b37f659a Mon Sep 17 00:00:00 2001 From: Bot Date: Tue, 3 Jan 2017 03:22:48 +0100 Subject: PPHDoc, formatting, fixes, cleanup --- includes/pages/admin_shifts.php | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'includes/pages/admin_shifts.php') diff --git a/includes/pages/admin_shifts.php b/includes/pages/admin_shifts.php index b2a67786..d3bcea53 100644 --- a/includes/pages/admin_shifts.php +++ b/includes/pages/admin_shifts.php @@ -1,16 +1,22 @@ $shifttype_id ]; } elseif ($mode == 'multi') { - $shift_start = $start; + $shift_start = (int)$start; do { - $shift_end = $shift_start + $length * 60; + $shift_end = $shift_start + (int)$length * 60; if ($shift_end > $end) { $shift_end = $end; @@ -298,6 +304,7 @@ function admin_shifts() redirect(page_link_to('admin_shifts')); } + $needed_angel_types_info = []; foreach ($_SESSION['admin_shifts_shifts'] as $shift) { $shift['URL'] = null; $shift['PSID'] = null; @@ -312,7 +319,7 @@ function admin_shifts() . " from " . date("Y-m-d H:i", $shift['start']) . " to " . date("Y-m-d H:i", $shift['end']) ); - $needed_angel_types_info = []; + foreach ($_SESSION['admin_shifts_types'] as $type_id => $count) { $angel_type_source = sql_select("SELECT * FROM `AngelTypes` WHERE `id`='" . sql_escape($type_id) . "' LIMIT 1"); if (count($angel_type_source) > 0) { -- cgit v1.2.3-54-g00ecf