]> git.plutz.net Git - confetti/commitdiff
vcard exporter
authorPaul Hänsch <paul@plutz.net>
Tue, 20 Aug 2019 11:57:51 +0000 (13:57 +0200)
committerPaul Hänsch <paul@plutz.net>
Tue, 20 Aug 2019 11:57:51 +0000 (13:57 +0200)
cards/export_card.sh
cards/list.sh

index d6ea2937304bb0ffeae647358546a309db429d56..e9356a90610e0bf3d7b326b0fd394aec7b7470af 100755 (executable)
 # You should have received a copy of the GNU Affero General Public License
 # along with Confetti.  If not, see <http://www.gnu.org/licenses/>. 
 
 # You should have received a copy of the GNU Affero General Public License
 # along with Confetti.  If not, see <http://www.gnu.org/licenses/>. 
 
-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
index 6c0f18b229961a4ecff5dee7aab91ecb3e52b12b..f2f4a4be0707bf97798cc094be4d9a31d9aaf572 100755 (executable)
@@ -95,7 +95,7 @@ print_card(){
       ]
       [div .control
         [a .item href="/cards/edit_card.sh?card=${cardfile##*/}" $(l10n edit)]
       ]
       [div .control
         [a .item href="/cards/edit_card.sh?card=${cardfile##*/}" $(l10n edit)]
-        [a .item href="/cards/?x=${cardfile##*/}" $(l10n vcf_export)]
+        [a .item href="/cards/export_card.sh?card=${cardfile##*/}" $(l10n vcf_export)]
       ]
     ]
        EOF
       ]
     ]
        EOF