From d734041f00e3d70d422004c2dc3948f3fdd17ab5 Mon Sep 17 00:00:00 2001
From: alecpl <alec@alec.pl>
Date: Tue, 16 Sep 2008 14:05:25 -0400
Subject: [PATCH] - Added icons for forwarded/forwarded+replied messages (#1485257)

---
 program/steps/mail/func.inc |   18 ++++++++++++++++--
 1 files changed, 16 insertions(+), 2 deletions(-)

diff --git a/program/steps/mail/func.inc b/program/steps/mail/func.inc
index 02bc4dc..7e9f0fe 100644
--- a/program/steps/mail/func.inc
+++ b/program/steps/mail/func.inc
@@ -206,16 +206,25 @@
       $js_row_arr['unread'] = true;
     if ($header->answered)
       $js_row_arr['replied'] = true;
+    if ($header->forwarded)
+      $js_row_arr['forwarded'] = true;
     if ($header->flagged)
       $js_row_arr['flagged'] = true;
 
     // set message icon  
     if ($attrib['deletedicon'] && $header->deleted)
       $message_icon = $attrib['deletedicon'];
+    else if ($attrib['repliedicon'] && $header->answered)
+      {
+      if ($attrib['forwardedrepliedicon'] && $header->forwarded)
+        $message_icon = $attrib['forwardedrepliedicon'];
+      else
+        $message_icon = $attrib['repliedicon'];
+      }
+    else if ($attrib['forwardedicon'] && $header->forwarded)
+      $message_icon = $attrib['forwardedicon'];
     else if ($attrib['unreadicon'] && !$header->seen)
       $message_icon = $attrib['unreadicon'];
-    else if ($attrib['repliedicon'] && $header->answered)
-      $message_icon = $attrib['repliedicon'];
     else if ($attrib['messageicon'])
       $message_icon = $attrib['messageicon'];
 
@@ -296,6 +305,10 @@
     $OUTPUT->set_env('unreadicon', $skin_path . $attrib['unreadicon']);
   if ($attrib['repliedicon'])
     $OUTPUT->set_env('repliedicon', $skin_path . $attrib['repliedicon']);
+  if ($attrib['forwardedicon'])
+    $OUTPUT->set_env('forwardedicon', $skin_path . $attrib['forwardedicon']);
+  if ($attrib['forwardedrepliedicon'])
+    $OUTPUT->set_env('forwardedrepliedicon', $skin_path . $attrib['forwardedrepliedicon']);
   if ($attrib['attachmenticon'])
     $OUTPUT->set_env('attachmenticon', $skin_path . $attrib['attachmenticon']);
   if ($attrib['flaggedicon'])
@@ -367,6 +380,7 @@
     $a_msg_flags['deleted'] = $header->deleted ? 1 : 0;
     $a_msg_flags['unread'] = $header->seen ? 0 : 1;
     $a_msg_flags['replied'] = $header->answered ? 1 : 0;
+    $a_msg_flags['forwarded'] = $header->forwarded ? 1 : 0;
     $a_msg_flags['flagged'] = $header->flagged ? 1 : 0;
     
     $OUTPUT->command('add_message_row',

--
Gitblit v1.9.1