po: override the title template variable for coherent homepage titling
Signed-off-by: intrigeri <intrigeri@boum.org>master
parent
3c2bffe21b
commit
6c0f9c691c
|
@ -302,6 +302,9 @@ sub pagetemplate (@) {
|
||||||
&& $masterpage eq "index") {
|
&& $masterpage eq "index") {
|
||||||
$template->param('parentlinks' => []);
|
$template->param('parentlinks' => []);
|
||||||
}
|
}
|
||||||
|
if (ishomepage($page) && $template->query(name => "title")) {
|
||||||
|
$template->param(title => $config{wikiname});
|
||||||
|
}
|
||||||
} # }}}
|
} # }}}
|
||||||
|
|
||||||
# Add the renamed page translations to the list of to-be-renamed pages.
|
# Add the renamed page translations to the list of to-be-renamed pages.
|
||||||
|
@ -960,6 +963,14 @@ sub homepageurl (;$) {
|
||||||
return urlto('', $page);
|
return urlto('', $page);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sub ishomepage ($) {
|
||||||
|
my $page = shift;
|
||||||
|
|
||||||
|
return 1 if $page eq 'index';
|
||||||
|
map { return 1 if $page eq 'index.'.$_ } keys %{$config{po_slave_languages}};
|
||||||
|
return undef;
|
||||||
|
}
|
||||||
|
|
||||||
sub deletetranslations ($) {
|
sub deletetranslations ($) {
|
||||||
my $deletedmasterfile=shift;
|
my $deletedmasterfile=shift;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue