summaryrefslogtreecommitdiff
path: root/roundcubemail/program/lib
diff options
context:
space:
mode:
authorroundcube <roundcube@208e9e7b-5314-0410-a742-e7e81cd9613c>2006-03-27 19:06:30 +0000
committerroundcube <roundcube@208e9e7b-5314-0410-a742-e7e81cd9613c>2006-03-27 19:06:30 +0000
commit1d0440c1ca1b2701198b7ac46a4954ffb89ac92a (patch)
tree85d41b4c05e25f531a77f6b3d7cab939147d8b8b /roundcubemail/program/lib
parent482a13a6cef0aa5f591cda30ad67ab574ae8e044 (diff)
Fixed buggy date sorting patch
git-svn-id: https://svn.roundcube.net/trunk@174 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/lib')
-rw-r--r--roundcubemail/program/lib/imap.inc14
1 files changed, 11 insertions, 3 deletions
diff --git a/roundcubemail/program/lib/imap.inc b/roundcubemail/program/lib/imap.inc
index a9ad91ff7..97286c4ff 100644
--- a/roundcubemail/program/lib/imap.inc
+++ b/roundcubemail/program/lib/imap.inc
@@ -39,6 +39,7 @@
- Added BCC and REFERENCE to the list of headers to fetch in iil_C_FetchHeaders()
- Leave messageID unchanged in iil_C_FetchHeaders()
- Avoid stripslahes in iil_Connect()
+ - Added patch to iil_SortHeaders() by Richard Green
- Removed <br> from error messages (better for logging)
- Removed some debuggers (echo ...)
@@ -1411,9 +1412,16 @@ function iil_SortHeaders($a, $field, $flag){
reset($a);
while (list($key, $val)=each($a)){
- $data=$a[$key]->$field;
- if (is_string($data))
- $data=strtoupper(str_replace($stripArr, "", $data));
+ if ($field=="timestamp"){
+ $data = @strtotime($val->date);
+ if ($data == false)
+ $data = $val->timestamp;
+ }
+ else {
+ $data = $val->$field;
+ if (is_string($data))
+ $data=strtoupper(str_replace($stripArr, "", $data));
+ }
$index[$key]=$data;
}