From 3c8fc5fdf67e0e6e7051dfd5932200469de7d912 Mon Sep 17 00:00:00 2001 From: Uriel Date: Sat, 18 Oct 2008 03:36:22 +0200 Subject: [PATCH] Replace debug_handler with a template. --- bin/controller.rc | 16 +++++----------- lib/_debug.tpl | 6 ++++++ 2 files changed, 11 insertions(+), 11 deletions(-) create mode 100644 lib/_debug.tpl diff --git a/bin/controller.rc b/bin/controller.rc index 17c5c7a..2aa67f5 100755 --- a/bin/controller.rc +++ b/bin/controller.rc @@ -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 '
'
-    env | escape_html
-    echo ---------------------
-    umask
-    echo '
' -} - 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 diff --git a/lib/_debug.tpl b/lib/_debug.tpl new file mode 100644 index 0000000..4d224d9 --- /dev/null +++ b/lib/_debug.tpl @@ -0,0 +1,6 @@ +
+% env | escape_html
+---------------------
+% umask
+
+