X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/a1c8520ce8798dcd2d6b16a59da93afbd4bbf86b..ce85eaab9da23cfaa177b934e4c25d64f6651929:/IkiWiki/Plugin/inline.pm diff --git a/IkiWiki/Plugin/inline.pm b/IkiWiki/Plugin/inline.pm index 9d7d4b0fd..9d5ebc34d 100644 --- a/IkiWiki/Plugin/inline.pm +++ b/IkiWiki/Plugin/inline.pm @@ -183,13 +183,9 @@ sub preprocess_inline (@) { $params{template} = $archive ? "archivepage" : "inlinepage"; } - my @list; - foreach my $page (keys %pagesources) { - next if $page eq $params{page}; - if (pagespec_match($page, $params{pages}, location => $params{page})) { - push @list, $page; - } - } + my @list=pagespec_match_list( + [ grep { $_ ne $params{page} } keys %pagesources ], + $params{pages}, location => $params{page}); if (exists $params{sort} && $params{sort} eq 'title') { @list=sort { pagetitle(basename($a)) cmp pagetitle(basename($b)) } @list; @@ -346,7 +342,7 @@ sub preprocess_inline (@) { my $content=get_inline_content($page, $params{destpage}); $template->param(content => $content); } - $template->param(pageurl => urlto(bestlink($params{page}, $page), $params{destpage})); + $template->param(pageurl => urlto($page, $params{destpage})); $template->param(inlinepage => $page); $template->param(title => pagetitle(basename($page))); $template->param(ctime => displaytime($pagectime{$page}, $params{timeformat})); @@ -358,7 +354,7 @@ sub preprocess_inline (@) { my $file = $pagesources{$page}; my $type = pagetype($file); if ($config{discussion}) { - my $discussionlink=gettext("discussion"); + my $discussionlink=lc(gettext("Discussion")); if ($page !~ /.*\/\Q$discussionlink\E$/ && (length $config{cgiurl} || exists $links{$page."/".$discussionlink})) {