X-Git-Url: https://git.plutz.net/?p=confetti;a=blobdiff_plain;f=cards%2Fexport_card.sh;fp=cards%2Fexport_card.sh;h=e9356a90610e0bf3d7b326b0fd394aec7b7470af;hp=d6ea2937304bb0ffeae647358546a309db429d56;hb=daf4b56b27a3eae9513b6716aaa3e98e93a728a0;hpb=1b5fe5ec8e6ceb580ada4e0ff4fe3955c2457ec0 diff --git a/cards/export_card.sh b/cards/export_card.sh index d6ea293..e9356a9 100755 --- a/cards/export_card.sh +++ b/cards/export_card.sh @@ -17,6 +17,11 @@ # You should have received a copy of the GNU Affero General Public License # along with Confetti. If not, see . -echo -n "Content-Type: text/vcard;charset=utf-8\n\n" -card="${_GET[card]}" -cat "$_DATA/vcard/$card" +card="$(GET card |PATH)" +cardfile="$_DATA/vcard/${card##*/}" + +if [ -f "$cardfile" ]; then + . $_EXEC/cgilite/file.sh + FILE "$cardfile" "text/vcard/charset=utf-8" +else +fi