Changeset View
Changeset View
Standalone View
Standalone View
src/applications/repository/query/PhabricatorRepositoryQuery.php
Show First 20 Lines • Show All 209 Lines • ▼ Show 20 Lines | protected function loadPage() { | ||||
if ($this->needMostRecentCommits) { | if ($this->needMostRecentCommits) { | ||||
$commit_ids = ipull($data, 'lastCommitID', 'id'); | $commit_ids = ipull($data, 'lastCommitID', 'id'); | ||||
$commit_ids = array_filter($commit_ids); | $commit_ids = array_filter($commit_ids); | ||||
if ($commit_ids) { | if ($commit_ids) { | ||||
$commits = id(new DiffusionCommitQuery()) | $commits = id(new DiffusionCommitQuery()) | ||||
->setViewer($this->getViewer()) | ->setViewer($this->getViewer()) | ||||
->withIDs($commit_ids) | ->withIDs($commit_ids) | ||||
->needCommitData(true) | |||||
->needIdentities(true) | |||||
->execute(); | ->execute(); | ||||
} else { | } else { | ||||
$commits = array(); | $commits = array(); | ||||
} | } | ||||
foreach ($repositories as $id => $repository) { | foreach ($repositories as $id => $repository) { | ||||
$commit = null; | $commit = null; | ||||
if (idx($commit_ids, $id)) { | if (idx($commit_ids, $id)) { | ||||
$commit = idx($commits, $commit_ids[$id]); | $commit = idx($commits, $commit_ids[$id]); | ||||
▲ Show 20 Lines • Show All 476 Lines • Show Last 20 Lines |