]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki/Setup.pm
checkconfig before wrapper setup
[git.ikiwiki.info.git] / IkiWiki / Setup.pm
index 262d494797639a43f62b9a5c89c34f34fec03b04..38b7152029a851d0651943abd6ff772f76e6f364 100644 (file)
@@ -48,7 +48,13 @@ sub load ($) { # {{{
                                $config{$c}=IkiWiki::possibly_foolish_untaint($setup{$c});
                        }
                        elsif (ref $setup{$c} eq 'ARRAY') {
-                               $config{$c}=[map { IkiWiki::possibly_foolish_untaint($_) } @{$setup{$c}}]
+                               if ($c eq 'wrappers') {
+                                       # backwards compatability code
+                                       $config{$c}=$setup{$c};
+                               }
+                               else {
+                                       $config{$c}=[map { IkiWiki::possibly_foolish_untaint($_) } @{$setup{$c}}]
+                               }
                        }
                        elsif (ref $setup{$c} eq 'HASH') {
                                foreach my $key (keys %{$setup{$c}}) {
@@ -60,6 +66,14 @@ sub load ($) { # {{{
                        $config{$c}=undef;
                }
        }
+       
+       if (length $config{cgi_wrapper}) {
+               push @{$config{wrappers}}, {
+                       cgi => 1,
+                       wrapper => $config{cgi_wrapper},
+                       wrappermode => (defined $config{cgi_wrappermode} ? $config{cgi_wrappermode} : "06755"),
+               };
+       }
 } #}}}
 
 sub dump ($) { #{{{