X-Git-Url: https://git.plutz.net/?p=confetti;a=blobdiff_plain;f=cards%2Fexport_card.sh;fp=actions%2Fedit_card.sh;h=0918032c6019fc8da3d3be9a0711b539fdb01365;hp=f90b326d2cca3a38dfa6b668fe3bc689c7556a9b;hb=76c1e7bff1a8604ef2ef7da5d274d0db0e639139;hpb=90288ab07bb1ec83a91581fadc674a87a250a853 diff --git a/actions/edit_card.sh b/cards/export_card.sh similarity index 69% rename from actions/edit_card.sh rename to cards/export_card.sh index f90b326..0918032 100755 --- a/actions/edit_card.sh +++ b/cards/export_card.sh @@ -1,6 +1,6 @@ -#!/bin/zsh +#!/bin/sh -# Copyright 2014 Paul Hänsch +# Copyright 2014, 2015, 2021 Paul Hänsch # # This file is part of Confetti. # @@ -17,11 +17,12 @@ # You should have received a copy of the GNU Affero General Public License # along with Confetti. If not, see . -cgi_refdata +card="$(GET card |PATH)" +cardfile="$_DATA/vcard/${card##*/}" -card="${_GET[card]}" -filter="&filter=${_REF[filter]}" -filtertype="&filtertype=${_REF[filtertype]}" -order="&order=${_REF[order]}" +. $_EXEC/pdiread.sh +. $_EXEC/cgilite/file.sh -echo -n "Location: ?p=cards${filter}${filtertype}${order}&edit=$card\n\n" +printf 'Content-Disposition: inline; filename="%s.vcf"\r\n' "$(pdi_value "$(pdi_load "$cardfile")" FN)" + +FILE "$cardfile" "text/vcard; charset=utf-8"