- hook(type => "checkconfig", id => "po", call => \&checkconfig);
+ hook(type => "checkconfig", id => "po", call => \&checkconfig,
+ last => 1);
hook(type => "needsbuild", id => "po", call => \&needsbuild);
hook(type => "scan", id => "po", call => \&scan, last => 1);
hook(type => "filter", id => "po", call => \&filter);
hook(type => "needsbuild", id => "po", call => \&needsbuild);
hook(type => "scan", id => "po", call => \&scan, last => 1);
hook(type => "filter", id => "po", call => \&filter);
inject(name => "IkiWiki::urlto", call => \&myurlto);
$origsubs{'cgiurl'}=\&IkiWiki::cgiurl;
inject(name => "IkiWiki::cgiurl", call => \&mycgiurl);
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);
}
$origsubs{'isselflink'}=\&IkiWiki::isselflink;
inject(name => "IkiWiki::isselflink", call => \&myisselflink);
}
if (istranslation($page) || istranslatable($page)) {
my ($masterpage, $lang) = (masterpage($page), lang($page));
if (istranslation($page) || istranslatable($page)) {
my ($masterpage, $lang) = (masterpage($page), lang($page));
- if (! $config{usedirs} || $masterpage eq 'index') {
+ if (defined $filename) {
+ return $masterpage . "/" . $filename . "." . $lang . "." . $ext;
+ }
+ elsif (! $config{usedirs} || $masterpage eq 'index') {