aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2006-03-24 02:42:19 +0000
committerjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2006-03-24 02:42:19 +0000
commite910e67424aeaf56c547578af6c98914a7180811 (patch)
tree83b3389e087c94a79cafc7f640a33eb1e3db1c46
parente1823922e6f3f177abfb599857bbaea26e867b82 (diff)
downloadikiwiki-e910e67424aeaf56c547578af6c98914a7180811.tar
ikiwiki-e910e67424aeaf56c547578af6c98914a7180811.tar.gz
fixes
-rw-r--r--IkiWiki/Setup.pm7
-rw-r--r--doc/ikiwiki.setup2
-rwxr-xr-xikiwiki14
3 files changed, 13 insertions, 10 deletions
diff --git a/IkiWiki/Setup.pm b/IkiWiki/Setup.pm
index 63659ce2e..0c8ad9208 100644
--- a/IkiWiki/Setup.pm
+++ b/IkiWiki/Setup.pm
@@ -9,8 +9,11 @@ sub setup () { # {{{
my $setup=possibly_foolish_untaint($config{setup});
delete $config{setup};
open (IN, $setup) || error("read $setup: $!\n");
- local $/=undef;
- my $code=<IN>;
+ my $code;
+ {
+ local $/=undef;
+ $code=<IN>;
+ }
($code)=$code=~/(.*)/s;
close IN;
diff --git a/doc/ikiwiki.setup b/doc/ikiwiki.setup
index b81983080..bd82f3d10 100644
--- a/doc/ikiwiki.setup
+++ b/doc/ikiwiki.setup
@@ -45,5 +45,5 @@ use IkiWiki::Setup::Standard {
# Can anonymous web users edit pages?
#anonok => 1,
# Generate rss feeds for pages?
- #rss => 1,
+ rss => 1,
}
diff --git a/ikiwiki b/ikiwiki
index 77c7744f9..ea5604365 100755
--- a/ikiwiki
+++ b/ikiwiki
@@ -466,7 +466,13 @@ sub globlist_match ($$) { #{{{
sub main () { #{{{
getconfig();
- if ($config{setup}) {
+ if ($config{cgi}) {
+ lockwiki();
+ loadindex();
+ require IkiWiki::CGI;
+ cgi();
+ }
+ elsif ($config{setup}) {
require IkiWiki::Setup;
setup();
}
@@ -475,12 +481,6 @@ sub main () { #{{{
require IkiWiki::Wrapper;
gen_wrapper();
}
- elsif ($config{cgi}) {
- lockwiki();
- loadindex();
- require IkiWiki::CGI;
- cgi();
- }
else {
lockwiki();
loadindex();