mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-10 00:42:41 +01:00
Allow revision action links using VS diff
Test Plan: Created action link using VS diff, selected VS diff. Reviewers: epriestley Reviewed By: epriestley CC: aran, Korvin Differential Revision: https://secure.phabricator.com/D2770
This commit is contained in:
parent
5d9896e7c5
commit
5b6713f3c1
2 changed files with 15 additions and 3 deletions
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
* Copyright 2011 Facebook, Inc.
|
||||
* Copyright 2012 Facebook, Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -17,6 +17,16 @@
|
|||
*/
|
||||
|
||||
abstract class DifferentialRevisionDetailRenderer {
|
||||
private $vsDiff;
|
||||
|
||||
final public function setVSDiff(DifferentialDiff $diff) {
|
||||
$this->vsDiff = $diff;
|
||||
return $this;
|
||||
}
|
||||
|
||||
final protected function getVSDiff() {
|
||||
return $this->vsDiff;
|
||||
}
|
||||
|
||||
/**
|
||||
* This function must return an array of action links that will be
|
||||
|
|
|
@ -227,8 +227,10 @@ 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 = newv($custom_renderer_class, array());
|
||||
if ($diff_vs) {
|
||||
$custom_renderer->setVSDiff($diffs[$diff_vs]);
|
||||
}
|
||||
$actions = array_merge(
|
||||
$actions,
|
||||
$custom_renderer->generateActionLinks($revision, $target_manual));
|
||||
|
|
Loading…
Reference in a new issue