X-Git-Url: https://git.plutz.net/?p=confetti;a=blobdiff_plain;f=globals.sh;h=eaae8818e902645c7d1dd01c03645c645e89f4db;hp=5a9d9feee27252122f0806c4e51a02f7a58d3b9b;hb=15013eb0790a7935dc28b8ace6d5001122e400f1;hpb=69e661b5c8ec195bd3c4998a623a60607b47059e diff --git a/globals.sh b/globals.sh index 5a9d9fe..eaae881 100755 --- a/globals.sh +++ b/globals.sh @@ -17,7 +17,10 @@ # You should have received a copy of the GNU Affero General Public License # along with Confetti. If not, see . -export LC_ALL=de_DE.UTF-8 +date() { + LANG=de_DE.UTF-8 LC_ALL=de_DE.UTF-8 /bin/date $@ +} + PROFILE=$(validate "$PROFILE" 'medical|circus' circus ) PAGE="${_GET[p]:-$PAGE}" @@ -26,10 +29,20 @@ uuidgenerator(){ head -c16 /dev/urandom |sha1sum - |cut -c1-32 } -VCF_FIELDS=(PHOTO LOGO FN NICKNAME SOUND GENDER KIND TITLE ROLE ORG MEMBER CATEGORIES ANNIVERSARY BDAY EMAIL TEL IMPP ADR URL LANG NOTE RELATED X-ZACK-JOINDATE X-ZACK-LEAVEDATE) +_checked='' +checked(){ + if [ "$_checked" = "$1" ]; then + printf 'checked="checked"' + fi +} + + +VCF_FIELDS=(PHOTO LOGO FN NICKNAME SOUND GENDER KIND TITLE ROLE ORG MEMBER CATEGORIES ANNIVERSARY BDAY EMAIL TEL IMPP ADR URL LANG NOTE RELATED X-ZACK-JOINDATE X-ZACK-LEAVEDATE X-HEALTH-INSURANCE X-HEALTH-INSURANCE-NOCONTRIB X-CLIENT-REFERRAL) case "${PROFILE}" in medical) + data_dirs vcard cache temp mappings prescriptions therapies + [ -z "$NAVIGATION" ] && NAVIGATION=(cards) ;; circus) data_dirs vcard ical cache temp mappings