if an inlined page has the same copyright or license as the page it's
inlined into, don't display them twicemaster
parent
906dcfd518
commit
1e7b0415d3
|
@ -128,6 +128,7 @@ sub preprocess (@) { #{{{
|
||||||
sub pagetemplate (@) { #{{{
|
sub pagetemplate (@) { #{{{
|
||||||
my %params=@_;
|
my %params=@_;
|
||||||
my $page=$params{page};
|
my $page=$params{page};
|
||||||
|
my $destpage=$params{destpage};
|
||||||
my $template=$params{template};
|
my $template=$params{template};
|
||||||
|
|
||||||
$template->param(meta => $meta{$page})
|
$template->param(meta => $meta{$page})
|
||||||
|
@ -142,11 +143,17 @@ sub pagetemplate (@) { #{{{
|
||||||
if exists $author{$page} && $template->query(name => "author");
|
if exists $author{$page} && $template->query(name => "author");
|
||||||
$template->param(authorurl => $authorurl{$page})
|
$template->param(authorurl => $authorurl{$page})
|
||||||
if exists $authorurl{$page} && $template->query(name => "authorurl");
|
if exists $authorurl{$page} && $template->query(name => "authorurl");
|
||||||
$template->param(license => $license{$page})
|
|
||||||
if exists $license{$page} && $template->query(name => "license");
|
if (exists $license{$page} && $template->query(name => "license") &&
|
||||||
$template->param(copyright => $copyright{$page})
|
($page ne $destpage || ! exists $license{$destpage} ||
|
||||||
if exists $copyright{$page} && $template->query(name => "copyright");
|
$license{$page} ne $license{$destpage})) {
|
||||||
|
$template->param(license => $license{$page})
|
||||||
|
}
|
||||||
|
if (exists $copyright{$page} && $template->query(name => "copyright") &&
|
||||||
|
($page ne $destpage || ! exists $copyright{$destpage} ||
|
||||||
|
$copyright{$page} ne $copyright{$destpage})) {
|
||||||
|
$template->param(copyright => $copyright{$page})
|
||||||
|
}
|
||||||
} # }}}
|
} # }}}
|
||||||
|
|
||||||
1
|
1
|
||||||
|
|
Loading…
Reference in New Issue