]> git.plutz.net Git - lobster/blobdiff - therapies/update_therapy.sh
top link in client list
[lobster] / therapies / update_therapy.sh
index 70fdea2930a23b0391a1ec7b58df693f8e5e8b07..c72d0408de3af39e0c5606a72f7f9476e460c25f 100755 (executable)
@@ -21,7 +21,7 @@
 tpy="$(POST id)"
 
 tpyfile="$_DATA/therapies/${tpy}.tpy"
-tempfile="$_DATA/temp/${tpy}.tpy"
+tempfile="$_DATA/temp/${tpy}.$$.tpy"
 
 if [ "$(POST tid)" != "$(transid "$tpyfile")" ]; then
   if [ "$(POST autosubmit)" = "true" ]; then
@@ -125,6 +125,8 @@ if [ "$(POST autosubmit)" = "true" ]; then
   msg="$(transid "$tpyfile")"
   printf 'HTTP/1.1 200 OK\r\nContent-Length: %i\r\n\r\n%s' \
          "${#msg}" "${msg}"
+elif [ "$(POST vcfreturn)" ]; then
+  REDIRECT "/cards/#${tpy%.*}.vcf"
 else
   REDIRECT "/therapies/${tpy%.*}/${tpy#*.}"
 fi