X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/f1a70921e3bfc0496b5564582a5a1463b7a98c09..159c0c043cdd4009562087144a37fdda38eb6409:/IkiWiki/Plugin/inline.pm diff --git a/IkiWiki/Plugin/inline.pm b/IkiWiki/Plugin/inline.pm index e7d6f250e..2fbb45e02 100644 --- a/IkiWiki/Plugin/inline.pm +++ b/IkiWiki/Plugin/inline.pm @@ -186,7 +186,6 @@ sub preprocess_inline (@) { my @list; if (exists $params{pagenames}) { - foreach my $p (qw(sort pages)) { if (exists $params{$p}) { error sprintf(gettext("the %s and %s parameters cannot be used together"), @@ -194,9 +193,8 @@ sub preprocess_inline (@) { } } - @list = split ' ', $params{pagenames}; - my $_; - @list = map { bestlink($params{page}, $_) } @list; + @list = map { bestlink($params{page}, $_) } + split ' ', $params{pagenames}; $params{pages} = join(" or ", @list); } @@ -350,6 +348,9 @@ sub preprocess_inline (@) { } my $template=HTML::Template->new(@params) unless $raw; + my $discussionlink=lc(gettext("Discussion")) + if $config{discussion}; + foreach my $page (@list) { my $file = $pagesources{$page}; my $type = pagetype($file); @@ -373,7 +374,6 @@ sub preprocess_inline (@) { my $file = $pagesources{$page}; my $type = pagetype($file); if ($config{discussion}) { - my $discussionlink=lc(gettext("Discussion")); if ($page !~ /.*\/\Q$discussionlink\E$/ && (length $config{cgiurl} || exists $links{$page."/".$discussionlink})) {