From 47124c2279382714afd8dbe4a867a867ea179199 Mon Sep 17 00:00:00 2001 From: thomascube <thomas@roundcube.net> Date: Sat, 12 Apr 2008 09:54:45 -0400 Subject: [PATCH] Changed codebase to PHP5 with autoloader + added some new classes from the devel-vnext branch --- program/steps/mail/show.inc | 23 ++++++++++------------- 1 files changed, 10 insertions(+), 13 deletions(-) diff --git a/program/steps/mail/show.inc b/program/steps/mail/show.inc index 94e4c61..cc16700 100644 --- a/program/steps/mail/show.inc +++ b/program/steps/mail/show.inc @@ -19,9 +19,6 @@ */ -require_once('Mail/mimeDecode.php'); -require_once('lib/rc_mail_mime.inc'); - $PRINT_MODE = $_action=='print' ? TRUE : FALSE; // similar code as in program/steps/mail/get.inc @@ -39,7 +36,7 @@ { $OUTPUT->show_message('messageopenerror', 'error'); if ($_action=='preview' && template_exists('messagepreview')) - parse_template('messagepreview'); + $OUTPUT->send('messagepreview'); else { $_action = 'list'; @@ -79,14 +76,14 @@ // mark message as read if (!$MESSAGE['headers']->seen) + { + $marked = $IMAP->set_flag($MESSAGE['UID'], 'SEEN'); + if($_action == 'preview' && $marked != -1) { - $marked = $IMAP->set_flag($MESSAGE['UID'], 'SEEN'); - if($_action == 'preview' && $marked != -1) - { - $OUTPUT->command('set_unread_count_from_preview', $mbox_name, $IMAP->messagecount($mbox_name, 'UNSEEN'), ($mbox_name == 'INBOX')); - $OUTPUT->command('mark_as_read_from_preview', $MESSAGE['UID']); - } + $OUTPUT->command('set_unread_count_from_preview', $mbox_name, $IMAP->messagecount($mbox_name, 'UNSEEN'), ($mbox_name == 'INBOX')); + $OUTPUT->command('mark_as_read_from_preview', $MESSAGE['UID']); } + } // give message uid to the client $OUTPUT->set_env('uid', $MESSAGE['UID']); @@ -207,9 +204,9 @@ if ($_action=='print' && template_exists('printmessage')) - parse_template('printmessage'); + $OUTPUT->send('printmessage'); else if ($_action=='preview' && template_exists('messagepreview')) - parse_template('messagepreview'); + $OUTPUT->send('messagepreview'); else - parse_template('message'); + $OUTPUT->send('message'); ?> -- Gitblit v1.9.1