1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-22 05:20:56 +01:00

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
This commit is contained in:
tuomaspelkonen 2011-04-11 19:32:46 -07:00
parent 1bba2c9913
commit ea455376e6

View file

@ -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);
}