1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2025-01-27 15:08:20 +01:00

Use scoped names in revision query

Test Plan:
  id(new DifferentialRevisionQuery())
    ->withIDs($revision_ids)
    ->withDraftRepliesByAuthors($user_phids)
    ->execute();

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3322
This commit is contained in:
vrana 2012-08-16 18:32:57 -07:00
parent c839dc29a6
commit 3775e14478

View file

@ -610,7 +610,7 @@ final class DifferentialRevisionQuery {
foreach ($repo_info as $repository_id => $paths) { foreach ($repo_info as $repository_id => $paths) {
$path_clauses[] = qsprintf( $path_clauses[] = qsprintf(
$conn_r, $conn_r,
'(repositoryID = %d AND pathID IN (%Ld))', '(p.repositoryID = %d AND p.pathID IN (%Ld))',
$repository_id, $repository_id,
ipull($paths, 'pathID')); ipull($paths, 'pathID'));
} }
@ -621,7 +621,7 @@ final class DifferentialRevisionQuery {
if ($this->authors) { if ($this->authors) {
$where[] = qsprintf( $where[] = qsprintf(
$conn_r, $conn_r,
'authorPHID IN (%Ls)', 'r.authorPHID IN (%Ls)',
$this->authors); $this->authors);
} }
@ -634,7 +634,7 @@ final class DifferentialRevisionQuery {
if ($this->revIDs) { if ($this->revIDs) {
$where[] = qsprintf( $where[] = qsprintf(
$conn_r, $conn_r,
'id IN (%Ld)', 'r.id IN (%Ld)',
$this->revIDs); $this->revIDs);
} }
@ -655,7 +655,7 @@ final class DifferentialRevisionQuery {
if ($this->phids) { if ($this->phids) {
$where[] = qsprintf( $where[] = qsprintf(
$conn_r, $conn_r,
'phid IN (%Ls)', 'r.phid IN (%Ls)',
$this->phids); $this->phids);
} }
@ -686,7 +686,7 @@ final class DifferentialRevisionQuery {
case self::STATUS_OPEN: case self::STATUS_OPEN:
$where[] = qsprintf( $where[] = qsprintf(
$conn_r, $conn_r,
'status IN (%Ld)', 'r.status IN (%Ld)',
array( array(
ArcanistDifferentialRevisionStatus::NEEDS_REVIEW, ArcanistDifferentialRevisionStatus::NEEDS_REVIEW,
ArcanistDifferentialRevisionStatus::NEEDS_REVISION, ArcanistDifferentialRevisionStatus::NEEDS_REVISION,
@ -696,7 +696,7 @@ final class DifferentialRevisionQuery {
case self::STATUS_NEEDS_REVIEW: case self::STATUS_NEEDS_REVIEW:
$where[] = qsprintf( $where[] = qsprintf(
$conn_r, $conn_r,
'status IN (%Ld)', 'r.status IN (%Ld)',
array( array(
ArcanistDifferentialRevisionStatus::NEEDS_REVIEW, ArcanistDifferentialRevisionStatus::NEEDS_REVIEW,
)); ));
@ -704,7 +704,7 @@ final class DifferentialRevisionQuery {
case self::STATUS_ACCEPTED: case self::STATUS_ACCEPTED:
$where[] = qsprintf( $where[] = qsprintf(
$conn_r, $conn_r,
'status IN (%Ld)', 'r.status IN (%Ld)',
array( array(
ArcanistDifferentialRevisionStatus::ACCEPTED, ArcanistDifferentialRevisionStatus::ACCEPTED,
)); ));
@ -718,7 +718,7 @@ final class DifferentialRevisionQuery {
case self::STATUS_CLOSED: case self::STATUS_CLOSED:
$where[] = qsprintf( $where[] = qsprintf(
$conn_r, $conn_r,
'status IN (%Ld)', 'r.status IN (%Ld)',
array( array(
ArcanistDifferentialRevisionStatus::CLOSED, ArcanistDifferentialRevisionStatus::CLOSED,
)); ));
@ -726,7 +726,7 @@ final class DifferentialRevisionQuery {
case self::STATUS_ABANDONED: case self::STATUS_ABANDONED:
$where[] = qsprintf( $where[] = qsprintf(
$conn_r, $conn_r,
'status IN (%Ld)', 'r.status IN (%Ld)',
array( array(
ArcanistDifferentialRevisionStatus::ABANDONED, ArcanistDifferentialRevisionStatus::ABANDONED,
)); ));