From 3d2be79505a5dbcf2b5d9c1a9064aea77e705c8d Mon Sep 17 00:00:00 2001 From: Uriel Date: Wed, 22 Oct 2008 09:20:06 +0200 Subject: [PATCH] Improvements to wiki and comments code, take advantage of improvements in user auth interfaca --- lib/default_master.tpl | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/lib/default_master.tpl b/lib/default_master.tpl index 1297e40..fa091d3 100644 --- a/lib/default_master.tpl +++ b/lib/default_master.tpl @@ -26,8 +26,7 @@ gensidebar %} -% # TODO: probably should check if we have the right perms -% if (! ~ $#wiki 0 && test -f $body.md && get_user && ! ~ $#logged_user 0) { +% if (! ~ $#wiki 0 && test -f $body.md && check_user $wiki_editors_group) {
@@ -43,7 +42,6 @@ gensidebar % }
- % genbody % if (! ~ $#allowComments 0) { @@ -52,20 +50,26 @@ gensidebar cdir = $body.md_werc/comments if (test -d $cdir) { echo '

Comments

' - for(c in `{ls $cdir}) { - parse_rec $c - - echo '
' - echo User: $rec_user_name '
' - echo $rec_data | escape_html | sed 's,$,
,' - echo '
' + for(c in `{ls $cdir/}) { +%} +
+% echo By: `{cat $c/user} +
+% cat $c/body | escape_html | sed 's,$,
,' +
+%{ } } %} - +

- +% if(! check_user) { + User: Password: + + If you are not registered enter your desired user/password and your account will be created when your comment is approved. +% } + % }