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

Pass target diff to revision detail renderer

Summary: We need to use commit diff in some links and manual diff in some others.

Test Plan: Displayed revision, verified that the action link uses commit diff.

Reviewers: epriestley, nh

Reviewed By: nh

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3300
This commit is contained in:
vrana 2012-08-15 15:31:39 -07:00
parent f770900983
commit 9dacf39cf1
2 changed files with 11 additions and 0 deletions

View file

@ -17,8 +17,18 @@
*/
abstract class DifferentialRevisionDetailRenderer {
private $diff;
private $vsDiff;
final public function setDiff(DifferentialDiff $diff) {
$this->diff = $diff;
return $this;
}
final protected function getDiff() {
return $this->diff;
}
final public function setVSDiff(DifferentialDiff $diff) {
$this->vsDiff = $diff;
return $this;

View file

@ -243,6 +243,7 @@ final class DifferentialRevisionViewController extends DifferentialController {
// TODO: build a better version of the action links and deprecate the
// whole DifferentialRevisionDetailRenderer class.
$custom_renderer = newv($custom_renderer_class, array());
$custom_renderer->setDiff($target);
if ($diff_vs) {
$custom_renderer->setVSDiff($diffs[$diff_vs]);
}