- add <base> 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.
master
joey 2006-04-02 22:24:08 +00:00
parent 2942d580a1
commit c4e0e8c36c
8 changed files with 20 additions and 7 deletions

View File

@ -39,6 +39,7 @@ sub cgi_recentchanges ($) { #{{{
wikiname => $config{wikiname}, wikiname => $config{wikiname},
changelog => [rcs_recentchanges(100)], changelog => [rcs_recentchanges(100)],
styleurl => styleurl(), styleurl => styleurl(),
baseurl => "$config{url}/",
); );
print $q->header, $template->output; print $q->header, $template->output;
} #}}} } #}}}
@ -329,6 +330,7 @@ sub cgi_editpage ($$) { #{{{
$form->tmpl_param("helponformattinglink", $form->tmpl_param("helponformattinglink",
htmllink("", "HelpOnFormatting", 1)); htmllink("", "HelpOnFormatting", 1));
$form->tmpl_param("styleurl", styleurl()); $form->tmpl_param("styleurl", styleurl());
$form->tmpl_param("baseurl", "$config{url}/");
if (! $form->submitted) { if (! $form->submitted) {
$form->field(name => "rcsinfo", value => rcs_prepedit($file), $form->field(name => "rcsinfo", value => rcs_prepedit($file),
force => 1); force => 1);
@ -509,7 +511,7 @@ sub cgi () { #{{{
CGI::Session->name("ikiwiki_session_$config{wikiname}"); CGI::Session->name("ikiwiki_session_$config{wikiname}");
my $oldmask=umask(077); 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" }); { FileName => "$config{wikistatedir}/sessions.db" });
umask($oldmask); umask($oldmask);

View File

@ -111,7 +111,7 @@ sub rcs_recentchanges ($) { #{{{
my $div=qr/^--------------------+$/; my $div=qr/^--------------------+$/;
my $state='start'; my $state='start';
my ($rev, $user, $when, @pages, @message); 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; chomp;
if ($state eq 'start' && /$div/) { if ($state eq 'start' && /$div/) {
$state='header'; $state='header';

View File

@ -21,13 +21,12 @@
page that someone wrote in a web browser annoying (`gqip` is vim user's page that someone wrote in a web browser annoying (`gqip` is vim user's
friend here). Is there any way to improve this? friend here). Is there any way to improve this?
* The diff links in RecentChanges go to a viewcvs backtrace if the rev in question is when the page was added. Is this a viewcvs bug, or a behavior ikiwiki needs to work around? * The diff links in RecentChanges go to a viewcvs backtrace if the rev in question is when the page was added. Is this a viewcvs bug, or a behavior ikiwiki needs to work around?
- As a special case, there should certianly be no history link for
pages generated from the underlaydir as it can never work for them.
* If a page stops inlining anthing, its rss feed file * If a page stops inlining anthing, its rss feed file
will linger around and not be deleted. will linger around and not be deleted.
* Currently only one blog is supported per page. Attempts to add more * Currently only one blog is supported per page. Attempts to add more
will make it only update one of the blogs on the page. will make it only update one of the blogs on the page.
* If I edit blog/entry/blog_moved, add a link to code/ikiwiki, and hit
preview, it doesn't get the link right because it makes it relative to
where the page will be saved to, not to where the cgi script is.
* RSS output contains relative links. Ie. http://kitenet.net/~joey/blog/index.rss contains a link to http://kitenet.net/~joey/blog/../blog.html * RSS output contains relative links. Ie. http://kitenet.net/~joey/blog/index.rss contains a link to http://kitenet.net/~joey/blog/../blog.html
* If a file in the srcdir is removed, exposing a file in the underlaydir, * If a file in the srcdir is removed, exposing a file in the underlaydir,
ikiwiki will not notice the change and rebuild it until the file in the ikiwiki will not notice the change and rebuild it until the file in the
@ -37,3 +36,5 @@
* Markdown will try to expand stuff inside postprocessordirectives. For * Markdown will try to expand stuff inside postprocessordirectives. For
example, if there are two *'s, it will turn them to html em's, which example, if there are two *'s, it will turn them to html em's, which
breaks things unexpectedly and requires escaping. breaks things unexpectedly and requires escaping.
* ikiwiki will generate html formatted error messages to the command
line if --cgi is set, even if it's not yet running as a cgi

View File

@ -7,8 +7,8 @@ optional support for commits from the web.
apt-get install ikiwiki # soon apt-get install ikiwiki # soon
Ikiwiki requires [[MarkDown]] be installed, and also uses the following Ikiwiki requires [[MarkDown]] be installed, and also uses the following
perl modules: `CGI::Session` `CGI::FormBuilder` `HTML::Template` perl modules: `CGI::Session` `CGI::FormBuilder` (version 3.02.02 or
`Mail::SendMail` `Time::Duration` newer) `HTML::Template` `Mail::SendMail` `Time::Duration`
2. Create the subversion repository for your wiki. 2. Create the subversion repository for your wiki.

View File

@ -428,6 +428,7 @@ sub misctemplate ($$) { #{{{
wikiname => $config{wikiname}, wikiname => $config{wikiname},
pagebody => $pagebody, pagebody => $pagebody,
styleurl => styleurl(), styleurl => styleurl(),
baseurl => "$config{url}/",
); );
return $template->output; return $template->output;
}#}}} }#}}}

View File

@ -2,6 +2,9 @@
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html> <html>
<head> <head>
<TMPL_IF NAME="BASEURL">
<base href="<TMPL_VAR BASEURL>" />
</TMPL_IF>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><TMPL_VAR FORM-TITLE></title> <title><TMPL_VAR FORM-TITLE></title>
<link rel="stylesheet" href="<TMPL_VAR STYLEURL>" type="text/css" /> <link rel="stylesheet" href="<TMPL_VAR STYLEURL>" type="text/css" />

View File

@ -2,6 +2,9 @@
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html> <html>
<head> <head>
<TMPL_IF NAME="BASEURL">
<base href="<TMPL_VAR BASEURL>" />
</TMPL_IF>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><TMPL_VAR TITLE></title> <title><TMPL_VAR TITLE></title>
<link rel="stylesheet" href="<TMPL_VAR STYLEURL>" type="text/css" /> <link rel="stylesheet" href="<TMPL_VAR STYLEURL>" type="text/css" />

View File

@ -2,6 +2,9 @@
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html> <html>
<head> <head>
<TMPL_IF NAME="BASEURL">
<base href="<TMPL_VAR BASEURL>" />
</TMPL_IF>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><TMPL_VAR TITLE></title> <title><TMPL_VAR TITLE></title>
<link rel="stylesheet" href="<TMPL_VAR STYLEURL>" type="text/css" /> <link rel="stylesheet" href="<TMPL_VAR STYLEURL>" type="text/css" />