]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki/Plugin/inline.pm
move comments to copyright and changelog
[git.ikiwiki.info.git] / IkiWiki / Plugin / inline.pm
index a89e827c1c7ff2ecf2a877c7dd48d11e2105fbcd..9d7d4b0fd832d32aa7c00ece7ede97ca1847508f 100644 (file)
@@ -195,7 +195,10 @@ sub preprocess_inline (@) {
                @list=sort { pagetitle(basename($a)) cmp pagetitle(basename($b)) } @list;
        }
        elsif (exists $params{sort} && $params{sort} eq 'title_natural') {
-               require Sort::Naturally;
+               eval q{use Sort::Naturally};
+               if ($@) {
+                       error(gettext("Sort::Naturally needed for title_natural sort"));
+               }
                @list=sort { Sort::Naturally::ncmp(pagetitle(basename($a)), pagetitle(basename($b))) } @list;
        }
        elsif (exists $params{sort} && $params{sort} eq 'mtime') {
@@ -278,8 +281,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="";