Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F13981481
D16818.id40497.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
3 KB
Referenced Files
None
Subscribers
None
D16818.id40497.diff
View Options
diff --git a/src/applications/calendar/xaction/PhabricatorCalendarEventDescriptionTransaction.php b/src/applications/calendar/xaction/PhabricatorCalendarEventDescriptionTransaction.php
--- a/src/applications/calendar/xaction/PhabricatorCalendarEventDescriptionTransaction.php
+++ b/src/applications/calendar/xaction/PhabricatorCalendarEventDescriptionTransaction.php
@@ -30,6 +30,10 @@
return true;
}
+ public function getMailDiffSectionHeader() {
+ return pht('CHANGES TO EVENT DESCRIPTION');
+ }
+
public function newChangeDetailView() {
$viewer = $this->getViewer();
diff --git a/src/applications/owners/xaction/PhabricatorOwnersPackageDescriptionTransaction.php b/src/applications/owners/xaction/PhabricatorOwnersPackageDescriptionTransaction.php
--- a/src/applications/owners/xaction/PhabricatorOwnersPackageDescriptionTransaction.php
+++ b/src/applications/owners/xaction/PhabricatorOwnersPackageDescriptionTransaction.php
@@ -19,6 +19,10 @@
$this->renderAuthor());
}
+ public function getMailDiffSectionHeader() {
+ return pht('CHANGES TO PACKAGE DESCRIPTION');
+ }
+
public function newChangeDetailView() {
return id(new PhabricatorApplicationTransactionTextDiffDetailView())
->setViewer($this->getViewer())
diff --git a/src/applications/paste/xaction/PhabricatorPasteContentTransaction.php b/src/applications/paste/xaction/PhabricatorPasteContentTransaction.php
--- a/src/applications/paste/xaction/PhabricatorPasteContentTransaction.php
+++ b/src/applications/paste/xaction/PhabricatorPasteContentTransaction.php
@@ -104,6 +104,10 @@
return true;
}
+ public function getMailDiffSectionHeader() {
+ return pht('CHANGES TO PASTE CONTENT');
+ }
+
public function newChangeDetailView() {
$viewer = $this->getViewer();
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
@@ -1141,9 +1141,15 @@
PhabricatorLiskDAO $object,
array $xactions) {
+ $this->object = $object;
+ $this->xactions = $xactions;
+
// Hook for edges or other properties that may need (re-)loading
$object = $this->willPublish($object, $xactions);
+ // The object might have changed, so reassign it.
+ $this->object = $object;
+
$messages = array();
if (!$this->getDisableEmail()) {
if ($this->shouldSendMail($object, $xactions)) {
@@ -2871,12 +2877,24 @@
foreach ($details as $xaction) {
$details = $xaction->renderChangeDetailsForMail($body->getViewer());
if ($details !== null) {
- $body->addHTMLSection(pht('EDIT DETAILS'), $details);
+ $label = $this->getMailDiffSectionHeader($xaction);
+ $body->addHTMLSection($label, $details);
}
}
}
+ private function getMailDiffSectionHeader($xaction) {
+ $type = $xaction->getTransactionType();
+
+ $xtype = $this->getModularTransactionType($type);
+ if ($xtype) {
+ return $xtype->getMailDiffSectionHeader();
+ }
+
+ return pht('EDIT DETAILS');
+ }
+
/**
* @task mail
*/
diff --git a/src/applications/transactions/storage/PhabricatorModularTransactionType.php b/src/applications/transactions/storage/PhabricatorModularTransactionType.php
--- a/src/applications/transactions/storage/PhabricatorModularTransactionType.php
+++ b/src/applications/transactions/storage/PhabricatorModularTransactionType.php
@@ -67,6 +67,10 @@
throw new PhutilMethodNotImplementedException();
}
+ public function getMailDiffSectionHeader() {
+ return pht('EDIT DETAILS');
+ }
+
public function newRemarkupChanges() {
return array();
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Oct 20, 4:50 PM (4 w, 17 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6736988
Default Alt Text
D16818.id40497.diff (3 KB)
Attached To
Mode
D16818: Allow transactions to specialize their mail headers for diff sections
Attached
Detach File
Event Timeline
Log In to Comment