Changeset View
Changeset View
Standalone View
Standalone View
src/applications/repository/query/PhabricatorRepositoryQuery.php
Show First 20 Lines • Show All 507 Lines • ▼ Show 20 Lines | if ($this->shouldJoinSummaryTable()) { | ||||
$conn, | $conn, | ||||
'LEFT JOIN %T s ON r.id = s.repositoryID', | 'LEFT JOIN %T s ON r.id = s.repositoryID', | ||||
PhabricatorRepository::TABLE_SUMMARY); | PhabricatorRepository::TABLE_SUMMARY); | ||||
} | } | ||||
if ($this->shouldJoinURITable()) { | if ($this->shouldJoinURITable()) { | ||||
$joins[] = qsprintf( | $joins[] = qsprintf( | ||||
$conn, | $conn, | ||||
'LEFT JOIN %T uri ON r.phid = uri.repositoryPHID', | 'LEFT JOIN %R uri ON r.phid = uri.repositoryPHID', | ||||
id(new PhabricatorRepositoryURIIndex())->getTableName()); | new PhabricatorRepositoryURIIndex()); | ||||
} | } | ||||
return $joins; | return $joins; | ||||
} | } | ||||
protected function shouldGroupQueryResultRows() { | protected function shouldGroupQueryResultRows() { | ||||
if ($this->shouldJoinURITable()) { | if ($this->shouldJoinURITable()) { | ||||
return true; | return true; | ||||
▲ Show 20 Lines • Show All 108 Lines • ▼ Show 20 Lines | if ($this->numericIdentifiers || | ||||
if ($this->slugIdentifiers) { | if ($this->slugIdentifiers) { | ||||
$identifier_clause[] = qsprintf( | $identifier_clause[] = qsprintf( | ||||
$conn, | $conn, | ||||
'r.repositorySlug IN (%Ls)', | 'r.repositorySlug IN (%Ls)', | ||||
$this->slugIdentifiers); | $this->slugIdentifiers); | ||||
} | } | ||||
$where = array('('.implode(' OR ', $identifier_clause).')'); | $where[] = qsprintf($conn, '%LO', $identifier_clause); | ||||
} | } | ||||
if ($this->types) { | if ($this->types) { | ||||
$where[] = qsprintf( | $where[] = qsprintf( | ||||
$conn, | $conn, | ||||
'r.versionControlSystem IN (%Ls)', | 'r.versionControlSystem IN (%Ls)', | ||||
$this->types); | $this->types); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 76 Lines • Show Last 20 Lines |