Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F19518380
D9375.id22448.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D9375.id22448.diff
View Options
diff --git a/src/applications/differential/editor/DifferentialTransactionEditor.php b/src/applications/differential/editor/DifferentialTransactionEditor.php
--- a/src/applications/differential/editor/DifferentialTransactionEditor.php
+++ b/src/applications/differential/editor/DifferentialTransactionEditor.php
@@ -1710,19 +1710,26 @@
$patch_html_lines = array();
foreach (phutil_split_lines($patch) as $line) {
$len = strlen($line);
+ $color = null;
if ($len >= 1 && $line[0] == '+') {
- $patch_html_lines[] = "<span style='color:green;'>${line}</span>";
+ $color = 'green';
} else if ($len >= 1 && $line[0] == '-') {
- $patch_html_lines[] = "<span style='color:red;'>${line}</span>";
+ $color = 'red';
} else if ($len >= 2 && substr($line, 0, 2) == '@@') {
- $patch_html_lines[] = "<span style='color:purple;'>${line}</span>";
- } else {
- $patch_html_lines[] = "<span>${line}</span>";
+ $color = 'purple';
}
+
+ $attrib = array();
+
+ if ($color) {
+ $attrib['style'] = "color:{$color};";
+ }
+
+ $patch_html_lines[] = phutil_tag('span', $attrib, $line);
}
- $html_patch = "<div style='font-family: monospace;'>".
- implode('<br>', $patch_html_lines).'</div>';
+ $html_patch = "<pre style='font-family: monospace;'>".
+ implode('', $patch_html_lines).'</pre>';
return array($patch, $html_patch);
}
diff --git a/src/applications/metamta/storage/PhabricatorMetaMTAMail.php b/src/applications/metamta/storage/PhabricatorMetaMTAMail.php
--- a/src/applications/metamta/storage/PhabricatorMetaMTAMail.php
+++ b/src/applications/metamta/storage/PhabricatorMetaMTAMail.php
@@ -536,7 +536,7 @@
}
}
- $body = $params['body'];
+ $body = idx($params, 'body', '');
$max = PhabricatorEnv::getEnvConfig('metamta.email-body-limit');
if (strlen($body) > $max) {
$body = phutil_utf8_shorten($body, $max);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Jan 16, 8:06 PM (2 d, 22 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
8816891
Default Alt Text
D9375.id22448.diff (1 KB)
Attached To
Mode
D9375: HTML emails
Attached
Detach File
Event Timeline
Log In to Comment