X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/f06317420dfb5eba2814c1188b598d2cacb40384..cae5e22a8d3ac927c526dd9062a44cfc61398667:/ikiwiki?ds=sidebyside diff --git a/ikiwiki b/ikiwiki index cfc963c12..a3bf09d3b 100755 --- a/ikiwiki +++ b/ikiwiki @@ -407,7 +407,7 @@ sub rcs_recentchanges ($) { #{{{ my $div=qr/^--------------------+$/; my $infoline=qr/^r(\d+)\s+\|\s+([^\s]+)\s+\|\s+(\d+-\d+-\d+\s+\d+:\d+:\d+\s+[-+]?\d+).*/; my $state='start'; - my ($rev, $user, $when, @pages, $message); + my ($rev, $user, $when, @pages, @message); foreach (`LANG=C svn log -v '$svn_url'`) { chomp; if ($state eq 'start' && /$div/) { @@ -427,16 +427,16 @@ sub rcs_recentchanges ($) { #{{{ } elsif ($state eq 'body' && /$div/) { push @ret, { rev => $rev, user => $user, - when => $when, message => $message, + when => $when, message => [@message], pages => [@pages] } if @pages; return @ret if @ret >= $num; $state='header'; - $message=$rev=$user=$when=undef; - @pages=(); + $rev=$user=$when=undef; + @pages=@message=(); } elsif ($state eq 'body') { - $message.="$_
\n"; + push @message, {line => $_}, } } } @@ -658,7 +658,7 @@ EOF exit 0; } #}}} -sub cgi_recentchanges () { #{{{ +sub cgi_recentchanges ($) { #{{{ 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"); }