1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2025-04-02 15:38:18 +02:00

Display link in commit ToC for directories

Summary:
They are present in the document so there is no reason to omit the links to
them.
Similar to D1412.

Test Plan: Display commit.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran

Differential Revision: https://secure.phabricator.com/D1464
This commit is contained in:
vrana 2012-01-20 21:40:17 -08:00
parent e142c7e26c
commit 854ed4ea53

View file

@ -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.
@ -37,10 +37,10 @@ final class DiffusionCommitChangeTableView extends DiffusionView {
$change->getChangeType());
$path = $change->getPath();
if ($change->getFileType() == DifferentialChangeType::FILE_DIRECTORY) {
$path_column = phutil_escape_html($path).'/';
} else {
$hash = substr(md5($path), 0, 8);
if ($change->getFileType() == DifferentialChangeType::FILE_DIRECTORY) {
$path .= '/';
}
$path_column = phutil_render_tag(
'a',
@ -48,7 +48,6 @@ final class DiffusionCommitChangeTableView extends DiffusionView {
'href' => '#'.$hash,
),
phutil_escape_html($path));
}
$rows[] = array(
$this->linkHistory($change->getPath()),