summaryrefslogtreecommitdiff
path: root/IkiWiki/Plugin
diff options
context:
space:
mode:
Diffstat (limited to 'IkiWiki/Plugin')
-rw-r--r--IkiWiki/Plugin/po.pm7
1 files changed, 5 insertions, 2 deletions
diff --git a/IkiWiki/Plugin/po.pm b/IkiWiki/Plugin/po.pm
index 4f8d5036e..0ea35b21c 100644
--- a/IkiWiki/Plugin/po.pm
+++ b/IkiWiki/Plugin/po.pm
@@ -66,8 +66,11 @@ sub import {
inject(name => "IkiWiki::urlto", call => \&myurlto);
$origsubs{'cgiurl'}=\&IkiWiki::cgiurl;
inject(name => "IkiWiki::cgiurl", call => \&mycgiurl);
- $origsubs{'rootpage'}=\&IkiWiki::rootpage;
- inject(name => "IkiWiki::rootpage", call => \&myrootpage);
+ if (IkiWiki->can('rootpage')) {
+ $origsubs{'rootpage'}=\&IkiWiki::rootpage;
+ inject(name => "IkiWiki::rootpage", call => \&myrootpage)
+ if defined $origsubs{'rootpage'};
+ }
$origsubs{'isselflink'}=\&IkiWiki::isselflink;
inject(name => "IkiWiki::isselflink", call => \&myisselflink);
}