1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-11 17:32:41 +01:00
phorge-phorge/src/applications/diffusion/controller/DiffusionLastModifiedController.php
vrana 846a359d9a Display number of lint messages in Diffusion dir
Test Plan:
Went to https://secure.phabricator.com/diffusion/ARC/browse/.
Saw number of lint messages per dir, not terribly slow.
Went to https://secure.phabricator.com/diffusion/ARC/browse/master/src/difference/.
Saw number of lint messages per file.
Disabled lint, didn't see it.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3921
2012-11-08 15:40:48 -08:00

35 lines
992 B
PHP

<?php
final class DiffusionLastModifiedController extends DiffusionController {
public function processRequest() {
$drequest = $this->getDiffusionRequest();
$request = $this->getRequest();
$modified_query = DiffusionLastModifiedQuery::newFromDiffusionRequest(
$drequest);
list($commit, $commit_data) = $modified_query->loadLastModification();
$phids = array();
if ($commit_data) {
if ($commit_data->getCommitDetail('authorPHID')) {
$phids[$commit_data->getCommitDetail('authorPHID')] = true;
}
if ($commit_data->getCommitDetail('committerPHID')) {
$phids[$commit_data->getCommitDetail('committerPHID')] = true;
}
}
$phids = array_keys($phids);
$handles = $this->loadViewerHandles($phids);
$output = DiffusionBrowseTableView::renderLastModifiedColumns(
$drequest,
$handles,
$commit,
$commit_data);
return id(new AphrontAjaxResponse())
->setContent($output);
}
}