Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15438300
D11402.id27384.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D11402.id27384.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
@@ -1137,7 +1137,10 @@
PhabricatorLiskDAO $object,
array $xactions) {
- $body = parent::buildMailBody($object, $xactions);
+ $body = new PhabricatorMetaMTAMailBody();
+ $body->setViewer($this->requireActor());
+
+ $this->addHeadersAndCommentsToMailBody($body, $xactions);
$type_inline = DifferentialTransaction::TYPE_INLINE;
@@ -1148,6 +1151,12 @@
}
}
+ if ($inlines) {
+ $body->addTextSection(
+ pht('INLINE COMMENTS'),
+ $this->renderInlineCommentsForMail($object, $inlines));
+ }
+
$changed_uri = $this->getChangedPriorToCommitURI();
if ($changed_uri) {
$body->addLinkSection(
@@ -1155,11 +1164,7 @@
$changed_uri);
}
- if ($inlines) {
- $body->addTextSection(
- pht('INLINE COMMENTS'),
- $this->renderInlineCommentsForMail($object, $inlines));
- }
+ $this->addCustomFieldsToMailBody($body, $object, $xactions);
$body->addLinkSection(
pht('REVISION DETAIL'),
diff --git a/src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php b/src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php
--- a/src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php
+++ b/src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php
@@ -2191,6 +2191,21 @@
PhabricatorLiskDAO $object,
array $xactions) {
+ $body = new PhabricatorMetaMTAMailBody();
+ $body->setViewer($this->requireActor());
+
+ $this->addHeadersAndCommentsToMailBody($body, $xactions);
+ $this->addCustomFieldsToMailBody($body, $object, $xactions);
+ return $body;
+ }
+
+ /**
+ * @task mail
+ */
+ protected function addHeadersAndCommentsToMailBody(
+ PhabricatorMetaMTAMailBody $body,
+ array $xactions) {
+
$headers = array();
$comments = array();
@@ -2209,14 +2224,20 @@
$comments[] = $comment;
}
}
-
- $body = new PhabricatorMetaMTAMailBody();
- $body->setViewer($this->requireActor());
$body->addRawSection(implode("\n", $headers));
foreach ($comments as $comment) {
$body->addRemarkupSection($comment);
}
+ }
+
+ /**
+ * @task mail
+ */
+ protected function addCustomFieldsToMailBody(
+ PhabricatorMetaMTAMailBody $body,
+ PhabricatorLiskDAO $object,
+ array $xactions) {
if ($object instanceof PhabricatorCustomFieldInterface) {
$field_list = PhabricatorCustomField::getObjectFields(
@@ -2232,11 +2253,10 @@
$xactions);
}
}
-
- return $body;
}
+
/* -( Publishing Feed Stories )-------------------------------------------- */
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Mar 27, 12:03 AM (1 w, 2 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7390837
Default Alt Text
D11402.id27384.diff (2 KB)
Attached To
Mode
D11402: Differential - re-jigger mail such that inline comments show up right after the main comments.
Attached
Detach File
Event Timeline
Log In to Comment