diff options
| author | roundcube <roundcube@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2006-03-23 22:32:47 +0000 |
|---|---|---|
| committer | roundcube <roundcube@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2006-03-23 22:32:47 +0000 |
| commit | 3e94d97cdbfd9926ca1182654c60b88d77871124 (patch) | |
| tree | 3b7bf1caed4bc0755ec3e76c520cb6fb7ba565c3 /roundcubemail/program/lib | |
| parent | 21f5cae2c2ac9a4e6db08ca05f532be40eabd913 (diff) | |
Started implementing search function
git-svn-id: https://svn.roundcube.net/trunk@171 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/lib')
| -rw-r--r-- | roundcubemail/program/lib/imap.inc | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/roundcubemail/program/lib/imap.inc b/roundcubemail/program/lib/imap.inc index bef2de9ed..73eb97002 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 ...) @@ -1396,7 +1397,7 @@ function iil_SortHeaders($a, $field, $flag){ if (empty($flag)) $flag="ASC"; $flag=strtoupper($flag); $stripArr = ($field=='subject') ? array('Re: ','Fwd: ','Fw: ',"\"") : array("\""); - + $c=count($a); if ($c>0){ /* @@ -1410,8 +1411,18 @@ function iil_SortHeaders($a, $field, $flag){ $index=array(); 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($value->date); + if ($data != false) + $data = $timestamp; + } + else { + $data=$a[$key]->$field; + if (is_string($data)) + $data=strtoupper(str_replace($stripArr, "", $data)); + } + $index[$key]=$data; } |
