]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki/Setup/Standard.pm
add news item for ikiwiki 1.26
[git.ikiwiki.info.git] / IkiWiki / Setup / Standard.pm
index 25f038a064ac8ceab4333f0d93ba13b1203262f2..b7583097daf84851b0ebc43900ae941e79677695 100644 (file)
@@ -30,17 +30,22 @@ sub setup_standard {
                }
                delete $setup{disable_plugins};
        }
+       if (exists $setup{exclude}) {
+               $config{wiki_file_prune_regexp}=qr/$config{wiki_file_prune_regexp}|$setup{exclude}/;
+       }
 
-       debug("generating wrappers..");
-       my @wrappers=@{$setup{wrappers}};
-       delete $setup{wrappers};
-       my %startconfig=(%config);
-       foreach my $wrapper (@wrappers) {
-               %config=(%startconfig, verbose => 0, %setup, %{$wrapper});
-               checkconfig();
-               gen_wrapper();
+       if (! $config{refresh} || $config{wrappers}) {
+               debug("generating wrappers..");
+               my @wrappers=@{$setup{wrappers}};
+               delete $setup{wrappers};
+               my %startconfig=(%config);
+               foreach my $wrapper (@wrappers) {
+                       %config=(%startconfig, verbose => 0, %setup, %{$wrapper});
+                       checkconfig();
+                       gen_wrapper();
+               }
+               %config=(%startconfig);
        }
-       %config=(%startconfig);
        
        foreach my $c (keys %setup) {
                if (defined $setup{$c}) {
@@ -50,6 +55,11 @@ sub setup_standard {
                        elsif (ref $setup{$c} eq 'ARRAY') {
                                $config{$c}=[map { possibly_foolish_untaint($_) } @{$setup{$c}}]
                        }
+                       elsif (ref $setup{$c} eq 'HASH') {
+                               foreach my $key (keys %{$setup{$c}}) {
+                                       $config{$c}{$key}=possibly_foolish_untaint($setup{$c}{$key});
+                               }
+                       }
                }
                else {
                        $config{$c}=undef;
@@ -64,6 +74,7 @@ sub setup_standard {
                debug("refreshing wiki..");
        }
 
+       loadplugins();
        checkconfig();
        lockwiki();
        loadindex();