mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-26 16:52:41 +01: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:
parent
e142c7e26c
commit
854ed4ea53
1 changed files with 10 additions and 11 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.
|
||||
|
@ -37,19 +37,18 @@ final class DiffusionCommitChangeTableView extends DiffusionView {
|
|||
$change->getChangeType());
|
||||
|
||||
$path = $change->getPath();
|
||||
$hash = substr(md5($path), 0, 8);
|
||||
if ($change->getFileType() == DifferentialChangeType::FILE_DIRECTORY) {
|
||||
$path_column = phutil_escape_html($path).'/';
|
||||
} else {
|
||||
$hash = substr(md5($path), 0, 8);
|
||||
|
||||
$path_column = phutil_render_tag(
|
||||
'a',
|
||||
array(
|
||||
'href' => '#'.$hash,
|
||||
),
|
||||
phutil_escape_html($path));
|
||||
$path .= '/';
|
||||
}
|
||||
|
||||
$path_column = phutil_render_tag(
|
||||
'a',
|
||||
array(
|
||||
'href' => '#'.$hash,
|
||||
),
|
||||
phutil_escape_html($path));
|
||||
|
||||
$rows[] = array(
|
||||
$this->linkHistory($change->getPath()),
|
||||
$this->linkBrowse($change->getPath()),
|
||||
|
|
Loading…
Reference in a new issue