diff --git a/includes/pages/user_myshifts.php b/includes/pages/user_myshifts.php index 78fdf8a1..5a667974 100644 --- a/includes/pages/user_myshifts.php +++ b/includes/pages/user_myshifts.php @@ -7,7 +7,14 @@ function user_myshifts() { global $user, $privileges; $msg = ""; - if (isset ($_REQUEST['edit']) && preg_match("/^[0-9]*$/", $_REQUEST['edit'])) { + if (isset ($_REQUEST['reset'])) { + if ($_REQUEST['reset'] == "ack") { + user_reset_ical_key(); + return success("Key geändert."); + } + return template_render('../templates/user_myshifts_reset.html', array ()); + } + elseif (isset ($_REQUEST['edit']) && preg_match("/^[0-9]*$/", $_REQUEST['edit'])) { $id = $_REQUEST['edit']; $shift = sql_select("SELECT `ShiftEntry`.`Comment`, `Shifts`.*, `Room`.`Name`, `AngelTypes`.`Name` as `angel_type` FROM `ShiftEntry` JOIN `AngelTypes` ON (`ShiftEntry`.`TID` = `AngelTypes`.`TID`) JOIN `Shifts` ON (`ShiftEntry`.`SID` = `Shifts`.`SID`) JOIN `Room` ON (`Shifts`.`RID` = `Room`.`RID`) WHERE `id`=" . sql_escape($id) . " AND `UID`=" . sql_escape($user['UID']) . " LIMIT 1"); if (count($shift) > 0) { @@ -66,10 +73,8 @@ function user_myshifts() { if ($html == "") $html = '
+ Wenn Du Deinen Key zurück setzt, ändert sich der Link zu Deinem iCal-Export! Du musst diesen dann an allen Stellen, wo Du ihn verwendest aktualisieren. +
++ Fortfahren » +