]> sipb.mit.edu Git - ikiwiki.git/commitdiff
- add <base> to cgi output, this is especially useful for output containing
authorjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>
Sun, 2 Apr 2006 22:24:08 +0000 (22:24 +0000)
committerjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>
Sun, 2 Apr 2006 22:24:08 +0000 (22:24 +0000)
  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
IkiWiki/Rcs/SVN.pm
doc/bugs.mdwn
doc/setup.mdwn
ikiwiki
templates/editpage.tmpl
templates/misc.tmpl
templates/recentchanges.tmpl

index 9e85e1f4402d8399f0714cba1d9cf34f470d3efe..b07e7fd642f3956604962505d62f02951af2be71 100644 (file)
@@ -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);
        
index 02fc3ed3126a240d354c08f84730eba582b9a011..c6f8f2ab1c53fddef977507f68f985a158eb48c6 100644 (file)
@@ -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';
index 06fa54bcd05b7ef01bbdb24130327e0005f42a5c..5ef78b25a5d7b34828a9919dd08d9e1379f7ccfd 100644 (file)
   page that someone wrote in a web browser annoying (`gqip` is vim user's
   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?
+    - 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
   will linger around and not be deleted.
 * Currently only one blog is supported per page. Attempts to add more
   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
 * 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
@@ -37,3 +36,5 @@
 * Markdown will try to expand stuff inside postprocessordirectives. For
   example, if there are two *'s, it will turn them to html em's, which
   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
index b49c2918ef9cea37ea89d3798e2ce093dff92c9b..e80ba24ac2d84c77fbd86fdedd349fb50f2bd8bf 100644 (file)
@@ -7,8 +7,8 @@ optional support for commits from the web.
                apt-get install ikiwiki # soon
 
    Ikiwiki requires [[MarkDown]] be installed, and also uses the following
-   perl modules: `CGI::Session` `CGI::FormBuilder` `HTML::Template`
-   `Mail::SendMail` `Time::Duration`
+   perl modules: `CGI::Session` `CGI::FormBuilder` (version 3.02.02 or
+   newer) `HTML::Template` `Mail::SendMail` `Time::Duration`
 
 2. Create the subversion repository for your wiki.
 
diff --git a/ikiwiki b/ikiwiki
index 8eebcdf77e90f48a3c6c74087408e3d836c81369..f7ccaf743ea0420a061a67a5944ea463d2ddfc43 100755 (executable)
--- a/ikiwiki
+++ b/ikiwiki
@@ -428,6 +428,7 @@ sub misctemplate ($$) { #{{{
                wikiname => $config{wikiname},
                pagebody => $pagebody,
                styleurl => styleurl(),
+               baseurl => "$config{url}/",
        );
        return $template->output;
 }#}}}
index 1733483d311b1618e2c6e5f2b76da00e3f209b61..4724cd65fd6e3e551eacc00dfd5ff4acb4ea0d2b 100644 (file)
@@ -2,6 +2,9 @@
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
 <html>
 <head>
+<TMPL_IF NAME="BASEURL">
+<base href="<TMPL_VAR BASEURL>" />
+</TMPL_IF>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 <title><TMPL_VAR FORM-TITLE></title>
 <link rel="stylesheet" href="<TMPL_VAR STYLEURL>" type="text/css" />
index 442db8c21cafb4589680978500b23ccad83f0018..1f724d3cd70b4da4ef623f801d2918b2c7cacd69 100644 (file)
@@ -2,6 +2,9 @@
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
 <html>
 <head>
+<TMPL_IF NAME="BASEURL">
+<base href="<TMPL_VAR BASEURL>" />
+</TMPL_IF>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 <title><TMPL_VAR TITLE></title>
 <link rel="stylesheet" href="<TMPL_VAR STYLEURL>" type="text/css" />
index 9836e1f2af7153617fad760d400fd9bc8902dac7..f9e7541da8ea6333537ef3e5151fd48ed3338e4e 100644 (file)
@@ -2,6 +2,9 @@
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
 <html>
 <head>
+<TMPL_IF NAME="BASEURL">
+<base href="<TMPL_VAR BASEURL>" />
+</TMPL_IF>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 <title><TMPL_VAR TITLE></title>
 <link rel="stylesheet" href="<TMPL_VAR STYLEURL>" type="text/css" />