# along with Busy. If not, see <http://www.gnu.org/licenses/>.
#info="$(egrep -o '(^|&)i=[0-9]{10}_[0-9]{3}(&|$)' <<<"${QUERY_STRING}" |tr -d '&i=')"
+[ "$HTTPS" = "on" ] && PROTO=https || proto=http
+
+. ../auth/acl.sh
+$ACL_CREATETASK || echo "Location: ${proto}://${HTTP_HOST}/?p=Error&i=noaccess\n\n"
+$ACL_CREATETASK || exit 0
+
info="$(sed -r 's:(^|.*&)i=(.*)|.*:\2:;s:&.*::' <<<"${QUERY_STRING}")"
[ -z "$info" ] && info="$(date +%s)_$(apg -M N -a 1 -n 1 -m 3 -x 3)"
comment="$(echo -e "${comment}" |sed 's/\r//g;s/\\/\\\\/g')"
elif (egrep -xq 'cancel=.+' <<<"${line}"); then
cancel="true"
+ elif (egrep -xq 'submit=Robots click here' <<<"${line}"); then
+ cancel="true"
fi
done
fi
touch "../Tasks/$info"
echo -e "author=${REMOTE_USER}" > "$commfile"
echo -e "${comment}" >> "$commfile"
- echo -n "Location: http://${HTTP_HOST}/?p=Tasks&i=$info\n\n"
+ echo -n "Location: ${proto}://${HTTP_HOST}/?p=Tasks&i=$info\n\n"
elif [ -z "$cancel" -a -n "$description" ]; then
touch "../Tasks/$info"
echo -e "headline=${headline}" > "$descfile"
echo -e "status=${taskstatus}" >> "$descfile"
echo -e "section=${section}" >> "$descfile"
echo -e "${description}" >> "../Tasks/$info"
- echo -n "Location: http://${HTTP_HOST}/?p=Tasks#$anchor\n\n"
+ echo -n "Location: ${proto}://${HTTP_HOST}/?p=Tasks#$anchor\n\n"
elif [ -n "$cancel" ]; then
- echo -n "Location: http://${HTTP_HOST}/?p=Tasks#$anchor\n\n"
+ echo -n "Location: ${proto}://${HTTP_HOST}/?p=Tasks#$anchor\n\n"
fi