]> sipb.mit.edu Git - ikiwiki.git/blobdiff - IkiWiki/Plugin/inline.pm
increase plugin interface to 1.02
[ikiwiki.git] / IkiWiki / Plugin / inline.pm
index 06b74b3fab0442654e6ecd25772cf19efd0bab5f..ebfcee9edec79cd743832684adb6183697293f75 100644 (file)
@@ -81,7 +81,7 @@ sub preprocess_inline (@) { #{{{
        my @list;
        foreach my $page (keys %pagesources) {
                next if $page eq $params{page};
-               if (pagespec_match($page, $params{pages})) {
+               if (pagespec_match($page, $params{pages}, $params{page})) {
                        push @list, $page;
                }
        }
@@ -96,6 +96,10 @@ sub preprocess_inline (@) { #{{{
                return sprintf(gettext("unknown sort type %s"), $params{sort});
        }
 
+       if (yesno($params{reverse})) {
+               @list=reverse(@list);
+       }
+
        if (exists $params{skip}) {
                @list=@list[$params{skip} .. scalar @list - 1];
        }
@@ -162,7 +166,12 @@ sub preprocess_inline (@) { #{{{
                                            (length $config{cgiurl} ||
                                             exists $links{$page."/".$discussionlink})) {
                                                $template->param(have_actions => 1);
-                                               $template->param(discussionlink => htmllink($page, $params{page}, gettext("Discussion"), 1, 1));
+                                               $template->param(discussionlink =>
+                                                       htmllink($page,
+                                                               $params{page},
+                                                               gettext("Discussion"),
+                                                               noimageinline => 1,
+                                                               forcesubpage => 1));
                                        }
                                }
                                if (length $config{cgiurl} && defined $type) {