summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorthomascube <thomas@roundcube.net>2007-10-17 06:50:28 +0000
committerthomascube <thomas@roundcube.net>2007-10-17 06:50:28 +0000
commitecd2e7961433462d01dabc38d1fd090431f70566 (patch)
tree3fa5699c577664ee4091effe69aeae4af8aeba56
parent6f2a943145af2192341e5544dd37a467fbb61d6e (diff)
Make message listing less error prone
-rw-r--r--CHANGELOG5
-rw-r--r--program/include/rcube_imap.inc4
-rw-r--r--program/steps/mail/func.inc6
3 files changed, 13 insertions, 2 deletions
diff --git a/CHANGELOG b/CHANGELOG
index 4d3c60389..94a81a04a 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,8 +1,13 @@
CHANGELOG RoundCube Webmail
---------------------------
+2007/10/17 (thomasb)
+----------
+- Make message listing less error prone
+
2007/10/10 (thomasb)
----------
+- Suppress IE errors when clearing attachments form (#1484356)
- Set preferences field in user table to NULL (#1484386)
- Log error when login fails due to auto_create_user turned off
- Update UPGRADING instructions
diff --git a/program/include/rcube_imap.inc b/program/include/rcube_imap.inc
index 9eb359457..be7f44f4e 100644
--- a/program/include/rcube_imap.inc
+++ b/program/include/rcube_imap.inc
@@ -2040,6 +2040,10 @@ class rcube_imap
{
$uid = $sql_arr['uid'];
$this->cache[$cache_key][$uid] = unserialize($sql_arr['headers']);
+
+ // featch headers if unserialize failed
+ if (empty($this->cache[$cache_key][$uid]))
+ $this->cache[$cache_key][$uid] = iil_C_FetchHeader($this->conn, preg_replace('/.msg$/', '', $key), $uid, true);
}
}
diff --git a/program/steps/mail/func.inc b/program/steps/mail/func.inc
index 30d60e6da..02263292a 100644
--- a/program/steps/mail/func.inc
+++ b/program/steps/mail/func.inc
@@ -314,11 +314,13 @@ function rcmail_js_message_list($a_headers, $insert_top=FALSE)
$OUTPUT->command('set_message_coltypes', $a_show_cols);
// loop through message headers
- for ($n=0; $a_headers[$n]; $n++)
+ foreach ($a_headers as $n => $header)
{
- $header = $a_headers[$n];
$a_msg_cols = array();
$a_msg_flags = array();
+
+ if (empty($header))
+ continue;
// format each col; similar as in rcmail_message_list()
foreach ($a_show_cols as $col)