]> git.plutz.net Git - confetti/blobdiff - pages/attendees.sh
adaption for changes in shcgi external
[confetti] / pages / attendees.sh
index b528e5416d9f5623fa0e64e3822dbf5c437d6db0..9cc387e48ca025f6e2f077fa6f2109fab57b4032 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-# Copyright 2014 Paul Hänsch
+# Copyright 2014, 2015 Paul Hänsch
 #
 # This file is part of Confetti.
 # 
@@ -17,7 +17,7 @@
 # You should have received a copy of the GNU Affero General Public License
 # along with Confetti.  If not, see <http://www.gnu.org/licenses/>. 
 
-[ -z "$_GET[\"order\"]" ] && _GET["order"]=firstname
+[ -z "${_GET[order]}" ] && _GET[order]=firstname
 
 listcourses() {
   ls -1 ${_DATA}/ical/*ics |while read file; do
@@ -27,30 +27,30 @@ listcourses() {
 }
 
 listcards() {
-  case "$_GET[\"filtertype\"]" in
+  case "${_GET[filtertype]}" in
     any)
-       grep -il "$_GET[\"filter\"]" ${_DATA}/vcard/*vcf
+       grep -il "${_GET[filter]}" ${_DATA}/vcard/*vcf
       ;;
     name)
-       egrep -xil "(FN|NICKNAME|N)(;.+)*:.*$_GET[\"filter\"].*" ${_DATA}/vcard/*vcf
+       egrep -xil "(FN|NICKNAME|N)(;.+)*:.*${_GET[filter]}.*" ${_DATA}/vcard/*vcf
       ;;
     street)
-       egrep -xil "(ADR)(;.+)*:([^;]*;){2}$_GET[\"filter\"].*" ${_DATA}/vcard/*vcf
+       egrep -xil "(ADR)(;.+)*:([^;]*;){2}${_GET[filter]}.*" ${_DATA}/vcard/*vcf
       ;;
     zip)
-       egrep -xil "(ADR)(;.+)*:([^;]*;){5}$_GET[\"filter\"].*" ${_DATA}/vcard/*vcf
+       egrep -xil "(ADR)(;.+)*:([^;]*;){5}${_GET[filter]}.*" ${_DATA}/vcard/*vcf
       ;;
     telephone)
-       egrep -xil "(TEL)(;.+)*:.*$_GET[\"filter\"].*" ${_DATA}/vcard/*vcf
+       egrep -xil "(TEL)(;.+)*:.*${_GET[filter]}.*" ${_DATA}/vcard/*vcf
       ;;
     birth)
-       egrep -xil "(BDAY)(;.+)*:$_GET[\"filter\"].*" ${_DATA}/vcard/*vcf
+       egrep -xil "(BDAY)(;.+)*:${_GET[filter]}.*" ${_DATA}/vcard/*vcf
       ;;
     course)
       ;;
     *) ls -1 ${_DATA}/vcard/*vcf 2>/dev/null
       ;;
-  esac |case "$_GET[\"order\"]" in
+  esac |case "${_GET[order]}" in
     firstname)
       while read file; do
         fn=$(sed -rn 's:^N(;.+)*\:([^;]*;){1} *([^;]*).*$:\3:p' "$file")