]> git.plutz.net Git - lobster/blobdiff - therapies/index.cgi
global and improved pdi escaping functions
[lobster] / therapies / index.cgi
index 62b621d45e5eaf7d8a1393476d5d06a8012e851e..f142d2180de1a20a6844577bb120e4557d957ada 100755 (executable)
@@ -30,12 +30,21 @@ case "$_PATH" in
     fi
     return 0
     ;;
+  /therapies/*/new)
+    card="${_PATH#/therapies/}"
+    card="${card%/new}"
+    uid="$(timeid)$(randomid)"
+    if [ -f "${_DATA}/vcard/${card}.vcf" ]; then
+      touch "${_DATA}/therapies/${card}.${uid}.tpy"
+      rm -f "${_DATA}/cache/${card}.vcf.cache"
+      REDIRECT "/therapies/${card}/${uid}"
+    fi
+    return 0
+    ;;
 esac
 
 . $_EXEC/pdiread.sh
 . $_EXEC/therapies/l10n.sh
-# . $_EXEC/cards/widgets.sh
-# . $_EXEC/cards/list.sh
 
 # unescape() { [ $# = 0 ] && sed -E 's;\\(.);\1;g' || printf %s "$*" |sed -E 's;\\(.);\1;g'; }
 # upcase=' y;abcdefghijklmnopqrstuvwxyzäöüé;ABCDEFGHIJKLMNOPQRSTUVWXYZÄÖÜÉ;; '