]> git.pld-linux.org Git - packages/eventum.git/blame - eventum-regex-cosmetic.patch
- updated to 20060921.3107 svn snap
[packages/eventum.git] / eventum-regex-cosmetic.patch
CommitLineData
84c640ec
ER
1--- eventum/include/class.routing.php~ 2006-09-07 23:32:17.000000000 +0300
2+++ eventum/include/class.routing.php 2006-09-07 23:56:05.122543011 +0300
3@@ -60,9 +60,10 @@
4 // save the full message for logging purposes
5 Support::saveRoutedEmail($full_message);
6
7- if (preg_match("/^(boundary=).*/m", $full_message)) {
8- $pattern = "/(Content-Type: multipart\/)(.+); ?\r?\n(boundary=)(.*)$/im";
9- $replacement = '$1$2; $3$4';
10+ // join the Content-Type line (for easier parsing?)
11+ if (preg_match('/^boundary=/m', $full_message)) {
12+ $pattern = "#(Content-Type: multipart/.+); ?\r?\n(boundary=.*)$#im";
13+ $replacement = '$1; $2';
14 $full_message = preg_replace($pattern, $replacement, $full_message);
15 }
16 // associate routed emails to the internal system account
17@@ -84,7 +84,7 @@
18 //
19
20 // remove the reply-to: header
21- if (preg_match("/^(reply-to:).*/im", $full_message)) {
22+ if (preg_match('/^reply-to:.*/im', $full_message)) {
23 $full_message = preg_replace("/^(reply-to:).*\n/im", '', $full_message, 1);
24 }
25
26@@ -271,9 +271,10 @@
27 // save the full message for logging purposes
28 Note::saveRoutedNote($full_message);
29
30- if (preg_match("/^(boundary=).*/m", $full_message)) {
31- $pattern = "/(Content-Type: multipart\/)(.+); ?\r?\n(boundary=)(.*)$/im";
32- $replacement = '$1$2; $3$4';
33+ // join the Content-Type line (for easier parsing?)
34+ if (preg_match('/^boundary=/m', $full_message)) {
35+ $pattern = "#(Content-Type: multipart/.+); ?\r?\n(boundary=.*)$#im";
36+ $replacement = '$1; $2';
37 $full_message = preg_replace($pattern, $replacement, $full_message);
38 }
39
40@@ -290,7 +291,7 @@
41 //
42
43 // remove the reply-to: header
44- if (preg_match("/^(reply-to:).*/im", $full_message)) {
45+ if (preg_match('/^reply-to:.*/im', $full_message)) {
46 $full_message = preg_replace("/^(reply-to:).*\n/im", '', $full_message, 1);
47 }
48
49--- eventum/include/class.mime_helper.php~ 2006-09-07 23:32:17.000000000 +0300
50+++ eventum/include/class.mime_helper.php 2006-09-08 00:17:21.483076433 +0300
51@@ -594,9 +598,9 @@
52 // content-type header is split into another line, the PEAR library would
53 // not work correctly. this fix will make the boundary part go to the
54 // same line as the content-type one
55- if (preg_match("/^(boundary=).*/m", $message)) {
56- $pattern = "/(Content-Type: multipart\/)(.+); ?\r?\n(boundary=)(.*)$/im";
57- $replacement = '$1$2; $3$4';
58+ if (preg_match('/^boundary=/m', $message)) {
59+ $pattern = "#(Content-Type: multipart/.+); ?\r?\n(boundary=)$#im";
60+ $replacement = '$1; $2';
61 $message = preg_replace($pattern, $replacement, $message);
62 }
63
64--- eventum/include/class.mime_helper.php~ 2006-09-08 00:24:49.000000000 +0300
65+++ eventum/include/class.mime_helper.php 2006-09-08 00:28:40.622076651 +0300
66@@ -192,7 +192,7 @@
67 $second_part = substr($address, strrpos($address, '<'));
68 $address = $first_part;
69 }
70- if (preg_match('/^"(.*)"/', $address)) {
71+ if (preg_match('/^".*"/', $address)) {
72 $address = preg_replace('/^"(.*)"/', '\\1', $address);
73 }
74 if (!empty($second_part)) {
75@@ -248,7 +248,7 @@
76 */
77 function isQuotedPrintable($address)
78 {
79- if (preg_match("/=\?.+\?Q\?(.+)\?= <(.+)>/i", $address, $matches)) {
80+ if (preg_match("/=\?.+\?Q\?.+\?= <.+>/i", $address)) {
81 return true;
82 } else {
83 return false;
This page took 0.088062 seconds and 4 git commands to generate.