From 7c2d30b2e106a23fe2ab295f7dc2e628e4d828bb Mon Sep 17 00:00:00 2001
From: alecpl <alec@alec.pl>
Date: Wed, 13 Aug 2008 07:39:10 -0400
Subject: [PATCH] #1485170: fixed splitter under Firefox3
---
program/include/rcube_message.php | 17 ++++++++++++++---
1 files changed, 14 insertions(+), 3 deletions(-)
diff --git a/program/include/rcube_message.php b/program/include/rcube_message.php
index 7dc74ab..48f9997 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,9 @@
$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->opt = array(
'safe' => $this->is_safe,
@@ -82,10 +83,20 @@
*/
public function get_header($name, $raw = false)
{
- $value = $this->header->$name;
+ $value = $this->headers->$name;
return $raw ? $value : $this->imap->decode_header($value);
}
+ /**
+ * Set is_safe var and session data
+ *
+ * @param bool enable/disable
+ */
+ public function set_safe($safe = true)
+ {
+ $this->is_safe = $safe;
+ $_SESSION['safe_messages'][$this->uid] = $this->is_safe;
+ }
/**
* Compose a valid URL for getting a message part
--
Gitblit v1.9.1