Replace debug_handler with a template.
This commit is contained in:
parent
a891993160
commit
3c8fc5fdf6
2 changed files with 11 additions and 11 deletions
|
|
@ -89,7 +89,6 @@ fn gen_blog_post_title {
|
|||
|
||||
|
||||
|
||||
|
||||
# Handlers
|
||||
fn set_handler {
|
||||
handler = $1
|
||||
|
|
@ -123,19 +122,16 @@ fn dir_listing_handler {
|
|||
|
||||
fn 404_handler { template `{ get_lib_file 404.tpl } }
|
||||
|
||||
fn blog_dir_handler {
|
||||
blogDirs = $*
|
||||
tpl_handler lib/feeds/html.tpl
|
||||
}
|
||||
|
||||
fn blog_post_handler {
|
||||
gen_blog_post_title $1 | $formatter
|
||||
$formatter < $1
|
||||
}
|
||||
|
||||
fn debug_handler {
|
||||
echo '<pre>'
|
||||
env | escape_html
|
||||
echo ---------------------
|
||||
umask
|
||||
echo '</pre>'
|
||||
}
|
||||
|
||||
|
||||
fn select_handler {
|
||||
|
||||
|
|
@ -156,8 +152,6 @@ fn select_handler {
|
|||
'^$comment_text } > $ddir/$d.rec
|
||||
}
|
||||
}
|
||||
if not if (~ $body */_debug)
|
||||
set_handler debug_handler
|
||||
if not if (test -f $body.tpl)
|
||||
set_handler tpl_handler $body.tpl
|
||||
|
||||
|
|
|
|||
6
lib/_debug.tpl
Normal file
6
lib/_debug.tpl
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
<pre>
|
||||
% env | escape_html
|
||||
---------------------
|
||||
% umask
|
||||
</pre>
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue