+
+ printf 'Status: 202 Accepted\r\n'
+ { [ "$delsub" = true ] \
+ && list_writable "$oldname" \
+ || printf %s\\n "$oldname"
+ } | while read oldname; do
+ if [ "$REV_PAGES" = true -a "$REV_ATTACHMENTS" = true ]; then
+ git -C "$_DATA" rm "pages/${oldname}/#page.md" >&2
+ git -C "$_DATA" rm -r "pages/${oldname}/#attachments/" >&2
+ git -C "$_DATA" commit -m 'Page # '"$oldname"' # deleted by user @ '"$USER_NAME"' @' \
+ -- "pages/${oldname}/#page.md" "pages/${oldname}/#attachments/" >&2
+ rm -r -- "$_DATA/pages/${oldname}"/\#*
+ rmdir -- "$_DATA/pages/${oldname}/" || true
+ elif [ "$REV_PAGES" = true ]; then
+ git -C "$_DATA" rm "pages/${oldname}/#page.md" >&2
+ git -C "$_DATA" commit -m 'Page # '"$oldname"' # deleted by user @ '"$USER_NAME"' @' \
+ -- "pages/${oldname}/#page.md" >&2
+ rm -r -- "$_DATA/pages/${oldname}"/\#*
+ rmdir -- "$_DATA/pages/${oldname}/" || true
+ else
+ rm -- "$_DATA/pages/${oldname}/#page.md"
+ rm -r -- "$_DATA/pages/${oldname}"/\#*
+ rmdir -- "$_DATA/pages/${oldname}/" || true
+ fi
+ printf '%s\n' "$oldname"
+ done | {
+ cat <<-EOF
+ <article id="deleteconfirm">
+ <h1>$(_ "Pages deleted:")</h1>
+ <ul>
+ $(while read page; do
+ printf '<li>%s</li>' "$(HTML $page)"
+ done)
+ </ul>
+ <a class="button" href="./">$(_ OK)</a>
+ </article>
+ EOF
+ } | theme_page -
+ return 0