From 62e43d2c1a61d26f9a07419f7155a2881cb57332 Mon Sep 17 00:00:00 2001
From: thomascube <thomas@roundcube.net>
Date: Sat, 14 Jun 2008 13:35:26 -0400
Subject: [PATCH] Complete implementation of #1484601: add link for saving sender to address book and reload message

---
 program/include/rcube_message.php |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/program/include/rcube_message.php b/program/include/rcube_message.php
index d810ef3..6654c3f 100644
--- a/program/include/rcube_message.php
+++ b/program/include/rcube_message.php
@@ -42,6 +42,7 @@
   public $mime_parts = array();
   public $attachments = array();
   public $subject = '';
+  public $sender = null;
   public $is_safe = false;
   
   
@@ -53,9 +54,10 @@
     $this->uid = $uid;
     $this->headers = $this->imap->get_headers($uid);
     $this->subject = rcube_imap::decode_mime_string($this->headers->subject, $this->headers->charset);
+    list(, $this->sender) = each($this->imap->decode_address_list($this->headers->from));
     
-    $this->is_safe = (intval($_GET['_safe']) || $_SESSION['safe_messages'][$uid]) ? true : false;
-    $_SESSION['safe_messages'][$uid] = $this->is_safe;
+    $this->set_safe((intval($_GET['_safe']) || $_SESSION['safe_messages'][$uid]));
+    $this->set_safe(0);
     
     $this->opt = array(
       'safe' => $this->is_safe,

--
Gitblit v1.9.1