From e54bb72d30cfd88fcef5434b472fb3d9b2cca710 Mon Sep 17 00:00:00 2001 From: alecpl Date: Fri, 31 Jul 2009 09:07:54 +0000 Subject: - Added 'display_next' option --- program/steps/mail/func.inc | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'program/steps/mail/func.inc') diff --git a/program/steps/mail/func.inc b/program/steps/mail/func.inc index 21f0fede7..d82c8ef71 100644 --- a/program/steps/mail/func.inc +++ b/program/steps/mail/func.inc @@ -93,6 +93,8 @@ if (empty($RCMAIL->action) || $RCMAIL->action == 'list') $OUTPUT->set_env('read_when_deleted', true); if ($CONFIG['skip_deleted']) $OUTPUT->set_env('skip_deleted', true); + if ($CONFIG['display_next']) + $OUTPUT->set_env('display_next', true); if ($CONFIG['trash_mbox']) $OUTPUT->set_env('trash_mailbox', $CONFIG['trash_mbox']); @@ -686,18 +688,16 @@ function rcmail_wash_html($html, $p = array(), $cid_replaces) $html = preg_replace_callback('/(<[\/!]*)([^ >]+)/', 'rcmail_html_tag_callback', $html); // charset was converted to UTF-8 in rcube_imap::get_message_part(), - // -> change charset specification in HTML accordingly - $charset_pattern = '(content=[\'"]?\w+\/\w+;\s*charset)=([a-z0-9-_]+)'; - if (preg_match("/]*$charset_pattern/Ui", $html)) { - $html = preg_replace("/\s+$charset_pattern/i", '\\1='.RCMAIL_CHARSET, $html); + // change charset specification in HTML accordingly + $charset_pattern = '/(\s+content=[\'"]?\w+\/\w+;\s*charset)=([a-z0-9-_]+)/i'; + if (preg_match($charset_pattern, $html)) { + $html = preg_replace($charset_pattern, '\\1='.RCMAIL_CHARSET, $html); } - else { - // add meta content-type to malformed messages, washtml cannot work without that - if (!preg_match('/]*>(.*)<\/head>/Uims', $html)) - $html = ''. $html; - $html = substr_replace($html, '', intval(stripos($html, '')+6), 0); - } - + // add head for malformed messages, washtml cannot work without that + if (!preg_match('/]*>(.*)<\/head>/Uims', $html)) + $html = ''. $html; + $html = substr_replace($html, '', intval(stripos($html, '')+6), 0); + // turn relative into absolute urls $html = rcmail_resolve_base($html); -- cgit v1.2.3