1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-10 00:42:41 +01:00

Remove construction of "author" information from "LastModified" payload in Diffusion

Summary:
Ref T13552. When viewing a directory in Diffusion, we make an Ajax call to get the last commit for each path.

This call currently pulls author information, since an older version of this UI showed author information.

The current UI does not show author information, so this parameter is unused. Delete the code which builds it.

Test Plan: Grepped for `'author'` and references to the "pull-lastmodified" behavior. This behavior is invoked in only one place, which never generates an author placeholder.

Maniphest Tasks: T13552

Differential Revision: https://secure.phabricator.com/D21404
This commit is contained in:
epriestley 2020-07-09 16:43:16 -07:00
parent 5454175973
commit 81e4e5b7f9
2 changed files with 1 additions and 22 deletions

View file

@ -53,14 +53,6 @@ final class DiffusionLastModifiedController extends DiffusionController {
}
}
$phids = array();
foreach ($commits as $commit) {
$phids[] = $commit->getCommitterDisplayPHID();
$phids[] = $commit->getAuthorDisplayPHID();
}
$phids = array_filter($phids);
$handles = $this->loadViewerHandles($phids);
$branch = $drequest->loadBranch();
if ($branch && $commits) {
$lint_query = id(new DiffusionLintCountQuery())
@ -83,7 +75,6 @@ final class DiffusionLastModifiedController extends DiffusionController {
$output[$path] = $this->renderColumns(
$prequest,
$handles,
$commit,
idx($lint, $path));
}
@ -93,11 +84,9 @@ final class DiffusionLastModifiedController extends DiffusionController {
private function renderColumns(
DiffusionRequest $drequest,
array $handles,
PhabricatorRepositoryCommit $commit = null,
$lint = null) {
assert_instances_of($handles, 'PhabricatorObjectHandle');
$viewer = $this->getRequest()->getUser();
$viewer = $this->getViewer();
if ($commit) {
$epoch = $commit->getEpoch();
@ -110,13 +99,6 @@ final class DiffusionLastModifiedController extends DiffusionController {
$date = '';
}
$author = $commit->renderAuthor($viewer, $handles);
$committer = $commit->renderCommitter($viewer, $handles);
if ($author != $committer) {
$author = hsprintf('%s/%s', $author, $committer);
}
$data = $commit->getCommitData();
$details = DiffusionView::linkDetail(
$drequest->getRepository(),
@ -124,11 +106,9 @@ final class DiffusionLastModifiedController extends DiffusionController {
$data->getSummary());
$details = AphrontTableView::renderSingleDisplayLine($details);
$return = array(
'commit' => $modified,
'date' => $date,
'author' => $author,
'details' => $details,
);

View file

@ -76,7 +76,6 @@ final class DiffusionBrowseTableView extends DiffusionView {
$dict = array(
'lint' => celerity_generate_unique_node_id(),
'date' => celerity_generate_unique_node_id(),
'author' => celerity_generate_unique_node_id(),
'details' => celerity_generate_unique_node_id(),
);