]> git.plutz.net Git - lobster/blobdiff - therapies/update_therapy.sh
quick fix: put temp file into lock, should switch to session_lock functions
[lobster] / therapies / update_therapy.sh
index 0474b3b3be6d608f4db5975b93b03dc1b21c2c4a..e084e6ddc9e7dfe361e625f44c541fdf62fd2cda 100755 (executable)
@@ -21,7 +21,7 @@
 tpy="$(POST id)"
 
 tpyfile="$_DATA/therapies/${tpy}.tpy"
-tempfile="$_DATA/temp/${tpy}.$$.tpy"
+tempfile="$_DATA/lock/${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