aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorintrigeri <intrigeri@boum.org>2009-08-28 13:57:15 +0200
committerintrigeri <intrigeri@boum.org>2009-08-28 14:22:36 +0200
commitcf43ae5a1f5460a98cdd7acb36c0691b2eec988f (patch)
treee44181967a26a5fd8329f0023a29d4b15b70fc05
parent72ac9821e566373de49a77ffee642b14ecf643e1 (diff)
downloadikiwiki-cf43ae5a1f5460a98cdd7acb36c0691b2eec988f.tar
ikiwiki-cf43ae5a1f5460a98cdd7acb36c0691b2eec988f.tar.gz
po: keep masterpage as the rootpage for inline's post form
Signed-off-by: intrigeri <intrigeri@boum.org>
-rw-r--r--IkiWiki/Plugin/po.pm6
1 files changed, 5 insertions, 1 deletions
diff --git a/IkiWiki/Plugin/po.pm b/IkiWiki/Plugin/po.pm
index 55c1c32c6..103347c37 100644
--- a/IkiWiki/Plugin/po.pm
+++ b/IkiWiki/Plugin/po.pm
@@ -564,9 +564,13 @@ sub mybestlink ($$) {
my $link=shift;
my $res=$origsubs{'bestlink'}->(masterpage($page), $link);
+ my @caller = caller(1);
if (length $res
&& istranslatable($res)
- && istranslation($page)) {
+ && istranslation($page)
+ # keep masterpage as the rootpage for inline's post form
+ && !(exists $caller[3] && defined $caller[3]
+ && ($caller[3] eq "IkiWiki::rootpage"))) {
return $res . "." . lang($page);
}
return $res;