Changeset View
Changeset View
Standalone View
Standalone View
src/applications/diffusion/query/DiffusionCommitQuery.php
Show First 20 Lines • Show All 355 Lines • ▼ Show 20 Lines | if ($this->identifiers !== null) { | ||||
$sql[] = qsprintf( | $sql[] = qsprintf( | ||||
$conn_r, | $conn_r, | ||||
'(commit.commitIdentifier LIKE %> AND '. | '(commit.commitIdentifier LIKE %> AND '. | ||||
'LENGTH(commit.commitIdentifier) = 40)', | 'LENGTH(commit.commitIdentifier) = 40)', | ||||
$identifier); | $identifier); | ||||
} | } | ||||
if ($refs) { | if ($refs) { | ||||
$callsigns = ipull($refs, 'callsign'); | $callsigns = array_unique(ipull($refs, 'callsign')); | ||||
$repos = id(new PhabricatorRepositoryQuery()) | $repos = id(new PhabricatorRepositoryQuery()) | ||||
->setViewer($this->getViewer()) | ->setViewer($this->getViewer()) | ||||
->withCallsigns($callsigns) | ->withCallsigns($callsigns) | ||||
->execute(); | ->execute(); | ||||
$repos = mpull($repos, null, 'getCallsign'); | $repos = mpull($repos, null, 'getCallsign'); | ||||
foreach ($refs as $key => $ref) { | foreach ($refs as $key => $ref) { | ||||
$repo = idx($repos, $ref['callsign']); | $repo = idx($repos, $ref['callsign']); | ||||
▲ Show 20 Lines • Show All 183 Lines • Show Last 20 Lines |