diff --git a/src/applications/differential/storage/changeset/DifferentialChangeset.php b/src/applications/differential/storage/changeset/DifferentialChangeset.php index db925ee0b9..794ef437b0 100644 --- a/src/applications/differential/storage/changeset/DifferentialChangeset.php +++ b/src/applications/differential/storage/changeset/DifferentialChangeset.php @@ -139,5 +139,9 @@ class DifferentialChangeset extends DifferentialDAO { } return implode("\n", $file); } + + public function getAnchorName() { + return substr(md5($this->getFilename()), 0, 8); + } } diff --git a/src/applications/differential/view/changesetdetailview/DifferentialChangesetDetailView.php b/src/applications/differential/view/changesetdetailview/DifferentialChangesetDetailView.php index ccba6739db..8f1ac14a27 100644 --- a/src/applications/differential/view/changesetdetailview/DifferentialChangesetDetailView.php +++ b/src/applications/differential/view/changesetdetailview/DifferentialChangesetDetailView.php @@ -54,7 +54,12 @@ class DifferentialChangesetDetailView extends AphrontView { ), 'class' => $class, ), - ''. + phutil_render_tag( + 'a', + array( + 'name' => $changeset->getAnchorName(), + ), + ''). implode('', $this->buttons). '