Differential D10585 Diff 25583 src/applications/diffusion/controller/DiffusionLintDetailsController.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/diffusion/controller/DiffusionLintDetailsController.php
Show All 11 Lines | public function processRequest() { | ||||
$is_dir = (substr('/'.$drequest->getPath(), -1) == '/'); | $is_dir = (substr('/'.$drequest->getPath(), -1) == '/'); | ||||
$authors = $this->loadViewerHandles(ipull($messages, 'authorPHID')); | $authors = $this->loadViewerHandles(ipull($messages, 'authorPHID')); | ||||
$rows = array(); | $rows = array(); | ||||
foreach ($messages as $message) { | foreach ($messages as $message) { | ||||
$path = phutil_tag( | $path = phutil_tag( | ||||
'a', | 'a', | ||||
array('href' => $drequest->generateURI(array( | array( | ||||
'href' => $drequest->generateURI(array( | |||||
'action' => 'lint', | 'action' => 'lint', | ||||
'path' => $message['path'], | 'path' => $message['path'], | ||||
))), | )), | ||||
), | |||||
substr($message['path'], strlen($drequest->getPath()) + 1)); | substr($message['path'], strlen($drequest->getPath()) + 1)); | ||||
$line = phutil_tag( | $line = phutil_tag( | ||||
'a', | 'a', | ||||
array('href' => $drequest->generateURI(array( | array( | ||||
'href' => $drequest->generateURI(array( | |||||
'action' => 'browse', | 'action' => 'browse', | ||||
'path' => $message['path'], | 'path' => $message['path'], | ||||
'line' => $message['line'], | 'line' => $message['line'], | ||||
'commit' => $branch->getLintCommit(), | 'commit' => $branch->getLintCommit(), | ||||
))), | )), | ||||
), | |||||
$message['line']); | $message['line']); | ||||
$author = $message['authorPHID']; | $author = $message['authorPHID']; | ||||
if ($author && $authors[$author]) { | if ($author && $authors[$author]) { | ||||
$author = $authors[$author]->renderLink(); | $author = $authors[$author]->renderLink(); | ||||
} | } | ||||
$rows[] = array( | $rows[] = array( | ||||
▲ Show 20 Lines • Show All 43 Lines • ▼ Show 20 Lines | return $this->buildApplicationPage( | ||||
$crumbs, | $crumbs, | ||||
$content, | $content, | ||||
), | ), | ||||
array( | array( | ||||
'title' => | 'title' => | ||||
array( | array( | ||||
pht('Lint'), | pht('Lint'), | ||||
$drequest->getRepository()->getCallsign(), | $drequest->getRepository()->getCallsign(), | ||||
))); | ), | ||||
)); | |||||
} | } | ||||
private function loadLintMessages( | private function loadLintMessages( | ||||
PhabricatorRepositoryBranch $branch, | PhabricatorRepositoryBranch $branch, | ||||
$limit, | $limit, | ||||
$offset) { | $offset) { | ||||
$drequest = $this->getDiffusionRequest(); | $drequest = $this->getDiffusionRequest(); | ||||
Show All 38 Lines |