From c4e0e8c36c89fa26e76bb21dbdb8263ee88d5143 Mon Sep 17 00:00:00 2001 From: joey Date: Sun, 2 Apr 2006 22:24:08 +0000 Subject: - add to cgi output, this is especially useful for output containing wikilinks since the urls should work now in more situations - drop --limit from svn log run, since a) it needs a fairly new svn and b) in some cases, it would limit it to too few entries to display the requested number of changes - Use driver:DB_File and not driver:db_file for better compatability with old versions of CGI::Session. - Note that HTML::Template 3.02.02 is needed. --- IkiWiki/CGI.pm | 4 +++- IkiWiki/Rcs/SVN.pm | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'IkiWiki') diff --git a/IkiWiki/CGI.pm b/IkiWiki/CGI.pm index 9e85e1f44..b07e7fd64 100644 --- a/IkiWiki/CGI.pm +++ b/IkiWiki/CGI.pm @@ -39,6 +39,7 @@ sub cgi_recentchanges ($) { #{{{ wikiname => $config{wikiname}, changelog => [rcs_recentchanges(100)], styleurl => styleurl(), + baseurl => "$config{url}/", ); print $q->header, $template->output; } #}}} @@ -329,6 +330,7 @@ sub cgi_editpage ($$) { #{{{ $form->tmpl_param("helponformattinglink", htmllink("", "HelpOnFormatting", 1)); $form->tmpl_param("styleurl", styleurl()); + $form->tmpl_param("baseurl", "$config{url}/"); if (! $form->submitted) { $form->field(name => "rcsinfo", value => rcs_prepedit($file), force => 1); @@ -509,7 +511,7 @@ sub cgi () { #{{{ CGI::Session->name("ikiwiki_session_$config{wikiname}"); my $oldmask=umask(077); - my $session = CGI::Session->new("driver:db_file", $q, + my $session = CGI::Session->new("driver:DB_File", $q, { FileName => "$config{wikistatedir}/sessions.db" }); umask($oldmask); diff --git a/IkiWiki/Rcs/SVN.pm b/IkiWiki/Rcs/SVN.pm index 02fc3ed31..c6f8f2ab1 100644 --- a/IkiWiki/Rcs/SVN.pm +++ b/IkiWiki/Rcs/SVN.pm @@ -111,7 +111,7 @@ sub rcs_recentchanges ($) { #{{{ my $div=qr/^--------------------+$/; my $state='start'; my ($rev, $user, $when, @pages, @message); - foreach (`LANG=C svn log --limit $num -v '$svn_url'`) { + foreach (`LANG=C svn log -v '$svn_url'`) { chomp; if ($state eq 'start' && /$div/) { $state='header'; -- cgit v1.2.3