X-Git-Url: https://git.plutz.net/?a=blobdiff_plain;f=therapies%2Findex.cgi;h=515f2b0265308042562f291f0a93a61ad7af6d2f;hb=aaf902bbb025442df82f705d495fa79bc4975254;hp=f142d2180de1a20a6844577bb120e4557d957ada;hpb=6a48f4094cf2b0757c9fb5913739dc43e3f589b9;p=lobster diff --git a/therapies/index.cgi b/therapies/index.cgi index f142d21..515f2b0 100755 --- a/therapies/index.cgi +++ b/therapies/index.cgi @@ -46,12 +46,6 @@ esac . $_EXEC/pdiread.sh . $_EXEC/therapies/l10n.sh -# unescape() { [ $# = 0 ] && sed -E 's;\\(.);\1;g' || printf %s "$*" |sed -E 's;\\(.);\1;g'; } -# upcase=' y;abcdefghijklmnopqrstuvwxyzäöüé;ABCDEFGHIJKLMNOPQRSTUVWXYZÄÖÜÉ;; ' - -BR=' -' - id="${_PATH#/therapies/}" id="${id%/*}.${id#*/}" @@ -64,12 +58,12 @@ mpxfile="${_DATA}/prescriptions/${id}.mpx" tpyfile="${_DATA}/therapies/${id}.tpy" vcf="$(pdi_load "$vcffile")" -mpx="$(sed '1s;^;\n;; s/:/;:/' "$mpxfile")" +mpx="$([ -f "$mpxfile" ] && sed '1s;^;\n;; s/:/;:/' "$mpxfile")" tpy="$(sed '1s;^;\n;; s/:/;:/' "$tpyfile")" VCF(){ pdi_value "$vcf" "$@"; } MPX(){ pdi_value "$mpx" "$@"; } -TPY(){ pdi_value "$tpy" "$@"; } +TPY(){ pdi_value "$tpy" "$@" >/dev/null && pdi_value "$tpy" "$@" |pdi_unescape; } . $_EXEC/therapies/page.sh \ | yield_page therapy /therapies/therapy.css