Skip to content

Commit 664d9fa

Browse files
author
Chad Little
committedMar 2, 2017
Touch up Badges emails
Summary: Ref T12270. Adds the name of the badge to the subject, fixes the double description. Test Plan: Edit lots of badges with and without descriptions, see good emails. Reviewers: epriestley Reviewed By: epriestley Subscribers: Korvin Maniphest Tasks: T12270 Differential Revision: https://secure.phabricator.com/D17449
1 parent 87304e3 commit 664d9fa

File tree

1 file changed

+5
-10
lines changed

1 file changed

+5
-10
lines changed
 

‎src/applications/badges/editor/PhabricatorBadgesEditor.php

+5-10
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,12 @@ protected function buildReplyHandler(PhabricatorLiskDAO $object) {
8787
protected function buildMailTemplate(PhabricatorLiskDAO $object) {
8888
$name = $object->getName();
8989
$id = $object->getID();
90-
$name = pht('Badge %d', $id);
90+
$topic = pht('Badge %d', $id);
91+
$subject = pht('Badge %d: %s', $id, $name);
92+
9193
return id(new PhabricatorMetaMTAMail())
92-
->setSubject($name)
93-
->addHeader('Thread-Topic', $name);
94+
->setSubject($subject)
95+
->addHeader('Thread-Topic', $topic);
9496
}
9597

9698
protected function getMailTo(PhabricatorLiskDAO $object) {
@@ -104,15 +106,8 @@ protected function buildMailBody(
104106
PhabricatorLiskDAO $object,
105107
array $xactions) {
106108

107-
$description = $object->getDescription();
108109
$body = parent::buildMailBody($object, $xactions);
109110

110-
if (strlen($description)) {
111-
$body->addRemarkupSection(
112-
pht('BADGE DESCRIPTION'),
113-
$object->getDescription());
114-
}
115-
116111
$body->addLinkSection(
117112
pht('BADGE DETAIL'),
118113
PhabricatorEnv::getProductionURI('/badges/view/'.$object->getID().'/'));

0 commit comments

Comments
 (0)
Failed to load comments.