mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-13 18:32:41 +01:00
e9b5eb8609
Test Plan: Looked at it. Reviewers: epriestley Reviewed By: epriestley CC: aran, Korvin Differential Revision: https://secure.phabricator.com/D5064
37 lines
1 KiB
PHP
37 lines
1 KiB
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);
|
|
|
|
$view = new DiffusionBrowseTableView();
|
|
$view->setUser($request->getUser());
|
|
$output = $view->renderLastModifiedColumns(
|
|
$drequest,
|
|
$handles,
|
|
$commit,
|
|
$commit_data);
|
|
|
|
return id(new AphrontAjaxResponse())
|
|
->setContent($output);
|
|
}
|
|
}
|