blah
[ikiwiki.git] / ikiwiki
diff --git a/ikiwiki b/ikiwiki
index cfc963c120df53c0ec680bbe0fe51dfb0531eb5e..eb0a2c0dca5a668683649dc15115babbbb546e76 100755 (executable)
--- a/ikiwiki
+++ b/ikiwiki
@@ -658,7 +658,7 @@ EOF
        exit 0;
 } #}}}
 
-sub cgi_recentchanges () { #{{{
+sub html_recentchanges ($q) { #{{{
        my $q=shift;
        
        my $template=HTML::Template->new(
@@ -669,7 +669,7 @@ sub cgi_recentchanges () { #{{{
                wikiname => $wikiname,
                changelog => [rcs_recentchanges(100)],
        );
-       return $template->output;
+       print $q->header, $template->output;
 } #}}}
 
 sub cgi_signin ($$) { #{{{
@@ -790,7 +790,7 @@ sub cgi () { #{{{
        }
        
        if ($do eq 'recentchanges') {
-               cgi_recentchanges();
+               cgi_recentchanges($q);
                return;
        }
        
@@ -940,8 +940,6 @@ usage() unless @ARGV == 3;
 ($templatedir) = possibly_foolish_untaint(shift);
 ($destdir) = possibly_foolish_untaint(shift);
 
-print cgi_recentchanges();
-
 if ($cgi && ! length $url) {
        error("Must specify url to wiki with --url when using --cgi");
 }