diff --git a/includes/pages/user_shifts.php b/includes/pages/user_shifts.php index 33f81f96..0464cc54 100644 --- a/includes/pages/user_shifts.php +++ b/includes/pages/user_shifts.php @@ -337,12 +337,8 @@ function view_user_shifts() { if (!isset ($_SESSION['user_shifts']['new_style'])) $_SESSION['user_shifts']['new_style'] = true; foreach (array ('start', 'end') as $key) { - if (isset ($_REQUEST[$key . '_day'])) { - $filtered = array_intersect($_REQUEST[$key . '_day'], $days); - if (!empty ($filtered)) - $_SESSION['user_shifts'][$key . '_day'] = $filtered; - unset ($filtered); - } + if (isset ($_REQUEST[$key . '_day']) && in_array($_REQUEST[$key . '_day'], $days)) + $_SESSION['user_shifts'][$key . '_day'] = $_REQUEST[$key . '_day']; if (isset ($_REQUEST[$key . '_time']) && preg_match('#^\d{1,2}:\d\d$#', $_REQUEST[$key . '_time'])) $_SESSION['user_shifts'][$key . '_time'] = $_REQUEST[$key . '_time']; if (!isset ($_SESSION['user_shifts'][$key . '_day'])) { @@ -454,11 +450,12 @@ function view_user_shifts() { $shifts_table.="
"; for($i = 0; $i < $maxshow; $i++) { $thistime = $first + ($i*15*60); - if($thistime%(60*60) == 0) { - $shifts_table .= "