X-Git-Url: https://git.plutz.net/?p=confetti;a=blobdiff_plain;f=actions%2Fupdate_attendee.sh;h=6bfbe8822315d4f666a4850dd8fd2abde2491e1c;hp=ba84be8f75462627580b3f45643137269217cfb1;hb=3badbe5f34b9a481f43f83d07d4cd28a3aa7798b;hpb=be5f12e43f464b3ca924b2131fe74d6cf24981a1 diff --git a/actions/update_attendee.sh b/actions/update_attendee.sh index ba84be8..6bfbe88 100644 --- a/actions/update_attendee.sh +++ b/actions/update_attendee.sh @@ -24,7 +24,7 @@ case "$_POST[\"action\"]" in addfield) echo "$_POST[\"newfield\"]:\r" >>"$tempfile" echo "END:VCARD\r" >>"$tempfile" - echo -n "Location: http://$HTTP_HOST/?page=attendees&edit=$card#$card\n\n" + echo -n "Location: http://$HTTP_HOST/?page=attendees&edit=$card\n\n" ;; update) echo "END:VCARD\r" >>"$tempfile" @@ -33,6 +33,12 @@ case "$_POST[\"action\"]" in ;; cancel) rm "$tempfile" - echo -n "Location: http://$HTTP_HOST/?page=attendees#$card\n\n" + [ -f "$cardfile" ] \ + && echo -n "Location: http://$HTTP_HOST/?page=attendees#$card\n\n" \ + || echo -n "Location: http://$HTTP_HOST/?page=attendees\n\n" + ;; + delete) + rm "$tempfile" "$cardfile" + echo -n "Location: http://$HTTP_HOST/?page=attendees\n\n" ;; esac