]> git.pld-linux.org Git - packages/eventum.git/blob - eventum-charset.patch
- memory limit patches merged
[packages/eventum.git] / eventum-charset.patch
1 in Mime_Helper::getCharacterSet() if the email cis multipart/mixed and contains
2 only one subpart, take the charset from that first part, rather from primary
3 part.
4
5 --- eventum-20060725/include/class.mime_helper.php      2006-07-26 11:29:55.240578707 +0300
6 +++ include/class.mime_helper.php       2006-07-26 14:20:18.000000000 +0300
7 @@ -67,7 +67,13 @@
8              return false;
9          }
10  
11 -        $content_type = @$structure->headers['content-type'];
12 +        if ($structure->ctype_primary == 'multipart' and $structure->ctype_secondary == 'mixed'
13 +            and count($structure->parts) == 1) {
14 +            $content_type = $structure->parts[0]->headers['content-type'];
15 +        } else {
16 +            $content_type = @$structure->headers['content-type'];
17 +        }
18 +
19          if (preg_match('/charset\s*=\s*(["\'])?([-\w\d]+)(\1)?;?/i', $content_type, $matches)) {
20              return $matches[2];
21          }
This page took 0.025865 seconds and 3 git commands to generate.