mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-10 00:42:41 +01:00
Fixed 'Modified' link in Diffusion History View.
Summary: 'Modified' link always pointed to the latest change. Fixed the link. Test Plan: Tested that clicking 'Modified' took me to the correct place. Made sure that Diffusion commit view was still working correctly. Reviewed By: epriestley Reviewers: epriestley CC: jungejason, aran, epriestley Differential Revision: 255
This commit is contained in:
parent
6fb8367dfb
commit
d63f3d479c
2 changed files with 8 additions and 3 deletions
|
@ -29,7 +29,8 @@ abstract class DiffusionView extends AphrontView {
|
|||
return $this->diffusionRequest;
|
||||
}
|
||||
|
||||
final public function linkChange($change_type, $file_type, $path = null) {
|
||||
final public function linkChange($change_type, $file_type, $path = null,
|
||||
$commit_identifier = null) {
|
||||
|
||||
$text = DifferentialChangeType::getFullNameForChangeType($change_type);
|
||||
if ($change_type == DifferentialChangeType::TYPE_CHILD) {
|
||||
|
@ -42,7 +43,9 @@ abstract class DiffusionView extends AphrontView {
|
|||
|
||||
$drequest = $this->getDiffusionRequest();
|
||||
|
||||
if ($drequest->getRawCommit()) {
|
||||
if ($commit_identifier) {
|
||||
$commit = ';'.$commit_identifier;
|
||||
} else if ($drequest->getRawCommit()) {
|
||||
$commit = ';'.$drequest->getCommitURIComponent($drequest->getRawCommit());
|
||||
} else {
|
||||
$commit = null;
|
||||
|
|
|
@ -71,7 +71,9 @@ final class DiffusionHistoryTableView extends DiffusionView {
|
|||
$history->getCommitIdentifier()),
|
||||
$this->linkChange(
|
||||
$history->getChangeType(),
|
||||
$history->getFileType()),
|
||||
$history->getFileType(),
|
||||
null,
|
||||
$history->getCommitIdentifier()),
|
||||
$date,
|
||||
$time,
|
||||
$author,
|
||||
|
|
Loading…
Reference in a new issue