From 197601ef5fa2e6aaabfb6e0baaf56179f7cc1ee3 Mon Sep 17 00:00:00 2001
From: thomascube <thomas@roundcube.net>
Date: Wed, 30 Apr 2008 04:21:42 -0400
Subject: [PATCH] Next step: introduce the application class 'rcmail' and get rid of some global vars

---
 program/steps/mail/show.inc |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/program/steps/mail/show.inc b/program/steps/mail/show.inc
index a530184..8062f45 100644
--- a/program/steps/mail/show.inc
+++ b/program/steps/mail/show.inc
@@ -19,7 +19,7 @@
 
 */
 
-$PRINT_MODE = $_action=='print' ? TRUE : FALSE;
+$PRINT_MODE = $RCMAIL->action=='print' ? TRUE : FALSE;
 
 // similar code as in program/steps/mail/get.inc
 if ($_GET['_uid'])
@@ -35,11 +35,11 @@
   if (!$MESSAGE['headers'])
     {
     $OUTPUT->show_message('messageopenerror', 'error');
-    if ($_action=='preview' && template_exists('messagepreview'))
+    if ($RCMAIL->action=='preview' && template_exists('messagepreview'))
         $OUTPUT->send('messagepreview');
     else
       {
-      $_action = 'list';
+      $RCMAIL->action = 'list';
       return;
       }
     }
@@ -78,7 +78,7 @@
   if (!$MESSAGE['headers']->seen)
   {
     $marked = $IMAP->set_flag($MESSAGE['UID'], 'SEEN');
-    if($_action == 'preview' && $marked != -1)
+    if($RCMAIL->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']);
@@ -203,9 +203,9 @@
   'blockedobjects' => 'rcmail_remote_objects_msg'));
 
 
-if ($_action=='print' && template_exists('printmessage'))
+if ($RCMAIL->action=='print' && template_exists('printmessage'))
   $OUTPUT->send('printmessage');
-else if ($_action=='preview' && template_exists('messagepreview'))
+else if ($RCMAIL->action=='preview' && template_exists('messagepreview'))
     $OUTPUT->send('messagepreview');
 else
   $OUTPUT->send('message');

--
Gitblit v1.9.1