mirror of
https://we.phorge.it/source/phorge.git
synced 2025-04-02 23:48: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:
parent
e142c7e26c
commit
854ed4ea53
1 changed files with 10 additions and 11 deletions
|
@ -1,7 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright 2011 Facebook, Inc.
|
* Copyright 2012 Facebook, Inc.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with 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());
|
$change->getChangeType());
|
||||||
|
|
||||||
$path = $change->getPath();
|
$path = $change->getPath();
|
||||||
|
$hash = substr(md5($path), 0, 8);
|
||||||
if ($change->getFileType() == DifferentialChangeType::FILE_DIRECTORY) {
|
if ($change->getFileType() == DifferentialChangeType::FILE_DIRECTORY) {
|
||||||
$path_column = phutil_escape_html($path).'/';
|
$path .= '/';
|
||||||
} else {
|
|
||||||
$hash = substr(md5($path), 0, 8);
|
|
||||||
|
|
||||||
$path_column = phutil_render_tag(
|
|
||||||
'a',
|
|
||||||
array(
|
|
||||||
'href' => '#'.$hash,
|
|
||||||
),
|
|
||||||
phutil_escape_html($path));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$path_column = phutil_render_tag(
|
||||||
|
'a',
|
||||||
|
array(
|
||||||
|
'href' => '#'.$hash,
|
||||||
|
),
|
||||||
|
phutil_escape_html($path));
|
||||||
|
|
||||||
$rows[] = array(
|
$rows[] = array(
|
||||||
$this->linkHistory($change->getPath()),
|
$this->linkHistory($change->getPath()),
|
||||||
$this->linkBrowse($change->getPath()),
|
$this->linkBrowse($change->getPath()),
|
||||||
|
|
Loading…
Add table
Reference in a new issue