summaryrefslogtreecommitdiff
path: root/IkiWiki/Plugin
diff options
context:
space:
mode:
authorJoey Hess <joey@kitenet.net>2010-12-25 12:35:25 -0400
committerJoey Hess <joey@kitenet.net>2010-12-25 12:35:25 -0400
commitc5f1c503cdac65a55e6a796c86fdcc9d0b9ad6d3 (patch)
treefe3bd9f4faa218f09d0ed53f3c69ef3e241360e3 /IkiWiki/Plugin
parent64d4a4ab9c2ffe2d87fb604a431513d06c916aa2 (diff)
parentb2a2246bac236cbe059042482828e68413597fd8 (diff)
Merge remote branch 'intrigeri/po'
Diffstat (limited to 'IkiWiki/Plugin')
-rw-r--r--IkiWiki/Plugin/po.pm12
1 files changed, 9 insertions, 3 deletions
diff --git a/IkiWiki/Plugin/po.pm b/IkiWiki/Plugin/po.pm
index 79142ed1f..9ed4a1adb 100644
--- a/IkiWiki/Plugin/po.pm
+++ b/IkiWiki/Plugin/po.pm
@@ -367,7 +367,8 @@ sub pagetemplate (@) {
&& $masterpage eq "index") {
$template->param('parentlinks' => []);
}
- if (ishomepage($page) && $template->query(name => "title")) {
+ if (ishomepage($page) && $template->query(name => "title")
+ && !$template->param("title_overridden")) {
$template->param(title => $config{wikiname});
}
}
@@ -635,7 +636,7 @@ sub mytargetpage ($$) {
return $origsubs{'targetpage'}->($page, $ext);
}
-sub myurlto ($$;$) {
+sub myurlto ($;$$) {
my $to=shift;
my $from=shift;
my $absolute=shift;
@@ -644,7 +645,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