aboutsummaryrefslogtreecommitdiff
path: root/IkiWiki
diff options
context:
space:
mode:
authorjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2006-03-26 05:08:41 +0000
committerjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2006-03-26 05:08:41 +0000
commitffc0be87d7eca4de4dbc91d740d36b7b40bfa911 (patch)
tree123d7568d749906e1896b189866321c9ddf510f1 /IkiWiki
parentda1f96550e15f6b02156cd0f77df9a6bc6a6b079 (diff)
downloadikiwiki-ffc0be87d7eca4de4dbc91d740d36b7b40bfa911.tar
ikiwiki-ffc0be87d7eca4de4dbc91d740d36b7b40bfa911.tar.gz
add --refresh and make it with with --setup
Diffstat (limited to 'IkiWiki')
-rw-r--r--IkiWiki/CGI.pm2
-rw-r--r--IkiWiki/Setup.pm1
-rw-r--r--IkiWiki/Setup/Standard.pm26
3 files changed, 18 insertions, 11 deletions
diff --git a/IkiWiki/CGI.pm b/IkiWiki/CGI.pm
index 560377f0e..f472413b8 100644
--- a/IkiWiki/CGI.pm
+++ b/IkiWiki/CGI.pm
@@ -513,7 +513,7 @@ sub cgi () { #{{{
# is entered
my $page=lc($q->param('title'));
$page=~y/ /_/;
- $page=~s/([^-A-Za-z0-9_:+/])/"__".ord($1)."__"/eg;
+ $page=~s/([^-A-Za-z0-9_:+\/])/"__".ord($1)."__"/eg;
# if the page already exist, munge it to be unique
my $from=$q->param('from');
my $add="";
diff --git a/IkiWiki/Setup.pm b/IkiWiki/Setup.pm
index 0c8ad9208..40ed78862 100644
--- a/IkiWiki/Setup.pm
+++ b/IkiWiki/Setup.pm
@@ -19,6 +19,7 @@ sub setup () { # {{{
eval $code;
error($@) if $@;
+
exit;
} #}}}
diff --git a/IkiWiki/Setup/Standard.pm b/IkiWiki/Setup/Standard.pm
index c5a67afdf..b26df006b 100644
--- a/IkiWiki/Setup/Standard.pm
+++ b/IkiWiki/Setup/Standard.pm
@@ -20,21 +20,27 @@ package IkiWiki;
sub setup_standard {
my %setup=%{$_[1]};
- debug("generating wrappers..");
- my %startconfig=(%config);
- foreach my $wrapper (@{$setup{wrappers}}) {
- %config=(%startconfig, verbose => 0, %setup, %{$wrapper});
- checkconfig();
- gen_wrapper();
+ if (! $config{refresh}) {
+ debug("generating wrappers..");
+ my %startconfig=(%config);
+ foreach my $wrapper (@{$setup{wrappers}}) {
+ %config=(%startconfig, verbose => 0, %setup, %{$wrapper});
+ checkconfig();
+ gen_wrapper();
+ }
+ %config=(%startconfig);
}
- %config=(%startconfig);
-
- debug("rebuilding wiki..");
foreach my $c (keys %setup) {
$config{$c}=possibly_foolish_untaint($setup{$c})
if defined $setup{$c} && ! ref $setup{$c};
}
- $config{rebuild}=1;
+ if (! $config{refresh}) {
+ $config{rebuild}=1;
+ debug("rebuilding wiki..");
+ }
+ else {
+ debug("refreshing wiki..");
+ }
checkconfig();
lockwiki();