edit_file="$_DATA/pages/$edit_page/#page.md"
[ "$REQUEST_METHOD" = POST ] && edit_action="$(POST action)"
-debug "RM: $REQUEST_METHOD ea: $edit_action"
-
if [ "$edit_page" = "$PATH_INFO" ]; then
unset edit_page edit_action edit_file
# END EDIT SCRIPT, continue in index.cgi
if S_LOCK "$edit_file"; then
POST pagetext >"$edit_file"
S_RELEASE "$edit_file"
- REDIRECT "${_BASE}${PATH_INFO%\[edit\]}" |debug
+ REDIRECT "${_BASE}${PATH_INFO%\[edit\]}"
else
export ERRMSG="ERR_NOLOCK"
- REDIRECT "${_BASE}${PATH_INFO%\[edit\]}/[edit]" |debug
+ REDIRECT "${_BASE}${PATH_INFO%\[edit\]}/[edit]"
fi
elif [ "$edit_action" = cancel ]; then
S_RELEASE "$edit_file"
- REDIRECT "${_BASE}${PATH_INFO%\[edit\]}" |debug
+ REDIRECT "${_BASE}${PATH_INFO%\[edit\]}"
elif mkdir -p -- "${edit_file%/#page.md}" && S_LOCK "$edit_file"; then
# Display editor page