]> sipb.mit.edu Git - ikiwiki.git/blob - doc/patchqueue/inline_-_sort_by_old_first.mdwn
7501bbd15160f1c24bea24b8cde3174fd66d46f4
[ikiwiki.git] / doc / patchqueue / inline_-_sort_by_old_first.mdwn
1 Quick hack to be able to list old entries first :
2
3 --- inline.pm   2007-01-18 18:21:27.000000000 +0100
4 +++ /usr/share/perl5/IkiWiki/Plugin/inline.pm   2007-01-18 18:23:01.000000000 +0100
5 @@ -92,6 +92,9 @@
6         elsif (! exists $params{sort} || $params{sort} eq 'age') {
7                 @list=sort { $pagectime{$b} <=> $pagectime{$a} } @list;
8         }
9 +       elsif (! exists $params{sort} || $params{sort} eq 'old') {
10 +               @list=sort { $pagectime{$a} <=> $pagectime{$b} } @list;
11 +       }
12         else {
13                 return sprintf(gettext("unknown sort type %s"), $params{sort});
14         }
15
16 this patch adds a new type of sort "old".
17
18 However, I wonder if it would be better to add another option for inline like "sortorder" with "desc" or "asc" keywords ?