summaryrefslogtreecommitdiff
path: root/roundcubemail/program/steps/mail/show.inc
diff options
context:
space:
mode:
authorthomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c>2008-04-12 13:54:45 +0000
committerthomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c>2008-04-12 13:54:45 +0000
commit83a4e859f8ae505f06c184eb60577529ff6c4be8 (patch)
treeeea0a263dd79a697205db95f0a3b5600e6aa70c9 /roundcubemail/program/steps/mail/show.inc
parent1d297be10effab84c7e084bfc70651f99b10e91b (diff)
Changed codebase to PHP5 with autoloader + added some new classes from the devel-vnext branch
git-svn-id: https://svn.roundcube.net/trunk@1291 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/steps/mail/show.inc')
-rw-r--r--roundcubemail/program/steps/mail/show.inc23
1 files changed, 10 insertions, 13 deletions
diff --git a/roundcubemail/program/steps/mail/show.inc b/roundcubemail/program/steps/mail/show.inc
index 94e4c6105..cc167009f 100644
--- a/roundcubemail/program/steps/mail/show.inc
+++ b/roundcubemail/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 @@ if ($_GET['_uid'])
{
$OUTPUT->show_message('messageopenerror', 'error');
if ($_action=='preview' && template_exists('messagepreview'))
- parse_template('messagepreview');
+ $OUTPUT->send('messagepreview');
else
{
$_action = 'list';
@@ -79,14 +76,14 @@ if ($_GET['_uid'])
// 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 @@ $OUTPUT->add_handlers(array(
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');
?>