summaryrefslogtreecommitdiff
path: root/program/include/rcube_message_header.php
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2012-06-06 09:22:15 +0200
committerAleksander Machniak <alec@alec.pl>2012-06-06 09:22:15 +0200
commit0f5dee00df59dd2f97c36aa0fc3aca062f9d223a (patch)
tree63d4629faeacae61ff7f6ed383b3382e008f7921 /program/include/rcube_message_header.php
parent0b6d022e6fa9dc08ddbc8ba420cdd58a690cf852 (diff)
Decode header value in rcube_mime::get() by default (#1488511)
Diffstat (limited to 'program/include/rcube_message_header.php')
-rw-r--r--program/include/rcube_message_header.php9
1 files changed, 6 insertions, 3 deletions
diff --git a/program/include/rcube_message_header.php b/program/include/rcube_message_header.php
index f2f91674e..378fb98c9 100644
--- a/program/include/rcube_message_header.php
+++ b/program/include/rcube_message_header.php
@@ -205,15 +205,18 @@ class rcube_message_header
/**
* Returns header value
*/
- public function get($name)
+ public function get($name, $decode = true)
{
$name = strtolower($name);
if (isset($this->obj_headers[$name])) {
- return $this->{$this->obj_headers[$name]};
+ $value = $this->{$this->obj_headers[$name]};
+ }
+ else {
+ $value = $this->others[$name];
}
- return $this->others[$name];
+ return $decode ? rcube_mime::decode_header($value, $this->charset) : $value;
}
/**