unshift @INC, possibly_foolish_untaint($config{libdir});
}
- loadplugin($_) foreach @{$config{plugin}};
+ foreach my $plugin (@{$config{plugin}}) {
+ loadplugin($plugin);
+ }
run_hooks(getopt => sub { shift->() });
if (grep /^-/, @ARGV) {
return $url;
} #}}}
-sub urlto ($$) { #{{{
+sub urlto ($$;$) { #{{{
my $to=shift;
my $from=shift;
-
+ my $absolute=shift;
+
if (! length $to) {
return beautify_url(baseurl($from)."index.$config{htmlext}");
}
$to=htmlpage($to);
}
+ if ($absolute) {
+ return $config{url}.beautify_urlpath("/".$to);
+ }
+
my $link = abs2rel($to, dirname(htmlpage($from)));
return beautify_url($link);
my $params=shift;
$params="" if ! defined $params;
- f (length $escape) {
+ if (length $escape) {
return "[[$prefix$command $params]]";
}
elsif (exists $hooks{preprocess}{$command}) {