- hook(type => "checkconfig", id => "po", call => \&checkconfig);
+ hook(type => "checkconfig", id => "po", call => \&checkconfig,
+ last => 1);
hook(type => "needsbuild", id => "po", call => \&needsbuild);
hook(type => "scan", id => "po", call => \&scan, last => 1);
hook(type => "filter", id => "po", call => \&filter);
hook(type => "needsbuild", id => "po", call => \&needsbuild);
hook(type => "scan", id => "po", call => \&scan, last => 1);
hook(type => "filter", id => "po", call => \&filter);
if (ref $config{po_slave_languages} eq 'ARRAY') {
foreach my $pair (@{$config{po_slave_languages}}) {
my ($code, $name)=splitlangpair($pair);
if (ref $config{po_slave_languages} eq 'ARRAY') {
foreach my $pair (@{$config{po_slave_languages}}) {
my ($code, $name)=splitlangpair($pair);
push @slavelanguages, $code;
$slavelanguages{$code} = $name;
}
push @slavelanguages, $code;
$slavelanguages{$code} = $name;
}
- return IkiWiki::beautify_urlpath(IkiWiki::baseurl($from) . "index." . lang($from) . ".$config{htmlext}");
+ if (defined $from) {
+ return IkiWiki::beautify_urlpath(IkiWiki::baseurl($from) . "index." . lang($from) . ".$config{htmlext}");
+ }
+ else {
+ return $origsubs{'urlto'}->($to,$from,$absolute);
+ }
}
# avoid using our injected beautify_urlpath if run by cgi_editpage,
# so that one is redirected to the just-edited page rather than to the
}
# avoid using our injected beautify_urlpath if run by cgi_editpage,
# so that one is redirected to the just-edited page rather than to the
if (! defined $code || ! defined $name ||
! length $code || ! length $name) {
# not a fatal error to avoid breaking if used with web setup
if (! defined $code || ! defined $name ||
! length $code || ! length $name) {
# not a fatal error to avoid breaking if used with web setup