+ head -c $((CONTENT_LENGTH)) >/dev/null
+ return 0
+ elif [ "$action" = delete -a "$SESSION_ID" = "$tsid" ] && acl_write "${page}"; then
+ set --
+ n="$(POST_COUNT select)"; while [ $n -gt 0 ]; do
+ delete="$(POST select $n |PATH)"
+ set -- "$@" "pages${page}#attachments/${delete##*/}"
+ n=$((n - 1))
+ done
+ if [ "$REV_ATTACHMENTS" = true ]; then
+ git -C "$_DATA" rm -- "$@"
+ git -C "$_DATA" commit -qm \
+ "Attachment to # $page # deleted by @ $USER_NAME @" -- "$@"
+ else
+ rm -- "$@"
+ fi
+ REDIRECT "${_BASE}${PATH_INFO}"
+ elif [ "$action" = delete ]; then
+ printf 'Refresh: %i\r\n' 4
+ theme_error 403
+ return 0
+ # elif [ "$attachment_delete" -a "$SESSION_ID" = "$tsid" ]; then
+ # if [ "$REV_ATTACHMENTS" = true ]; then
+ # git -C "$_DATA" rm -- \
+ # "$_DATA/pages${page}#attachments/$attachment_delete"
+ # git -C "$_DATA" commit -qm \
+ # "Attachment to # $page # deleted by @ $USER_NAME @" -- \
+ # "$_DATA/pages${page}#attachments/$attachment_delete"
+ # else
+ # rm -- "$_DATA/pages${page}#attachments/$attachment_delete"
+ # fi
+ # REDIRECT "${_BASE}${PATH_INFO}"
+ # elif [ "$attachment_delete" ]; then
+ # printf 'Refresh: %i\r\n' 4
+ # theme_error 403
+ # return 0
+ elif ! acl_read "${page}"; then
+ theme_error 403
+ return 0
+ else
+ theme_attachments "${page}"