]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki.pm
* Alignment idea
[git.ikiwiki.info.git] / IkiWiki.pm
index bf4a0d415ab0afc7270f25ca1ab9a7b4c2187a10..64ef6585f00b351b952008f1f21ff2fb40cfee07 100644 (file)
@@ -354,6 +354,13 @@ sub getsetup () { #{{{
                safe => 0,
                rebuild => 0,
        },
                safe => 0,
                rebuild => 0,
        },
+       setup => {
+               type => "internal",
+               default => undef,
+               description => "running in setup mode",
+               safe => 0,
+               rebuild => 0,
+       },
        refresh => {
                type => "internal",
                default => 0,
        refresh => {
                type => "internal",
                default => 0,
@@ -375,10 +382,10 @@ sub getsetup () { #{{{
                safe => 0,
                rebuild => 0,
        },
                safe => 0,
                rebuild => 0,
        },
-       setup => {
+       setupfile => {
                type => "internal",
                default => undef,
                type => "internal",
                default => undef,
-               description => "setup file to read",
+               description => "path to setup file",
                safe => 0,
                rebuild => 0,
        },
                safe => 0,
                rebuild => 0,
        },
@@ -464,7 +471,9 @@ sub loadplugins () { #{{{
                unshift @INC, possibly_foolish_untaint($config{libdir});
        }
 
                unshift @INC, possibly_foolish_untaint($config{libdir});
        }
 
-       loadplugin($_) foreach @{$config{default_plugins}}, @{$config{add_plugins}};
+       foreach my $plugin (@{$config{default_plugins}}, @{$config{add_plugins}}) {
+               loadplugin($plugin);
+       }
        
        if ($config{rcs}) {
                if (exists $IkiWiki::hooks{rcs}) {
        
        if ($config{rcs}) {
                if (exists $IkiWiki::hooks{rcs}) {
@@ -1045,7 +1054,7 @@ sub preprocess ($$$;$$) { #{{{
                my $params=shift;
                $params="" if ! defined $params;
 
                my $params=shift;
                $params="" if ! defined $params;
 
-               f (length $escape) {
+               if (length $escape) {
                        return "[[$prefix$command $params]]";
                }
                elsif (exists $hooks{preprocess}{$command}) {
                        return "[[$prefix$command $params]]";
                }
                elsif (exists $hooks{preprocess}{$command}) {