X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/d99ce1f9adbf25c10e81225ebb12e090ae6c1a23..c648b2b79b2a0b19364183e700764292d0a0d521:/IkiWiki/CGI.pm diff --git a/IkiWiki/CGI.pm b/IkiWiki/CGI.pm index 3e324ae1c..9b5ee6c19 100644 --- a/IkiWiki/CGI.pm +++ b/IkiWiki/CGI.pm @@ -274,15 +274,8 @@ sub cgi_editpage ($$) { #{{{ my @fields=qw(do rcsinfo subpage from page type editcontent comments); my @buttons=("Save Page", "Preview", "Cancel"); - eval q{use CGI::FormBuilder; use CGI::FormBuilder::Template::HTML}; + eval q{use CGI::FormBuilder}; error($@) if $@; - my $renderer=CGI::FormBuilder::Template::HTML->new( - fields => \@fields, - template_params("editpage.tmpl"), - ); - run_hooks(pagetemplate => sub { - shift->(page => "", destpage => "", template => $renderer->engine); - }); my $form = CGI::FormBuilder->new( fields => \@fields, header => 1, @@ -296,7 +289,8 @@ sub cgi_editpage ($$) { #{{{ params => $q, action => $config{cgiurl}, table => 0, - template => $renderer, + template => (-e "$config{templatedir}/editpage.tmpl" ? + {template_params("editpage.tmpl")} : ""), ); run_hooks(formbuilder_setup => sub { @@ -672,7 +666,9 @@ sub userlink ($) { #{{{ return "".escapeHTML($display).""; } else { - return htmllink("", "", escapeHTML($user), 1); + return htmllink("", "", escapeHTML( + length $config{userdir} ? $config{userdir}."/".$user : $user + ), 1); } } #}}}