projects
/
ikiwiki.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a32e7b1
)
sort rootset by date
0.4
author
David Bremner
<bremner@unb.ca>
Sun, 7 Sep 2008 20:29:40 +0000
(17:29 -0300)
committer
David Bremner
<bremner@unb.ca>
Sun, 7 Sep 2008 20:29:40 +0000
(17:29 -0300)
IkiWiki/Plugin/mailbox.pm
patch
|
blob
|
history
diff --git
a/IkiWiki/Plugin/mailbox.pm
b/IkiWiki/Plugin/mailbox.pm
index bf626030bb69a3f78a7fa443a6fe5838b0b3a1bd..df77579f776387a9fe5ccd0ceee8f3db22954e15 100644
(file)
--- a/
IkiWiki/Plugin/mailbox.pm
+++ b/
IkiWiki/Plugin/mailbox.pm
@@
-19,7
+19,7
@@
use Email::Thread;
use CGI 'escapeHTML';
use File::Temp qw/tempfile/;
use File::MimeInfo::Magic;
-
+use Date::Parse;
my %metaheaders;
@@
-82,7
+82,11
@@
sub format_mailbox(@){
$threader->thread();
- return join "\n", map { format_thread(%params,thread=>$_) } $threader->rootset;
+ my @roots= sort { str2time($a->header('Date')) <=>
+ str2time($b->header('Date'))} ($threader->rootset);
+
+ return join "\n", map { format_thread(%params,thread=>$_) } @roots;
+
}
sub format_thread(@){