1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-19 05:12:41 +01:00

horribly fix plain-text email for modular transactions

Summary:
This is the quickest and dirtiest fix I could come up with.

`PhabricatorApplicationTransaction::getTitleForMail()` is using `clone $this`, which doesn't actually effect `implementation`.
Ref T9789.

Test Plan: update paste comment, get plaintext mail.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: epriestley

Maniphest Tasks: T9789

Differential Revision: https://secure.phabricator.com/D16251
This commit is contained in:
Aviv Eyal 2016-07-08 00:17:16 +00:00 committed by avivey
parent c50811137d
commit b656c87e37

View file

@ -98,6 +98,15 @@ abstract class PhabricatorModularTransaction
return parent::getTitle(); return parent::getTitle();
} }
public function getTitleForMail() {
$old_target = $this->getRenderingTarget();
$new_target = self::TARGET_TEXT;
$this->setRenderingTarget($new_target);
$title = $this->getTitle();
$this->setRenderingTarget($old_target);
return $title;
}
final public function getTitleForFeed() { final public function getTitleForFeed() {
$title = $this->getTransactionImplementation()->getTitleForFeed(); $title = $this->getTransactionImplementation()->getTitleForFeed();
if ($title !== null) { if ($title !== null) {