pdflatex="$(where pdflatex |head -n1 || echo false)"
course="${_GET[course]}"
-fromdate=$_GET[fromdate]
-fromdate=$(date -d "$fromdate" +%s)
+fromdate="${_GET[fromdate]}"
+fromdate="$(date -d "$fromdate" +%s)" 2>/dev/null
[ -z "$fromdate" ] && fromdate=$(date +%s)
. ${_EXEC}/pages/courses.sh
rrule="$values[RRULE]"
rr_int="$(echo $rrule |sed -rn 's:^.*INTERVAL=([0-9]+)(;.*)?$:\1:p')"
rr_freq="$(echo $rrule |sed -rn 's:^.*FREQ=(YEARLY|MONTHLY|WEEKLY|DAILY)(;.*)?$:\1:p')"
- case "$rr_freq" in;
+ case "$rr_freq" in
YEARLY) rec="$rr_int year";;
MONTHLY) rec="$rr_int month";;
DAILY) rec="$rr_int day";;