summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorJan-Philipp Litza <janphilipp@litza.de>2012-12-28 03:53:08 +0100
committerJan-Philipp Litza <janphilipp@litza.de>2012-12-28 03:53:08 +0100
commitcc8f117ed128cf9b046f9835640b84362d151883 (patch)
treec248345c837d720da28ce5bafa5edc7954110bfd /includes
parent378d524fbd7687e577f5e9c4be5e0726435b2bad (diff)
fix remembering of new-style-setting and fix a bug with signing up for shifts after they startet
Diffstat (limited to 'includes')
-rw-r--r--includes/pages/user_shifts.php12
1 files changed, 8 insertions, 4 deletions
diff --git a/includes/pages/user_shifts.php b/includes/pages/user_shifts.php
index 8ed0662a..a074ab77 100644
--- a/includes/pages/user_shifts.php
+++ b/includes/pages/user_shifts.php
@@ -324,9 +324,13 @@ function view_user_shifts() {
$_SESSION['user_shifts'][$key] = array_map('get_ids_from_array', $$key);
}
- if (!isset($_REQUEST['new_style']))
- $_SESSION['user_shifts']['new_style'] = false;
- else
+ if (isset($_REQUEST['rooms'])) {
+ if (isset($_REQUEST['new_style']))
+ $_SESSION['user_shifts']['new_style'] = true;
+ else
+ $_SESSION['user_shifts']['new_style'] = false;
+ }
+ if (!isset ($_SESSION['user_shifts']['new_style']))
$_SESSION['user_shifts']['new_style'] = true;
if (isset ($_REQUEST['days'])) {
@@ -488,7 +492,7 @@ function view_user_shifts() {
if ($user_may_join_shift)
$entry_list[] = '<a href="' . page_link_to('user_shifts') . '&amp;shift_id=' . $shift['SID'] . '&amp;type_id=' . $angeltype['id'] . '">' . $inner_text . ' &raquo;</a>';
else {
- if(time() > $shift['end']) {
+ if(time() > $shift['start']) {
$entry_list[] = $inner_text . ' (vorbei)';
} elseif($angeltype['restricted'] == 1 && isset($angeltype['user_id']) && !isset($angeltype['confirm_user_id'])) {
$entry_list[] = $inner_text . ' <img src="pic/lock.png" alt="unconfirmed" title="Du bist für diesen Engeltyp noch nicht freigeschaltet." />';