diff options
author | Thomas Bruederli <thomas@roundcube.net> | 2013-04-08 19:23:54 +0200 |
---|---|---|
committer | Thomas Bruederli <thomas@roundcube.net> | 2013-04-08 19:23:54 +0200 |
commit | ce31c026c2d399b0b6f2665c8252e5245ad8f48d (patch) | |
tree | 2cbd3068104aea36a51f738d31b5584b66a8be53 /program/lib/Roundcube/rcube_message.php | |
parent | ee696929ad7e79e593b1b1c98bb8e0ffcd0158e8 (diff) | |
parent | 4fdaa02ac724e597479a4a48388a8a10101000fd (diff) |
Merge branch 'master' of github.com:roundcube/roundcubemail
Diffstat (limited to 'program/lib/Roundcube/rcube_message.php')
-rw-r--r-- | program/lib/Roundcube/rcube_message.php | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/program/lib/Roundcube/rcube_message.php b/program/lib/Roundcube/rcube_message.php index 41a114f7f..69735fc52 100644 --- a/program/lib/Roundcube/rcube_message.php +++ b/program/lib/Roundcube/rcube_message.php @@ -85,12 +85,13 @@ class rcube_message $this->headers = $this->storage->get_message($uid); - if (!$this->headers) + if (!$this->headers) { return; + } $this->mime = new rcube_mime($this->headers->charset); - $this->subject = $this->mime->decode_mime_string($this->headers->subject); + $this->subject = $this->headers->get('subject'); list(, $this->sender) = each($this->mime->decode_address_list($this->headers->from, 1)); $this->set_safe((intval($_GET['_safe']) || $_SESSION['safe_messages'][$this->folder.':'.$uid])); @@ -125,15 +126,11 @@ class rcube_message */ public function get_header($name, $raw = false) { - if (empty($this->headers)) + if (empty($this->headers)) { return null; + } - if ($this->headers->$name) - $value = $this->headers->$name; - else if ($this->headers->others[$name]) - $value = $this->headers->others[$name]; - - return $raw ? $value : $this->mime->decode_header($value); + return $this->headers->get($name, !$raw); } |