]> git.plutz.net Git - confetti/blobdiff - cards/list.sh
use $upcase constant only in its function
[confetti] / cards / list.sh
index 2f2e767a9dad082aed283da405e01c1eda6bf8fb..519005c08f780bc5e09dc64717fa72bd46425482 100755 (executable)
@@ -65,7 +65,7 @@ edit_card(){
             [div .item .newfield
               [select name="newfield"
                [option value="" disabled="disabled" selected="selected" $(l10n edit_addfieldtext)]
-               $(for f in NICKNAME EMAIL TEL IMPP ADR URL NOTE; do
+               $(for f in NICKNAME EMAIL TEL IMPP ADR URL NOTE X-ZACK-LEAVEDATE; do
                  printf '[option value="%s" %s] ' "$f" "$(l10n "$f")"
                done)
              ][button type="submit" name="action" value="addfield" $(l10n edit_addfield)]
@@ -113,11 +113,9 @@ print_cards(){
 
   while read cardfile; do
     cachefile="${_DATA}/cache/${cardfile##*/}.cache"
-    # if [ -s "$cachefile" -a "$cachefile" -nt "$cardfile" \
-    #                      -a "$cachefile" -nt "${_EXEC}/cards" ]; then
     if [ -s "$cachefile" -a "$cachefile" -nt "$cardfile" ]; then
       cat "$cachefile"
-    else
+    elif [ -s "$cardfile" ]; then
       print_card "$cardfile" |tee "$cachefile"
     fi
   done
@@ -150,6 +148,7 @@ filter_attendance(){
 
 filter_cards(){
   local filter f fex='x;p;'
+  local upcase=' y;abcdefghijklmnopqrstuvwxyzäöüé;ABCDEFGHIJKLMNOPQRSTUVWXYZÄÖÜÉ;; '
 
   filter="$(printf %s "${filter}" \
             | sed -E 's;[]\/\(\)\\\$\?\.\+\*\;\[\{\}];\\&;g;