summaryrefslogtreecommitdiff
path: root/program/steps/mail/show.inc
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2010-12-01 09:52:23 +0000
committeralecpl <alec@alec.pl>2010-12-01 09:52:23 +0000
commitb46edc0f906e00f8cff42541f49f0d58181c836c (patch)
tree121a068b0d3bd9f573d2dcd9b1aa9a8148d7bc31 /program/steps/mail/show.inc
parent43fb35b5cb97522e1fa3e358c8511788b7d02a3d (diff)
- Fix "Cannot use scalar value..." warning (#1487066)
Diffstat (limited to 'program/steps/mail/show.inc')
-rw-r--r--program/steps/mail/show.inc7
1 files changed, 5 insertions, 2 deletions
diff --git a/program/steps/mail/show.inc b/program/steps/mail/show.inc
index e660207cd..45dd8e168 100644
--- a/program/steps/mail/show.inc
+++ b/program/steps/mail/show.inc
@@ -196,8 +196,11 @@ else
if ($MESSAGE && $MESSAGE->headers && !$MESSAGE->headers->seen &&
($RCMAIL->action == 'show' || ($RCMAIL->action == 'preview' && intval($CONFIG['preview_pane_mark_read']) == 0)))
{
- if ($IMAP->set_flag($MESSAGE->uid, 'SEEN') && $_SESSION['unseen_count'][$mbox_name])
- $_SESSION['unseen_count'][$mbox_name] -= 1;
+ if ($IMAP->set_flag($MESSAGE->uid, 'SEEN')) {
+ if ($count = rcmail_get_unseen_count($mbox_name)) {
+ rcmail_set_unseen_count($mbox_name, $count - 1);
+ }
+ }
}
exit;