X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/ac69a979059198a3716d1e177d177e978e1f1785..7144eb3973ac73a5f79440f91a7c01665fb83aa4:/ikiwiki diff --git a/ikiwiki b/ikiwiki index 111ef54fc..7e140bbec 100755 --- a/ikiwiki +++ b/ikiwiki @@ -307,14 +307,14 @@ sub parentlinks ($) { #{{{ my $skip=1; foreach my $dir (reverse split("/", $page)) { if (! $skip) { + $path.="../"; unshift @ret, { url => "$path$dir.html", page => $dir }; } else { $skip=0; } - $path.="../"; } - unshift @ret, { url => $path , page => $config{wikiname} }; + unshift @ret, { url => length $path ? $path : ".", page => $config{wikiname} }; return @ret; } #}}} @@ -1152,14 +1152,28 @@ sub cgi () { #{{{ sub setup () { # {{{ my $setup=possibly_foolish_untaint($config{setup}); + delete $config{setup}; open (IN, $setup) || error("read $setup: $!\n"); local $/=undef; my $code=; ($code)=$code=~/(.*)/s; close IN; + + my (%setup); eval $code; error($@) if $@; - print "ikiwiki setup complete\n"; + + gen_wrapper(%config, %setup, %{$setup{cgiwrapper}}) if $setup{cgiwrapper}; + gen_wrapper(%config, %setup, %{$setup{svnwrapper}}) if $setup{svnwrapper}; + + print "$setup{wikiname} setup complete, now forcing a rebuild\n"; + foreach my $c (keys %setup) { + $config{$c}=possibly_foolish_untaint($setup{$c}) + if defined $setup{$c} && ! ref $setup{$c}; + } + $config{rebuild}=1; + refresh(); + saveindex(); exit; } #}}}