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