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:
parent
f770900983
commit
9dacf39cf1
2 changed files with 11 additions and 0 deletions
|
@ -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;
|
||||
|
|
|
@ -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]);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue