From ea455376e6f1488b6bfaa9b47e94f18edd61d530 Mon Sep 17 00:00:00 2001 From: tuomaspelkonen Date: Mon, 11 Apr 2011 19:32:46 -0700 Subject: [PATCH] Added a link to the actual object in Herald transcript. Summary: We were showing all kinds of information about the object in object transcript, but there was no link to the actual object. Test Plan: Checked that links were working correctly for both differential and commit objects. Reviewed By: epriestley Reviewers: epriestley CC: jungejason, epriestley Differential Revision: 125 --- .../controller/transcript/HeraldTranscriptController.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/applications/herald/controller/transcript/HeraldTranscriptController.php b/src/applications/herald/controller/transcript/HeraldTranscriptController.php index aac094d05f..ced383d98d 100644 --- a/src/applications/herald/controller/transcript/HeraldTranscriptController.php +++ b/src/applications/herald/controller/transcript/HeraldTranscriptController.php @@ -486,10 +486,15 @@ class HeraldTranscriptController extends HeraldController { $data = array(); if ($object_xscript) { + $phid = $object_xscript->getPHID(); + $handles = id(new PhabricatorObjectHandleData(array($phid))) + ->loadHandles(); + $data += array( 'Object Name' => $object_xscript->getName(), 'Object Type' => $object_xscript->getType(), - 'Object PHID' => $object_xscript->getPHID(), + 'Object PHID' => $phid, + 'Object Link' => $handles[$phid]->renderLink(), ); } @@ -515,6 +520,8 @@ class HeraldTranscriptController extends HeraldController { 'class' => 'herald-field-value-transcript', ), phutil_escape_html($value)); + } else if ($name === 'Object Link') { + // The link cannot be escaped } else { $value = phutil_escape_html($value); }