summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorPhilip Häusler <msquare@notrademark.de>2011-09-12 23:09:30 +0200
committerPhilip Häusler <msquare@notrademark.de>2011-09-12 23:09:30 +0200
commit0eb9830818d935b0dc3e57eea49924e3b4ca18a0 (patch)
tree6d6ba0f3172be647a341aad7ad03e41e6b9f3f72 /includes
parentddf309717b7c2cc996e4b9107abb2bdd3eff3e4e (diff)
shift name is now optional
Diffstat (limited to 'includes')
-rw-r--r--includes/pages/admin_shifts.php12
1 files changed, 3 insertions, 9 deletions
diff --git a/includes/pages/admin_shifts.php b/includes/pages/admin_shifts.php
index bcb0a809..7ef53d6c 100644
--- a/includes/pages/admin_shifts.php
+++ b/includes/pages/admin_shifts.php
@@ -6,7 +6,6 @@ function admin_shifts() {
$msg = "";
$ok = true;
- $name = "";
$rid = 0;
$start = DateTime :: createFromFormat("Y-m-d H:i", date("Y-m-d") . " 00:00")->getTimestamp();
$end = $start +24 * 60 * 60;
@@ -26,13 +25,8 @@ function admin_shifts() {
$needed_angel_types[$type['TID']] = 0;
if (isset ($_REQUEST['preview'])) {
- // Name/Bezeichnung der Schicht, darf nicht leer sein
- if (isset ($_REQUEST['name']) && strlen($_REQUEST['name']) > 0)
- $name = strip_request_item('name');
- else {
- $ok = false;
- $msg .= error("Gib bitte einen Namen für die Schicht(en) an.");
- }
+ // Name/Bezeichnung der Schicht, darf leer sein
+ $name = strip_request_item('name');
// Auswahl der sichtbaren Locations für die Schichten
if (isset ($_REQUEST['rid']) && preg_match("/^[0-9]+$/", $_REQUEST['rid']) && isset ($room_array[$_REQUEST['rid']]))
@@ -217,7 +211,7 @@ function admin_shifts() {
header("Location: ?p=admin_shifts");
die();
}
-
+
foreach ($_SESSION['admin_shifts_shifts'] as $shift) {
sql_query("INSERT INTO `Shifts` SET `start`=" . sql_escape($shift['start']) . ", `end`=" . sql_escape($shift['end']) . ", `RID`=" . sql_escape($shift['RID']) . ", `name`='" . sql_escape($shift['name']) . "'");
$shift_id = sql_id();