(module hwiki-internal mzscheme
(require "hwikireq.scm")
(require "context.scm")
(require "config.scm")
(require "page.scm")
(require "plugins.scm")
(require "special-login.scm")
(require "special-logout.scm")
(require "special-template.scm")
(require "special-edit.scm")
(require "special-upload.scm")
(require "special-admin.scm")
(require "special-prefs.scm")
(require "special-cell-usage.scm")
(provide hwiki-start)
(define (hwiki-start request)
(debug "START" (url->string (request-uri request)))
(let ((context (get-context request)))
(-> context reset-extra-headers!)
(let ((P (page context)))
(let ((function (if (or (-> P special?) (-> context logged-in?))
send/suspend
send/forward)))
(if (not (-> P special?))
(-> context from-where (-> context page-name)))
(debug "special?" (-> P special?) " function: " function " context:" (-> context context))
(let ((R (-> P create-html)))
(debug "calling " R)
(let ((B (function R)))
(debug "RESTART" R function B)
(hwiki-start B)))))))
)