Replace legacy Differential queries for "open" revisions with a modern mechanism

Summary: Ref T2543. Several queries want only open revisions. Provide a tailored, non-legacy way to issue that query.

Test Plan: Viewed some of these callsites (e.g., "Similar open revisions affecting these files"), saw only open revisions.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T2543

Differential Revision: https://secure.phabricator.com/D18395
This commit is contained in:
epriestley
2017-08-11 09:18:47 -07:00
parent 212d4d0dc7
commit 50dfdb8d03
5 changed files with 24 additions and 4 deletions

View File

@@ -1758,7 +1758,7 @@ final class DiffusionBrowseController extends DiffusionController {
$revisions = id(new DifferentialRevisionQuery())
->setViewer($viewer)
->withPath($repository->getID(), $path_id)
->withStatus(DifferentialLegacyQuery::STATUS_OPEN)
->withIsOpen(true)
->withUpdatedEpochBetween($recent, null)
->setOrder(DifferentialRevisionQuery::ORDER_MODIFIED)
->setLimit(10)