From 15c468d5aed3792623da85be88c9327502617f21 Mon Sep 17 00:00:00 2001 From: joey Date: Thu, 18 Jan 2007 17:27:51 +0000 Subject: web commit by hb --- doc/patchqueue/inline_-_sort_by_old_first.mdwn | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 doc/patchqueue/inline_-_sort_by_old_first.mdwn (limited to 'doc/patchqueue') diff --git a/doc/patchqueue/inline_-_sort_by_old_first.mdwn b/doc/patchqueue/inline_-_sort_by_old_first.mdwn new file mode 100644 index 000000000..7501bbd15 --- /dev/null +++ b/doc/patchqueue/inline_-_sort_by_old_first.mdwn @@ -0,0 +1,18 @@ +Quick hack to be able to list old entries first : + +--- inline.pm 2007-01-18 18:21:27.000000000 +0100 ++++ /usr/share/perl5/IkiWiki/Plugin/inline.pm 2007-01-18 18:23:01.000000000 +0100 +@@ -92,6 +92,9 @@ + elsif (! exists $params{sort} || $params{sort} eq 'age') { + @list=sort { $pagectime{$b} <=> $pagectime{$a} } @list; + } ++ elsif (! exists $params{sort} || $params{sort} eq 'old') { ++ @list=sort { $pagectime{$a} <=> $pagectime{$b} } @list; ++ } + else { + return sprintf(gettext("unknown sort type %s"), $params{sort}); + } + +this patch adds a new type of sort "old". + +However, I wonder if it would be better to add another option for inline like "sortorder" with "desc" or "asc" keywords ? \ No newline at end of file -- cgit v1.2.3