From dedcfd0c9100792a698fa07b3dffa2bbf0e91a1a Mon Sep 17 00:00:00 2001 From: epriestley Date: Tue, 12 Aug 2014 12:25:58 -0700 Subject: [PATCH] Fix broken handle rendering in Ponder Summary: Ref T5817. This just fixes the markup in emails, the overall behavior still isn't great. I don't want to spend to much time on Ponder until it ends up somewhere nearer the top of the priority queue. Test Plan: Viewed feed stories and emails, no stray/clearly-broken HTML. Reviewers: btrahan Reviewed By: btrahan Subscribers: epriestley Maniphest Tasks: T5817 Differential Revision: https://secure.phabricator.com/D10231 --- src/applications/ponder/phid/PonderAnswerPHIDType.php | 4 +++- .../ponder/storage/PonderAnswerTransaction.php | 10 ++-------- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/src/applications/ponder/phid/PonderAnswerPHIDType.php b/src/applications/ponder/phid/PonderAnswerPHIDType.php index 24564f6a6f..c8747007d3 100644 --- a/src/applications/ponder/phid/PonderAnswerPHIDType.php +++ b/src/applications/ponder/phid/PonderAnswerPHIDType.php @@ -29,8 +29,10 @@ final class PonderAnswerPHIDType extends PhabricatorPHIDType { $answer = $objects[$phid]; $id = $answer->getID(); + $question = $answer->getQuestion(); + $question_title = $question->getFullTitle(); - $handle->setName("Answer {$id}"); + $handle->setName("{$question_title} (Answer {$id})"); $handle->setURI($answer->getURI()); } } diff --git a/src/applications/ponder/storage/PonderAnswerTransaction.php b/src/applications/ponder/storage/PonderAnswerTransaction.php index 7b70dcadc1..ced8a08fe9 100644 --- a/src/applications/ponder/storage/PonderAnswerTransaction.php +++ b/src/applications/ponder/storage/PonderAnswerTransaction.php @@ -54,16 +54,10 @@ final class PonderAnswerTransaction switch ($this->getTransactionType()) { case self::TYPE_CONTENT: - $answer = $story->getObject($object_phid); - $question = $answer->getQuestion(); - $answer_handle = $this->getHandle($object_phid); - $link = $answer_handle->renderLink( - $question->getFullTitle()); - return pht( - '%s updated their answer to %s', + '%s updated %s.', $this->renderHandleLink($author_phid), - $link); + $this->renderHandleLink($object_phid)); } return parent::getTitleForFeed($story);