summaryrefslogtreecommitdiff
path: root/program/steps/mail/show.inc
diff options
context:
space:
mode:
authorthomascube <thomas@roundcube.net>2008-04-12 13:54:45 +0000
committerthomascube <thomas@roundcube.net>2008-04-12 13:54:45 +0000
commit47124c2279382714afd8dbe4a867a867ea179199 (patch)
tree9ce67f4521f466d8718604a23d74de1786189efd /program/steps/mail/show.inc
parentb00bd0f27d1c066d04fc8124c3a35465a5933ab1 (diff)
Changed codebase to PHP5 with autoloader + added some new classes from the devel-vnext branch
Diffstat (limited to 'program/steps/mail/show.inc')
-rw-r--r--program/steps/mail/show.inc23
1 files changed, 10 insertions, 13 deletions
diff --git a/program/steps/mail/show.inc b/program/steps/mail/show.inc
index 94e4c6105..cc167009f 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 @@ 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');
?>