From: intrigeri Date: Wed, 22 Dec 2010 11:54:18 +0000 (+0100) Subject: Merge remote branch 'upstream/master' into prv/po X-Git-Tag: 3.20101231~44^2~2 X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/commitdiff_plain/a8d733130e99c3b611605d2b3d0db9a9ca8f98f7?hp=fd6d4fda6a95f8318c33aed66c4fcf05aad72b86 Merge remote branch 'upstream/master' into prv/po --- diff --git a/IkiWiki/Plugin/po.pm b/IkiWiki/Plugin/po.pm index 79142ed1f..a142bb909 100644 --- a/IkiWiki/Plugin/po.pm +++ b/IkiWiki/Plugin/po.pm @@ -635,7 +635,7 @@ sub mytargetpage ($$) { return $origsubs{'targetpage'}->($page, $ext); } -sub myurlto ($$;$) { +sub myurlto ($;$$) { my $to=shift; my $from=shift; my $absolute=shift; @@ -644,7 +644,12 @@ sub myurlto ($$;$) { if (! length $to && $config{po_link_to} eq "current" && istranslatable('index')) { - 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