summaryrefslogtreecommitdiff
path: root/IkiWiki/Plugin/po.pm
diff options
context:
space:
mode:
Diffstat (limited to 'IkiWiki/Plugin/po.pm')
-rw-r--r--IkiWiki/Plugin/po.pm6
1 files changed, 4 insertions, 2 deletions
diff --git a/IkiWiki/Plugin/po.pm b/IkiWiki/Plugin/po.pm
index 21e3b8e37..792d84261 100644
--- a/IkiWiki/Plugin/po.pm
+++ b/IkiWiki/Plugin/po.pm
@@ -154,8 +154,10 @@ sub checkconfig () {
$config{po_link_to}='default';
}
unless ($config{po_link_to} eq 'default') {
- $origsubs{'bestlink'}=\&IkiWiki::bestlink;
- inject(name => "IkiWiki::bestlink", call => \&mybestlink);
+ if (! exists $origsubs{'bestlink'}) {
+ $origsubs{'bestlink'}=\&IkiWiki::bestlink;
+ inject(name => "IkiWiki::bestlink", call => \&mybestlink);
+ }
}
push @{$config{wiki_file_prune_regexps}}, qr/\.pot$/;