X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/bb258b56b29cb01f27bdc0dfd0bced55a88574ed..091f11be76991c3975c74d261ab4a065845ba8aa:/IkiWiki/Plugin/inline.pm?ds=sidebyside diff --git a/IkiWiki/Plugin/inline.pm b/IkiWiki/Plugin/inline.pm index 218fd7515..27ea1c4a6 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; @@ -281,8 +277,8 @@ sub preprocess_inline (@) { } } - my $rssurl=basename($feedbase."rss".$feednum) if $feeds && $rss; - my $atomurl=basename($feedbase."atom".$feednum) if $feeds && $atom; + my $rssurl=abs2rel($feedbase."rss".$feednum, dirname(htmlpage($params{destpage}))) if $feeds && $rss; + my $atomurl=abs2rel($feedbase."atom".$feednum, dirname(htmlpage($params{destpage}))) if $feeds && $atom; my $ret=""; @@ -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}));