diff options
Diffstat (limited to 'program/steps/mail/show.inc')
-rw-r--r-- | program/steps/mail/show.inc | 32 |
1 files changed, 15 insertions, 17 deletions
diff --git a/program/steps/mail/show.inc b/program/steps/mail/show.inc index e1909a4d9..3d52e1c74 100644 --- a/program/steps/mail/show.inc +++ b/program/steps/mail/show.inc @@ -129,18 +129,21 @@ if ($uid) { } } - if (empty($MESSAGE->headers->flags['SEEN']) - && $MESSAGE->context === null - && ($RCMAIL->action == 'show' || ($RCMAIL->action == 'preview' && intval($RCMAIL->config->get('preview_pane_mark_read')) == 0)) - ) { - $RCMAIL->output->command('set_unread_message', $MESSAGE->uid, $mbox_name); - $RCMAIL->plugins->exec_hook('message_read', array( - 'uid' => $MESSAGE->uid, - 'mailbox' => $mbox_name, - 'message' => $MESSAGE, - )); - - $set_seen_flag = true; + if (empty($MESSAGE->headers->flags['SEEN']) && $MESSAGE->context === null) { + $v = intval($RCMAIL->config->get('mail_read_time')); + if ($v > 0) { + $OUTPUT->set_env('mail_read_time', $v); + } + else if ($v == 0) { + $RCMAIL->output->command('set_unread_message', $MESSAGE->uid, $mbox_name); + $RCMAIL->plugins->exec_hook('message_read', array( + 'uid' => $MESSAGE->uid, + 'mailbox' => $mbox_name, + 'message' => $MESSAGE, + )); + + $set_seen_flag = true; + } } } @@ -170,11 +173,6 @@ if (!empty($set_seen_flag)) { } } -// Save preview_pane preference, if not set yet (#1490362) -if ($RCMAIL->action == 'preview' && !$RCMAIL->config->get('preview_pane')) { - $RCMAIL->user->save_prefs(array('preview_pane' => true)); -} - exit; |