po: keep masterpage as the rootpage for inline's post form
authorintrigeri <intrigeri@boum.org>
Fri, 28 Aug 2009 11:57:15 +0000 (13:57 +0200)
committerintrigeri <intrigeri@boum.org>
Fri, 28 Aug 2009 12:22:36 +0000 (14:22 +0200)
Signed-off-by: intrigeri <intrigeri@boum.org>
IkiWiki/Plugin/po.pm

index 55c1c32c64f24c563b40d17e8249163b2d8b36c5..103347c3776f20980ce75b9203614b102f694e2d 100644 (file)
@@ -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;